4 /* Number of bits in a `char'. */
6 #define CHAR_BIT __CHAR_BIT__
8 /* Maximum length of a multibyte character. */
13 /* Minimum and maximum values a `signed char' can hold. */
15 #define SCHAR_MIN (-SCHAR_MAX - 1)
17 #define SCHAR_MAX __SCHAR_MAX__
19 /* Maximum value an `unsigned char' can hold. (Minimum is 0). */
21 #if __SCHAR_MAX__ == __INT_MAX__
22 # define UCHAR_MAX (SCHAR_MAX * 2U + 1U)
24 # define UCHAR_MAX (SCHAR_MAX * 2 + 1)
27 /* Minimum and maximum values a `char' can hold. */
28 #ifdef __CHAR_UNSIGNED__
30 # if __SCHAR_MAX__ == __INT_MAX__
36 # define CHAR_MAX UCHAR_MAX
39 # define CHAR_MIN SCHAR_MIN
41 # define CHAR_MAX SCHAR_MAX
44 /* Minimum and maximum values a `signed short int' can hold. */
46 #define SHRT_MIN (-SHRT_MAX - 1)
48 #define SHRT_MAX __SHRT_MAX__
50 /* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
52 #if __SHRT_MAX__ == __INT_MAX__
53 # define USHRT_MAX (SHRT_MAX * 2U + 1U)
55 # define USHRT_MAX (SHRT_MAX * 2 + 1)
58 /* Minimum and maximum values a `signed int' can hold. */
60 #define INT_MIN (-INT_MAX - 1)
62 #define INT_MAX __INT_MAX__
64 /* Maximum value an `unsigned int' can hold. (Minimum is 0). */
66 #define UINT_MAX (INT_MAX * 2U + 1U)
68 /* Minimum and maximum values a `signed long int' can hold.
71 #define LONG_MIN (-LONG_MAX - 1L)
73 #define LONG_MAX __LONG_MAX__
75 /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
77 #define ULONG_MAX (LONG_MAX * 2UL + 1UL)
79 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
80 /* Minimum and maximum values a `signed long long int' can hold. */
82 # define LLONG_MIN (-LLONG_MAX - 1LL)
84 # define LLONG_MAX __LONG_LONG_MAX__
86 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
88 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
91 #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
92 /* Minimum and maximum values a `signed long long int' can hold. */
94 # define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
96 # define LONG_LONG_MAX __LONG_LONG_MAX__
98 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
99 # undef ULONG_LONG_MAX
100 # define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
103 #endif /* _LIMITS_H___ */