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: Apparently the actual size of PATH_MAX is 260, but a space is
29 * required for the NUL. TODO: Test?
34 * Characteristics of the char data type.
36 * TODO: Is MB_LEN_MAX correct?
41 #define SCHAR_MIN (-128)
46 /* TODO: Is this safe? I think it might just be testing the preprocessor,
47 * not the compiler itself... */
49 #define CHAR_MIN SCHAR_MIN
50 #define CHAR_MAX SCHAR_MAX
53 #define CHAR_MAX UCHAR_MAX
57 * Maximum and minimum values for ints.
59 #define INT_MAX 2147483647
60 #define INT_MIN (-INT_MAX-1)
62 #define UINT_MAX 0xffffffff
65 * Maximum and minimum values for shorts.
67 #define SHRT_MAX 32767
68 #define SHRT_MIN (-SHRT_MAX-1)
70 #define USHRT_MAX 0xffff
73 * Maximum and minimum values for longs and unsigned longs.
75 * TODO: This is not correct for Alphas, which have 64 bit longs.
77 #define LONG_MAX 2147483647L
78 #define LONG_MIN (-LONG_MAX-1)
80 #define ULONG_MAX 0xffffffffUL
82 #ifndef __STRICT_ANSI__
83 /* POSIX wants this. */
84 #define SSIZE_MAX LONG_MAX
87 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
88 || !defined(__STRICT_ANSI__)
89 /* ISO C9x macro names */
90 #define LLONG_MAX 9223372036854775807LL
91 #define LLONG_MIN (-LLONG_MAX - 1)
92 #define ULLONG_MAX (2ULL * LLONG_MAX + 1)
96 * The GNU C compiler also allows 'long long int'
98 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
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 Strict ANSI and GNU C compiler */
112 #endif /* not _LIMITS_H_ */