[waffle] [PATCH 01/17] include: Define macro WAFFLE_DEPRECATED_1_06
Chad Versace
chad.versace at intel.com
Sun Jan 4 14:02:54 PST 2015
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.
Signed-off-by: Chad Versace <chad.versace at intel.com>
---
include/waffle/waffle.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
index e04b23f..afec630 100644
--- a/include/waffle/waffle.h
+++ b/include/waffle/waffle.h
@@ -36,6 +36,18 @@
extern "C" {
#endif
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
+# define WAFFLE_DEPRECATED __attribute__((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;
--
2.2.0
More information about the waffle
mailing list