summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-05-23 16:01:02 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-05-25 18:36:19 -0700
commitb283f6cba77987b215556f80b6b2f1da45672d8b (patch)
tree4adb2db83156d6c63d589f48a5b373f56abf8d34
parent217d1dae0093ccaaac59a4fa42000e732492cb66 (diff)
downloadxorg-proto-x11proto-b283f6cba77987b215556f80b6b2f1da45672d8b.tar.gz
Add comments to Xfuncproto.h noting required xproto versions for each macro
Saves time trawling git logs to determine what to put in the call to PKG_CHECK_MODULES in configure.ac when you start using one of these. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Cyril Brulebois <kibi@debian.org>
-rw-r--r--Xfuncproto.h.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
index 39ca3b2..0d7b8b7 100644
--- a/Xfuncproto.h.in
+++ b/Xfuncproto.h.in
@@ -75,12 +75,14 @@ in this Software without prior written authorization from The Open Group.
#endif
#endif /* _XFUNCPROTOBEGIN */
+/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && (__GNUC__ >= 4)
# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
#else
# define _X_SENTINEL(x)
#endif /* GNUC >= 4 */
+/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__)
# define _X_EXPORT __attribute__((visibility("default")))
# define _X_HIDDEN __attribute__((visibility("hidden")))
@@ -95,6 +97,7 @@ in this Software without prior written authorization from The Open Group.
# define _X_INTERNAL
#endif /* GNUC >= 4 */
+/* requires xproto >= 7.0.9 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
@@ -103,12 +106,14 @@ in this Software without prior written authorization from The Open Group.
# define _X_UNLIKELY(x) (x)
#endif
+/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
# define _X_DEPRECATED __attribute__((deprecated))
#else /* not gcc >= 3.1 */
# define _X_DEPRECATED
#endif
+/* requires xproto >= 7.0.17 */
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define _X_NORETURN __attribute((noreturn))
@@ -116,18 +121,21 @@ in this Software without prior written authorization from The Open Group.
# define _X_NORETURN
#endif /* GNUC */
+/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
#else /* not gcc >= 2.3 */
# define _X_ATTRIBUTE_PRINTF(x,y)
#endif
+/* requires xproto >= 7.0.22 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
#define _X_NONNULL(args...) __attribute__((nonnull(args)))
#else
#define _X_NONNULL(...) /* */
#endif
+/* requires xproto >= 7.0.22 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
#define _X_UNUSED __attribute__((__unused__))
#else
@@ -135,6 +143,8 @@ in this Software without prior written authorization from The Open Group.
#endif
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
+/* requires xproto >= 7.0.9
+ (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */
#if defined(inline) /* assume autoconf set it correctly */ || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \
(defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
@@ -146,6 +156,7 @@ in this Software without prior written authorization from The Open Group.
#endif
/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
+/* requires xproto >= 7.0.21 */
#ifndef _X_RESTRICT_KYWD
# if defined(restrict) /* assume autoconf set it correctly */ || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */