tccpp: tcc_warning("extra tokens after directive")
[tinycc.git] / win32 / include / limits.h
blob498e02e4f4447504536b3b6715b9b858863f0167
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #include <_mingw.h>
8 #ifndef _INC_LIMITS
9 #define _INC_LIMITS
12 * File system limits
14 * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
15 * same as FILENAME_MAX and FOPEN_MAX from stdio.h?
16 * NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
17 * required for the NUL. TODO: Test?
19 #define PATH_MAX (259)
21 #define CHAR_BIT 8
22 #define SCHAR_MIN (-128)
23 #define SCHAR_MAX 127
24 #define UCHAR_MAX 0xff
26 #ifndef __CHAR_UNSIGNED__
27 #define CHAR_MIN SCHAR_MIN
28 #define CHAR_MAX SCHAR_MAX
29 #else
30 #define CHAR_MIN 0
31 #define CHAR_MAX UCHAR_MAX
32 #endif
34 #define MB_LEN_MAX 5
35 #define SHRT_MIN (-32768)
36 #define SHRT_MAX 32767
37 #define USHRT_MAX 0xffff
38 #define INT_MIN (-2147483647 - 1)
39 #define INT_MAX 2147483647
40 #define UINT_MAX 0xffffffff
41 #define LONG_MIN (-2147483647L - 1)
42 #define LONG_MAX 2147483647L
43 #define ULONG_MAX 0xffffffffUL
44 #define LLONG_MAX 9223372036854775807ll
45 #define LLONG_MIN (-9223372036854775807ll - 1)
46 #define ULLONG_MAX 0xffffffffffffffffull
48 #if _INTEGRAL_MAX_BITS >= 8
49 #define _I8_MIN (-127 - 1)
50 #define _I8_MAX 127i8
51 #define _UI8_MAX 0xffu
52 #endif
54 #if _INTEGRAL_MAX_BITS >= 16
55 #define _I16_MIN (-32767 - 1)
56 #define _I16_MAX 32767i16
57 #define _UI16_MAX 0xffffu
58 #endif
60 #if _INTEGRAL_MAX_BITS >= 32
61 #define _I32_MIN (-2147483647 - 1)
62 #define _I32_MAX 2147483647
63 #define _UI32_MAX 0xffffffffu
64 #endif
66 #if defined(__GNUC__)
67 #undef LONG_LONG_MAX
68 #define LONG_LONG_MAX 9223372036854775807ll
69 #undef LONG_LONG_MIN
70 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
71 #undef ULONG_LONG_MAX
72 #define ULONG_LONG_MAX (2ull * LONG_LONG_MAX + 1ull)
73 #endif
75 #if _INTEGRAL_MAX_BITS >= 64
76 #define _I64_MIN (-9223372036854775807ll - 1)
77 #define _I64_MAX 9223372036854775807ll
78 #define _UI64_MAX 0xffffffffffffffffull
79 #endif
81 #ifndef SIZE_MAX
82 #ifdef _WIN64
83 #define SIZE_MAX _UI64_MAX
84 #else
85 #define SIZE_MAX UINT_MAX
86 #endif
87 #endif
89 #ifdef _POSIX_
90 #define _POSIX_ARG_MAX 4096
91 #define _POSIX_CHILD_MAX 6
92 #define _POSIX_LINK_MAX 8
93 #define _POSIX_MAX_CANON 255
94 #define _POSIX_MAX_INPUT 255
95 #define _POSIX_NAME_MAX 14
96 #define _POSIX_NGROUPS_MAX 0
97 #define _POSIX_OPEN_MAX 16
98 #define _POSIX_PATH_MAX 255
99 #define _POSIX_PIPE_BUF 512
100 #define _POSIX_SSIZE_MAX 32767
101 #define _POSIX_STREAM_MAX 8
102 #define _POSIX_TZNAME_MAX 3
103 #define ARG_MAX 14500
104 #define LINK_MAX 1024
105 #define MAX_CANON _POSIX_MAX_CANON
106 #define MAX_INPUT _POSIX_MAX_INPUT
107 #define NAME_MAX 255
108 #define NGROUPS_MAX 16
109 #define OPEN_MAX 32
110 #define PATH_MAX 512
111 #define PIPE_BUF _POSIX_PIPE_BUF
112 #define SSIZE_MAX _POSIX_SSIZE_MAX
113 #define STREAM_MAX 20
114 #define TZNAME_MAX 10
115 #endif
116 #endif