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_v9__) || 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 #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
83 /* Minimum and maximum values a `signed long long int' can hold. */
84 #ifndef __LONG_LONG_MAX__
85 #define __LONG_LONG_MAX__ 9223372036854775807LL
88 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
90 #define LONG_LONG_MAX __LONG_LONG_MAX__
92 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
94 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
97 #endif /* _MACH_MACHLIMITS_H_ */
98 #endif /* _LIMITS_H___ */