3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
7 * Functions for manipulating paths and directories (included from io.h)
8 * plus functions for setting the current drive.
10 * Defines constants for the sizes of integral types.
12 * NOTE: GCC should supply a version of this header and it should be safe to
13 * use that version instead of this one (maybe safer).
20 /* All the headers include this file. */
26 * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
27 * same as FILENAME_MAX and FOPEN_MAX from stdio.h?
28 * NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two
29 * are semantically identical, with a limit of 259 characters for the
30 * path name, plus one for a terminating NUL, for a total of 260.
35 * Characteristics of the char data type.
37 * TODO: Is MB_LEN_MAX correct?
42 #define SCHAR_MIN (-128)
47 /* TODO: Is this safe? I think it might just be testing the preprocessor,
48 * not the compiler itself... */
50 #define CHAR_MIN SCHAR_MIN
51 #define CHAR_MAX SCHAR_MAX
54 #define CHAR_MAX UCHAR_MAX
58 * Maximum and minimum values for ints.
60 #define INT_MAX 2147483647
61 #define INT_MIN (-INT_MAX-1)
63 #define UINT_MAX 0xffffffff
66 * Maximum and minimum values for shorts.
68 #define SHRT_MAX 32767
69 #define SHRT_MIN (-SHRT_MAX-1)
71 #define USHRT_MAX 0xffff
74 * Maximum and minimum values for longs and unsigned longs.
76 * TODO: This is not correct for Alphas, which have 64 bit longs.
78 #define LONG_MAX 2147483647L
79 #define LONG_MIN (-LONG_MAX-1)
81 #define ULONG_MAX 0xffffffffUL
83 #ifndef __STRICT_ANSI__
84 /* POSIX wants this. */
85 #define SSIZE_MAX LONG_MAX
88 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
89 || !defined(__STRICT_ANSI__)
90 /* ISO C9x macro names */
91 #define LLONG_MAX 9223372036854775807LL
92 #define LLONG_MIN (-LLONG_MAX - 1)
93 #define ULLONG_MAX (2ULL * LLONG_MAX + 1)
97 * The GNU C compiler also allows 'long long int'
99 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
101 #define LONG_LONG_MAX 9223372036854775807LL
102 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
103 #define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
105 /* MSVC compatibility */
106 #define _I64_MIN LONG_LONG_MIN
107 #define _I64_MAX LONG_LONG_MAX
108 #define _UI64_MAX ULONG_LONG_MAX
110 #endif /* Not Strict ANSI and GNU C compiler */
113 #endif /* not _LIMITS_H_ */