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



commit d1bbab5689064e23732a132aa53de360d3e59383
Author: Colin Walters <walters verbum org>
Date:   Wed Apr 3 00:31:28 2013 -0400

    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

 glib/gmacros.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gmacros.h b/glib/gmacros.h
index 7c21717..6149067 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -321,7 +321,7 @@
 #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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]