summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-10-07 19:19:16 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-10-07 19:19:16 +0000
commiteebaa71c092cacd2f3eaaf85fc06578bf1787043 (patch)
tree1b2659137ff480ceebcd0596d20353fcda32fa82 /proto
parent67bbc56a5e52156c131aabd1739ef3940d53f155 (diff)
Merge from X.Org git: fix build for m68k architectures.
Problem reported and fix confirmed to work by Nick@.
Diffstat (limited to 'proto')
-rw-r--r--proto/x11proto/Xfuncproto.h.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/x11proto/Xfuncproto.h.in b/proto/x11proto/Xfuncproto.h.in
index 0d7b8b720..dc913face 100644
--- a/proto/x11proto/Xfuncproto.h.in
+++ b/proto/x11proto/Xfuncproto.h.in
@@ -128,10 +128,12 @@ in this Software without prior written authorization from The Open Group.
# define _X_ATTRIBUTE_PRINTF(x,y)
#endif
-/* requires xproto >= 7.0.22 */
+/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
+ argument macros, must be only used inside #ifdef _X_NONNULL guards, as
+ many legacy X clients are compiled in C89 mode still. */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
#define _X_NONNULL(args...) __attribute__((nonnull(args)))
-#else
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
#define _X_NONNULL(...) /* */
#endif