1da8c9844077936ba5cd07cd28da3e07b802b890
[platform/upstream/cmake.git] / Source / cmStandardLexer.h
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
4
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 /* POSIX APIs are needed */
12 // NOLINTNEXTLINE(bugprone-reserved-identifier)
13 #  define _POSIX_C_SOURCE 200809L
14 #endif
15 #if defined(__sun) && defined(__GNUC__) && !defined(__cplusplus)
16 /* C sources: for fileno and strdup */
17 // NOLINTNEXTLINE(bugprone-reserved-identifier)
18 #  define _XOPEN_SOURCE 600
19 #endif
20 #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
21 /* For isascii */
22 // NOLINTNEXTLINE(bugprone-reserved-identifier)
23 #  define _XOPEN_SOURCE 700
24 #endif
25
26 #include "cmsys/Configure.h" // IWYU pragma: keep
27
28 /* Disable some warnings.  */
29 #if defined(_MSC_VER)
30 #  pragma warning(disable : 4018)
31 #  pragma warning(disable : 4127)
32 #  pragma warning(disable : 4131)
33 #  pragma warning(disable : 4244)
34 #  pragma warning(disable : 4251)
35 #  pragma warning(disable : 4267)
36 #  pragma warning(disable : 4305)
37 #  pragma warning(disable : 4309)
38 #  pragma warning(disable : 4706)
39 #  pragma warning(disable : 4786)
40 #endif
41
42 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
43 #  if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
44 #    pragma GCC diagnostic ignored "-Wconversion"
45 #    pragma GCC diagnostic ignored "-Wsign-compare"
46 #  endif
47 #  if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 403
48 #    pragma GCC diagnostic ignored "-Wsign-conversion"
49 #  endif
50 #endif
51
52 /* Make sure isatty is available. */
53 #if defined(_WIN32) && !defined(__CYGWIN__)
54 #  include <io.h>
55 #  if defined(_MSC_VER)
56 #    define isatty _isatty
57 #  endif
58 #else
59 #  include <unistd.h> // IWYU pragma: export
60 #endif
61
62 /* Make sure malloc and free are available on QNX.  */
63 #ifdef __QNX__
64 #  include <malloc.h>
65 #endif
66
67 /* Disable features we do not need. */
68 #define YY_NEVER_INTERACTIVE 1
69 #define YY_NO_INPUT 1
70 #define YY_NO_UNPUT 1
71 #define ECHO
72
73 #include <cm3p/kwiml/int.h>
74 typedef KWIML_INT_int8_t flex_int8_t;
75 typedef KWIML_INT_uint8_t flex_uint8_t;
76 typedef KWIML_INT_int16_t flex_int16_t;
77 typedef KWIML_INT_uint16_t flex_uint16_t;
78 typedef KWIML_INT_int32_t flex_int32_t;
79 typedef KWIML_INT_uint32_t flex_uint32_t;