2 #ifndef _MACH_MACHLIMITS_H_
4 /* _MACH_MACHLIMITS_H_ is used on OSF/1. */
6 #define _MACH_MACHLIMITS_H_
8 /* Number of bits in a `char'. */
12 /* Maximum length of a multibyte character. */
17 /* Minimum and maximum values a `signed char' can hold. */
19 #define SCHAR_MIN (-128)
23 /* Maximum value an `unsigned char' can hold. (Minimum is 0). */
27 /* Minimum and maximum values a `char' can hold. */
28 #ifdef __CHAR_UNSIGNED__
35 #define CHAR_MIN (-128)
40 /* Minimum and maximum values a `signed short int' can hold. */
42 /* For the sake of 16 bit hosts, we may not use -32768 */
43 #define SHRT_MIN (-32767-1)
45 #define SHRT_MAX 32767
47 /* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
49 #define USHRT_MAX 65535
51 /* Minimum and maximum values a `signed int' can hold. */
53 #define __INT_MAX__ 2147483647
56 #define INT_MIN (-INT_MAX-1)
58 #define INT_MAX __INT_MAX__
60 /* Maximum value an `unsigned int' can hold. (Minimum is 0). */
62 #define UINT_MAX (INT_MAX * 2U + 1)
64 /* Minimum and maximum values a `signed long int' can hold.
67 #if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) || defined (__sparcv9)
68 #define __LONG_MAX__ 9223372036854775807L
70 #define __LONG_MAX__ 2147483647L
71 #endif /* __alpha__ || sparc64 */
74 #define LONG_MIN (-LONG_MAX-1)
76 #define LONG_MAX __LONG_MAX__
78 /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
80 #define ULONG_MAX (LONG_MAX * 2UL + 1)
82 #ifndef __LONG_LONG_MAX__
83 #define __LONG_LONG_MAX__ 9223372036854775807LL
86 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
87 /* Minimum and maximum values a `signed long long int' can hold. */
89 #define LLONG_MIN (-LLONG_MAX-1)
91 #define LLONG_MAX __LONG_LONG_MAX__
93 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
95 #define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
98 #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
99 /* Minimum and maximum values a `signed long long int' can hold. */
101 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
103 #define LONG_LONG_MAX __LONG_LONG_MAX__
105 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
106 #undef ULONG_LONG_MAX
107 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
110 #endif /* _MACH_MACHLIMITS_H_ */
111 #endif /* _LIMITS_H___ */