1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: 15: 16: 17: 18:
19:
20: #ifndef _LIMITS_
21: #define _LIMITS_
22:
23:
24: #define CHAR_BIT (8)
25: #define SCHAR_MIN (-128)
26: #define SCHAR_MAX (+127)
27: #define UCHAR_MAX (255)
28: #define CHAR_MIN SCHAR_MIN
29: #define CHAR_MAX SCHAR_MAX
30: #define MB_LEN_MAX (2)
31:
32: #define SHRT_MIN (-32768)
33: #define SHRT_MAX (+32767)
34: #define USHRT_MAX (65535)
35:
36: #define LONG_MIN (-2147483648L)
37: #define LONG_MAX (+2147483647L)
38: #define ULONG_MAX (4294967295L)
39:
40:
41: #if INT_BITWIDTH == 16
42:
43: #define INT_MIN SHRT_MIN
44: #define INT_MAX SHRT_MAX
45: #define UINT_MAX USHRT_MAX
46:
47: #else
48:
49: #define INT_MIN LONG_MIN
50: #define INT_MAX LONG_MAX
51: #define UINT_MAX ULONG_MAX
52:
53: #endif
54: #endif