summaryrefslogtreecommitdiffstats
path: root/Source/cmStandardLexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmStandardLexer.h')
-rw-r--r--Source/cmStandardLexer.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h
index 13f7622..55d23c1 100644
--- a/Source/cmStandardLexer.h
+++ b/Source/cmStandardLexer.h
@@ -3,6 +3,19 @@
#ifndef cmStandardLexer_h
#define cmStandardLexer_h
+#if !defined(_WIN32) && !defined(__sun)
+/* POSIX APIs are needed */
+# define _POSIX_C_SOURCE 200809L
+#endif
+#if defined(__sun) && defined(__GNUC__) && !defined(__cplusplus)
+/* C sources: for fileno and strdup */
+# define _XOPEN_SOURCE 600
+#endif
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+/* For isascii */
+# define _XOPEN_SOURCE 700
+#endif
+
#include "cmsys/Configure.h" // IWYU pragma: keep
/* Disable some warnings. */