3 * Copyright 2012, 2013 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
26 #pragma GCC system_header
30 * Functions for manipulating paths and directories (included from io.h)
31 * plus functions for setting the current drive.
33 * Defines constants for the sizes of integral types.
35 * NOTE: GCC should supply a version of this header and it should be safe to
36 * use that version instead of this one (maybe safer).
42 * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
43 * same as FILENAME_MAX and FOPEN_MAX from stdio.h?
44 * NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two
45 * are semantically identical, with a limit of 259 characters for the
46 * path name, plus one for a terminating NUL, for a total of 260.
51 * Characteristics of the char data type.
53 * TODO: Is MB_LEN_MAX correct?
58 #define SCHAR_MIN (-128)
63 #ifndef _CHAR_UNSIGNED
64 #define CHAR_MIN SCHAR_MIN
65 #define CHAR_MAX SCHAR_MAX
68 #define CHAR_MAX UCHAR_MAX
72 * Maximum and minimum values for ints.
74 #define INT_MAX 2147483647
75 #define INT_MIN (-INT_MAX-1)
77 #define UINT_MAX 0xffffffff
80 * Maximum and minimum values for shorts.
82 #define SHRT_MAX 32767
83 #define SHRT_MIN (-SHRT_MAX-1)
85 #define USHRT_MAX 0xffff
88 * Maximum and minimum values for longs and unsigned longs.
90 #define LONG_MAX 2147483647L
91 #define LONG_MIN (-LONG_MAX-1)
92 #define ULONG_MAX 0xffffffffUL
94 #define SSIZE_MAX LONG_MAX
96 #define LLONG_MAX 9223372036854775807LL
97 #define LLONG_MIN (-LLONG_MAX - 1)
98 #define ULLONG_MAX (2ULL * LLONG_MAX + 1)
100 #define LONG_LONG_MAX 9223372036854775807LL
101 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
102 #define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
104 /* MSVC compatibility */
105 #define _I64_MIN LONG_LONG_MIN
106 #define _I64_MAX LONG_LONG_MAX
107 #define _UI64_MAX ULONG_LONG_MAX
109 #endif /* not _LIMITS_H */