gmacros: Mark G_UNAVAILABLE() functions as deprecated (gcc <= 4.4)
authorColin Walters <walters@verbum.org>
Wed, 3 Apr 2013 04:31:28 +0000 (00:31 -0400)
committerColin Walters <walters@verbum.org>
Wed, 3 Apr 2013 04:33:45 +0000 (00:33 -0400)
RHEL6 ships with GCC 4.4 by default, which doesn't understand the
nicer deprecated attribute that takes a message.  However, we can at
least fall back to the old G_DEPRECATED, rather than silently doing
nothing.

This gives me warning messages when building OSTree on RHEL6 when I
accidentally added a usage of g_unix_fd_source_new().

https://bugzilla.gnome.org/show_bug.cgi?id=697160

glib/gmacros.h

index 7c21717..6149067 100644 (file)
 #elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320)
 #define G_UNAVAILABLE(maj,min) __declspec(deprecated("is not available before " #maj "." #min))
 #else
-#define G_UNAVAILABLE(maj,min)
+#define G_UNAVAILABLE(maj,min) G_DEPRECATED
 #endif
 
 #ifndef _GLIB_EXTERN