Commit a235ac4b authored by Chad Versace's avatar Chad Versace

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: default avatarChad Versace <chad.versace@intel.com>
Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl)
Reviewed-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
parent a72df8ff
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment