gmacros: Mark G_UNAVAILABLE() functions as deprecated (gcc <= 4.4)

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
This commit is contained in:
Colin Walters 2013-04-03 00:31:28 -04:00
parent 3456152f23
commit d1bbab5689

View File

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