summaryrefslogtreecommitdiff
path: root/fnmatch.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-13 10:21:41 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-13 10:21:41 -0400
commit1bdbf55cbf054bd2a4d0cd57b0a162522ce33a60 (patch)
treedf3bf7f26cf1dbf3a79a73d778efbfdaaccc55d1 /fnmatch.h
parentc486885ecda309759144ebad16ec4afd566e0bee (diff)
cause an error if _POSIX_C_SOURCE >= 200112L or _XOPEN_SOURCE >= 600 is defined without a C99 or better compiler
Diffstat (limited to 'fnmatch.h')
-rw-r--r--fnmatch.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fnmatch.h b/fnmatch.h
index 1b25d69..2b00d38 100644
--- a/fnmatch.h
+++ b/fnmatch.h
@@ -48,6 +48,14 @@ SOFTWARE.
# define _POSIX_SOURCE
#endif
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 19901L
+# if (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L)
+# error POSIX.1-2001 and later require a C99 compiler
+# elif (defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 600)
+# error XOPEN Issue 6 and later require a C99 compiler
+# endif
+#endif
+
#if (defined _POSIX_C_SOURCE && 2 <= _POSIX_C_SOURCE)
/* ./src/fnmatch/FNM_NOESCAPE.c */
#define FNM_NOESCAPE (1<<2)