summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-19 13:14:34 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-22 14:30:27 -0700
commit9a9382de9036fc0f3b5555ee4d340c7dd234c424 (patch)
tree0537efa9f6d2227fe7d74d945cf7936f17da029e
parent34a95f725c200b9aedc8c634851474d9bcce712e (diff)
downloadxorg-proto-x11proto-9a9382de9036fc0f3b5555ee4d340c7dd234c424.tar.gz
Xfuncproto: Add support for _X_DEPRECATED_MSG() macro
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--Xfuncproto.h.in8
1 files changed, 8 insertions, 0 deletions
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)) \