Add macro DBUS_GNUC_EXTENSION (the same as GLib's G_GNUC_EXTENSION)
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 10 Oct 2007 12:02:57 +0000 (13:02 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 11 Oct 2007 09:06:45 +0000 (10:06 +0100)
Part of a fix for bug 717.

dbus/dbus-macros.h

index 461dff3..1ed6ea7 100644 (file)
 #  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
  * 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.
+ */
 
 /** @} */