CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / cmStandardLexer.h
blob27225280d6f8b4287c31cfc8e9d67f0fd7ea4cc2
1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #pragma once
5 #if defined(__linux)
6 /* Needed for glibc < 2.12 */
7 // NOLINTNEXTLINE(bugprone-reserved-identifier)
8 # define _XOPEN_SOURCE 600
9 #endif
10 #if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun) && \
11 !defined(__OpenBSD__)
12 /* POSIX APIs are needed */
13 // NOLINTNEXTLINE(bugprone-reserved-identifier)
14 # define _POSIX_C_SOURCE 200809L
15 #endif
16 #if defined(__sun) && defined(__GNUC__) && !defined(__cplusplus)
17 /* C sources: for fileno and strdup */
18 // NOLINTNEXTLINE(bugprone-reserved-identifier)
19 # define _XOPEN_SOURCE 600
20 #endif
21 #if defined(__FreeBSD__) || defined(__NetBSD__)
22 /* For isascii */
23 // NOLINTNEXTLINE(bugprone-reserved-identifier)
24 # define _XOPEN_SOURCE 700
25 #endif
27 #include "cmsys/Configure.h" // IWYU pragma: keep
29 /* Disable some warnings. */
30 #if defined(_MSC_VER)
31 # pragma warning(disable : 4018)
32 # pragma warning(disable : 4127)
33 # pragma warning(disable : 4131)
34 # pragma warning(disable : 4244)
35 # pragma warning(disable : 4251)
36 # pragma warning(disable : 4267)
37 # pragma warning(disable : 4305)
38 # pragma warning(disable : 4309)
39 # pragma warning(disable : 4706)
40 # pragma warning(disable : 4786)
41 #endif
43 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
44 # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
45 # pragma GCC diagnostic ignored "-Wconversion"
46 # pragma GCC diagnostic ignored "-Wsign-compare"
47 # endif
48 # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 403
49 # pragma GCC diagnostic ignored "-Wsign-conversion"
50 # endif
51 #endif
53 #if defined(__LCC__)
54 # pragma diag_suppress 1873 /* comparison between signed and unsigned */
55 #endif
57 #if defined(__NVCOMPILER)
58 # pragma diag_suppress 111 /* statement is unreachable */
59 # pragma diag_suppress 550 /* variable set but never used */
60 #endif
62 /* Make sure isatty is available. */
63 #if defined(_WIN32) && !defined(__CYGWIN__)
64 # include <io.h>
65 # if defined(_MSC_VER)
66 # define isatty _isatty
67 # endif
68 #else
69 # include <unistd.h> // IWYU pragma: export
70 #endif
72 /* Make sure malloc and free are available on QNX. */
73 #ifdef __QNX__
74 # include <malloc.h>
75 #endif
77 /* Disable features we do not need. */
78 #define YY_NEVER_INTERACTIVE 1
79 #define YY_NO_INPUT 1
80 #define YY_NO_UNPUT 1
81 #define ECHO
83 #include <cm3p/kwiml/int.h>
84 typedef KWIML_INT_int8_t flex_int8_t;
85 typedef KWIML_INT_uint8_t flex_uint8_t;
86 typedef KWIML_INT_int16_t flex_int16_t;
87 typedef KWIML_INT_uint16_t flex_uint16_t;
88 typedef KWIML_INT_int32_t flex_int32_t;
89 typedef KWIML_INT_uint32_t flex_uint32_t;