[PATCH xproto 3/4] Xfuncproto: Add support for _X_DEPRECATED_MSG() macro
Jeremy Huddleston Sequoia
jeremyhu at apple.com
Mon Sep 19 20:23:00 UTC 2016
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
---
Xfuncproto.h.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
index 7f06e99..8a9530a 100644
--- a/Xfuncproto.h.in
+++ b/Xfuncproto.h.in
@@ -137,6 +137,14 @@ in this Software without prior written authorization from The Open Group.
# define _X_DEPRECATED
#endif
+/* requires xproto >= 7.0.30 */
+#if __has_extension(attribute_deprecated_with_message) || \
+ (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
+# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg)))
+#else
+# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED
+#endif
+
/* requires xproto >= 7.0.17 */
#if __has_attribute(noreturn) \
|| (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
--
2.10.0 (Apple Git-77)
More information about the xorg-devel
mailing list