diff --git a/clutter/clutter-macros.h b/clutter/clutter-macros.h index e38ec23a1..349269936 100644 --- a/clutter/clutter-macros.h +++ b/clutter/clutter-macros.h @@ -96,6 +96,12 @@ #define _CLUTTER_EXTERN extern #endif +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#define _CLUTTER_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x)) +#define _CLUTTER_DEPRECATED_MACRO _CLUTTER_GNUC_DO_PRAGMA(GCC warning "Deprecated macro") +#define _CLUTTER_DEPRECATED_MACRO_FOR(f) _CLUTTER_GNUC_DO_PRAGMA(GCC warning #f) +#endif + /* these macros are used to mark deprecated functions, and thus have to be * exposed in a public header. * @@ -106,10 +112,14 @@ #define CLUTTER_DEPRECATED _CLUTTER_EXTERN #define CLUTTER_DEPRECATED_FOR(f) _CLUTTER_EXTERN #define CLUTTER_UNAVAILABLE(maj,min) _CLUTTER_EXTERN +#define CLUTTER_DEPRECATED_MACRO +#define CLUTTER_DEPRECATED_MACRO_FOR(f) #else #define CLUTTER_DEPRECATED G_DEPRECATED _CLUTTER_EXTERN #define CLUTTER_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _CLUTTER_EXTERN #define CLUTTER_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _CLUTTER_EXTERN +#define CLUTTER_DEPRECATED_MACRO _CLUTTER_DEPRECATED_MACRO +#define CLUTTER_DEPRECATED_MACRO_FOR(f) _CLUTTER_DEPRECATED_MACRO_FOR(f) #endif #define CLUTTER_AVAILABLE_IN_ALL _CLUTTER_EXTERN @@ -341,9 +351,13 @@ #if CLUTTER_VERSION_MIN_REQUIRED >= CLUTTER_VERSION_1_24 # define CLUTTER_DEPRECATED_IN_1_24 CLUTTER_DEPRECATED # define CLUTTER_DEPRECATED_IN_1_24_FOR(f) CLUTTER_DEPRECATED_FOR(f) +# define CLUTTER_MACRO_DEPRECATED_IN_1_24 CLUTTER_DEPRECATED_MACRO +# define CLUTTER_MACRO_DEPRECATED_IN_1_24_FOR(f) CLUTTER_DEPRECATED_MACRO_FOR(f) #else # define CLUTTER_DEPRECATED_IN_1_24 _CLUTTER_EXTERN # define CLUTTER_DEPRECATED_IN_1_24_FOR(f) _CLUTTER_EXTERN +# define CLUTTER_MACRO_DEPRECATED_IN_1_24 +# define CLUTTER_MACRO_DEPRECATED_IN_1_24_FOR(f) #endif #if CLUTTER_VERSION_MAX_ALLOWED < CLUTTER_VERSION_1_24