summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-macros.h
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-10-10 13:02:57 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2007-10-11 10:06:45 +0100
commit6b512e4ee74e9bd1606e01a48fde2a69ca10a96a (patch)
tree2da7b7206aa8ed8c1ac693bc9e8e3fe72d2eb78d /dbus/dbus-macros.h
parent077fb290c57ee937330b22b2ae794fc9967d4722 (diff)
Add macro DBUS_GNUC_EXTENSION (the same as GLib's G_GNUC_EXTENSION)
Part of a fix for bug 717.
Diffstat (limited to 'dbus/dbus-macros.h')
-rw-r--r--dbus/dbus-macros.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h
index 461dff39..1ed6ea76 100644
--- a/dbus/dbus-macros.h
+++ b/dbus/dbus-macros.h
@@ -58,6 +58,12 @@
# define DBUS_DEPRECATED
#endif
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+# define DBUS_GNUC_EXTENSION __extension__
+#else
+# define DBUS_GNUC_EXTENSION
+#endif
+
/* Normally docs are in .c files, but there isn't a .c file for this. */
/**
* @defgroup DBusMacros Utility macros
@@ -118,6 +124,12 @@
* Please don't use this in your own code, consider it
* D-Bus internal.
*/
+/**
+ * @def DBUS_GNUC_EXTENSION
+ *
+ * Tells gcc not to warn about extensions to the C standard in the
+ * following expression, even if compiling with -pedantic.
+ */
/** @} */