From: Simon McVittie Date: Wed, 10 Oct 2007 12:02:57 +0000 (+0100) Subject: Add macro DBUS_GNUC_EXTENSION (the same as GLib's G_GNUC_EXTENSION) X-Git-Tag: dbus-1.1.3~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b512e4ee74e9bd1606e01a48fde2a69ca10a96a;p=thirdparty%2Fdbus.git Add macro DBUS_GNUC_EXTENSION (the same as GLib's G_GNUC_EXTENSION) Part of a fix for bug 717. --- diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h index 461dff398..1ed6ea763 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. + */ /** @} */