]>
Commit | Line | Data |
---|---|---|
37797282 | 1 | #ifndef _LIMITS_H___ |
f8fcec3a RS |
2 | #ifndef _MACH_MACHLIMITS_H_ |
3 | ||
bf4400c2 | 4 | /* _MACH_MACHLIMITS_H_ is used on OSF/1. */ |
37797282 | 5 | #define _LIMITS_H___ |
f8fcec3a RS |
6 | #define _MACH_MACHLIMITS_H_ |
7 | ||
dcaaea92 MM |
8 | /* Number of bits in a `char'. */ |
9 | #undef CHAR_BIT | |
10 | #define CHAR_BIT 8 | |
11 | ||
706fdb45 ILT |
12 | /* Maximum length of a multibyte character. */ |
13 | #ifndef MB_LEN_MAX | |
dcaaea92 | 14 | #define MB_LEN_MAX 1 |
706fdb45 | 15 | #endif |
dcaaea92 MM |
16 | |
17 | /* Minimum and maximum values a `signed char' can hold. */ | |
18 | #undef SCHAR_MIN | |
19 | #define SCHAR_MIN (-128) | |
20 | #undef SCHAR_MAX | |
21 | #define SCHAR_MAX 127 | |
22 | ||
23 | /* Maximum value an `unsigned char' can hold. (Minimum is 0). */ | |
24 | #undef UCHAR_MAX | |
25 | #define UCHAR_MAX 255 | |
26 | ||
27 | /* Minimum and maximum values a `char' can hold. */ | |
28 | #ifdef __CHAR_UNSIGNED__ | |
29 | #undef CHAR_MIN | |
30 | #define CHAR_MIN 0 | |
31 | #undef CHAR_MAX | |
32 | #define CHAR_MAX 255 | |
33 | #else | |
34 | #undef CHAR_MIN | |
35 | #define CHAR_MIN (-128) | |
36 | #undef CHAR_MAX | |
37 | #define CHAR_MAX 127 | |
38 | #endif | |
39 | ||
40 | /* Minimum and maximum values a `signed short int' can hold. */ | |
41 | #undef SHRT_MIN | |
42 | #define SHRT_MIN (-32768) | |
43 | #undef SHRT_MAX | |
44 | #define SHRT_MAX 32767 | |
45 | ||
46 | /* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ | |
47 | #undef USHRT_MAX | |
48 | #define USHRT_MAX 65535 | |
49 | ||
50 | /* Minimum and maximum values a `signed int' can hold. */ | |
96f56dcd DE |
51 | #ifndef __INT_MAX__ |
52 | #define __INT_MAX__ 2147483647 | |
53 | #endif | |
dcaaea92 MM |
54 | #undef INT_MIN |
55 | #define INT_MIN (-INT_MAX-1) | |
56 | #undef INT_MAX | |
bd90e97e | 57 | #define INT_MAX __INT_MAX__ |
dcaaea92 MM |
58 | |
59 | /* Maximum value an `unsigned int' can hold. (Minimum is 0). */ | |
60 | #undef UINT_MAX | |
d91f5bfa | 61 | #define UINT_MAX (INT_MAX * 2U + 1) |
dcaaea92 MM |
62 | |
63 | /* Minimum and maximum values a `signed long int' can hold. | |
64 | (Same as `int'). */ | |
96f56dcd DE |
65 | #ifndef __LONG_MAX__ |
66 | #define __LONG_MAX__ 2147483647L | |
67 | #endif | |
dcaaea92 MM |
68 | #undef LONG_MIN |
69 | #define LONG_MIN (-LONG_MAX-1) | |
70 | #undef LONG_MAX | |
bd90e97e | 71 | #define LONG_MAX __LONG_MAX__ |
dcaaea92 MM |
72 | |
73 | /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */ | |
74 | #undef ULONG_MAX | |
d91f5bfa | 75 | #define ULONG_MAX (LONG_MAX * 2UL + 1) |
f8fcec3a | 76 | |
a28528f2 | 77 | #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__) |
3eb2ae15 | 78 | /* Minimum and maximum values a `signed long long int' can hold. */ |
96f56dcd DE |
79 | #ifndef __LONG_LONG_MAX__ |
80 | #define __LONG_LONG_MAX__ 9223372036854775807LL | |
81 | #endif | |
3eb2ae15 RS |
82 | #undef LONG_LONG_MIN |
83 | #define LONG_LONG_MIN (-LONG_LONG_MAX-1) | |
84 | #undef LONG_LONG_MAX | |
bd90e97e | 85 | #define LONG_LONG_MAX __LONG_LONG_MAX__ |
3eb2ae15 RS |
86 | |
87 | /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */ | |
88 | #undef ULONG_LONG_MAX | |
d91f5bfa | 89 | #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1) |
3eb2ae15 RS |
90 | #endif |
91 | ||
f8fcec3a | 92 | #endif /* _MACH_MACHLIMITS_H_ */ |
37797282 | 93 | #endif /* _LIMITS_H___ */ |