4 /* Number of bits in a `char'. */
8 /* Maximum length of a multibyte character. */
13 /* Minimum and maximum values a `signed char' can hold. */
15 #define SCHAR_MIN (-128)
19 /* Maximum value an `unsigned char' can hold. (Minimum is 0). */
23 /* Minimum and maximum values a `char' can hold. */
24 #ifdef __CHAR_UNSIGNED__
31 #define CHAR_MIN (-128)
37 #define __SHRT_MAX__ 32767
40 /* Minimum and maximum values a `signed short int' can hold. */
42 #define SHRT_MIN (-SHRT_MAX-1)
44 #define SHRT_MAX __SHRT_MAX__
46 /* Minimum and maximum values a `signed int' can hold. */
48 #define __INT_MAX__ 2147483647
51 #define INT_MIN (-INT_MAX-1)
53 #define INT_MAX __INT_MAX__
55 /* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
57 #if __SHRT_MAX__ == __INT_MAX__
58 #define USHRT_MAX (SHRT_MAX * 2U + 1U)
60 #define USHRT_MAX (SHRT_MAX * 2 + 1)
63 /* Maximum value an `unsigned int' can hold. (Minimum is 0). */
65 #define UINT_MAX (INT_MAX * 2U + 1)
67 /* Minimum and maximum values a `signed long int' can hold.
70 #if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) || defined (__sparcv9)
71 #define __LONG_MAX__ 9223372036854775807L
73 #define __LONG_MAX__ 2147483647L
74 #endif /* __alpha__ || sparc64 */
77 #define LONG_MIN (-LONG_MAX-1)
79 #define LONG_MAX __LONG_MAX__
81 /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
83 #define ULONG_MAX (LONG_MAX * 2UL + 1)
85 #ifndef __LONG_LONG_MAX__
86 #define __LONG_LONG_MAX__ 9223372036854775807LL
89 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
90 /* Minimum and maximum values a `signed long long int' can hold. */
92 #define LLONG_MIN (-LLONG_MAX-1)
94 #define LLONG_MAX __LONG_LONG_MAX__
96 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
98 #define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
101 #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
102 /* Minimum and maximum values a `signed long long int' can hold. */
104 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
106 #define LONG_LONG_MAX __LONG_LONG_MAX__
108 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
109 #undef ULONG_LONG_MAX
110 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
113 #endif /* _LIMITS_H___ */