[PATCH x11proto] Add _X_DEPRECATED_MSG macro

Mikhail Gusarov dottedmag at dottedmag.net
Mon Sep 13 13:10:52 PDT 2010


This macro is to be used to point out how to replace deprecated functionality.
---
 Xfuncproto.h.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
index 0177119..96e2b34 100644
--- a/Xfuncproto.h.in
+++ b/Xfuncproto.h.in
@@ -113,8 +113,10 @@ in this Software without prior written authorization from The Open Group.
 
 #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
 # define _X_DEPRECATED  __attribute__((deprecated))
+# define _X_DEPRECATED_MSG(msg) __attribute__((deprecated, warning(msg)))
 #else /* not gcc >= 3.1 */
 # define _X_DEPRECATED
+# define _X_DEPRECATED_MSG(msg)
 #endif
 
 #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
-- 
1.7.1



More information about the xorg-devel mailing list