aboutsummaryrefslogtreecommitdiff
path: root/X11/Xfuncproto.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'X11/Xfuncproto.h.in')
-rw-r--r--X11/Xfuncproto.h.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/X11/Xfuncproto.h.in b/X11/Xfuncproto.h.in
index 0d7b8b720..dc913face 100644
--- a/X11/Xfuncproto.h.in
+++ b/X11/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