summaryrefslogtreecommitdiff
path: root/doc/c-extensions
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-08 21:23:12 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-08 21:23:12 +0300
commitb05a11478edc7e6d1e38ef7f8d6788c7bd917493 (patch)
treeff9e6485e620a3a7289f2d40c9b05f3457c7821e /doc/c-extensions
parent41bb9fce47f6366cc3f7d45790f7883f74289b5a (diff)
doc/extensions: rename to c-extensions
The old name could be somewhat confusing.
Diffstat (limited to 'doc/c-extensions')
-rw-r--r--doc/c-extensions32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/c-extensions b/doc/c-extensions
new file mode 100644
index 000000000..db2ba7d77
--- /dev/null
+++ b/doc/c-extensions
@@ -0,0 +1,32 @@
+Use of extensions throughout the X server tree
+----------------------------------------------
+
+Optional extensions:
+The server will still build if your toolchain does not support these
+extensions, although the results may not be optimal.
+
+ * _X_SENTINEL(x): member x of the passed structure must be NULL, e.g.:
+ void parseOptions(Option *options _X_SENTINEL(0));
+ parseOptions("foo", "bar", NULL); /* this is OK */
+ parseOptions("foo", "bar", "baz"); /* this is not */
+ This definition comes from Xfuncproto.h in the core
+ protocol headers.
+ * _X_ATTRIBUTE_PRINTF(x, y): This function has printf-like semantics;
+ check the format string when built with
+ -Wformat (gcc) or similar.
+ * _X_EXPORT: this function should appear in symbol tables.
+ * _X_HIDDEN: this function should not appear in the _dynamic_ symbol
+ table.
+ * _X_INTERNAL: like _X_HIDDEN, but attempt to ensure that this function
+ is never called from another module.
+ * _X_INLINE: inline this functon if possible (generally obeyed unless
+ disabling optimisations).
+ * _X_DEPRECATED: warn on use of this function.
+
+Mandatory extensions:
+The server will not build if your toolchain does not support these extensions.
+
+ * named initialisers: explicitly initialising structure members, e.g.:
+ struct foo bar = { .baz = quux, .brian = "dog" };
+ * variadic macros: macros with a variable number of arguments, e.g.:
+ #define DebugF(x, ...) /**/