diff options
author | Chad Versace <chad.versace@intel.com> | 2015-01-04 13:35:33 -0800 |
---|---|---|
committer | Chad Versace <chad.versace@intel.com> | 2015-01-27 09:36:05 -0800 |
commit | a235ac4bc60d7b6afea28138cd7848883b0a61a7 (patch) | |
tree | 7d88a119b0c35b6d4bcd1dfa632a15c57df4b7ba | |
parent | a72df8ffc5c2c2d99642a9a0311cbd96c5c5c1af (diff) |
include: Define macro WAFFLE_DEPRECATED_1_06
This macro annotates symbols as deprecated in Waffle 1.6. The compiler
emits deprecation warnings only if the user enables the feature macro
for the Waffle 1.6 API.
Emil provided the deprecation annotation for MSVC.
Signed-off-by: Chad Versace <chad.versace@intel.com>
Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl)
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | include/waffle/waffle.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h index 77885a4..f4bb6ef 100644 --- a/include/waffle/waffle.h +++ b/include/waffle/waffle.h @@ -36,6 +36,20 @@ extern "C" { #endif +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301) +# define WAFFLE_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +# define WAFFLE_DEPRECATED __declspec(deprecated) +#else +# define WAFFLE_DEPRECATED +#endif + +#if WAFFLE_API_VERSION >= 0x0106 +# define WAFFLE_DEPRECATED_1_06 WAFFLE_DEPRECATED +#else +# define WAFFLE_DEPRECATED_1_06 +#endif + struct waffle_display; struct waffle_config; struct waffle_context; |