From 11de54927d8529b1b34076ccb991595d9acf8fdc Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 20 Feb 2012 16:19:31 +0000 Subject: [PATCH] gmacros: Add G_GNUC_UNAVAILABLE A macro to annotate a function as not available, when compiling with GCC. --- glib/gmacros.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/glib/gmacros.h b/glib/gmacros.h index e07610ccb..bfa7b4cbe 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -138,6 +138,13 @@ #define G_GNUC_WARN_UNUSED_RESULT #endif /* __GNUC__ */ +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#define G_GNUC_UNAVAILABLE __attribute__((unavailable)) +#else +#define G_GNUC_UNAVAILABLE +#endif /* __GNUC__ */ + + #ifndef G_DISABLE_DEPRECATED /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with * macros, so we can refer to them as strings unconditionally.