10 typedef signed char int8_t;
11 typedef signed short int16_t;
12 typedef signed int int32_t;
13 typedef signed long long int64_t;
15 typedef unsigned char uint8_t;
16 typedef unsigned short uint16_t;
17 typedef unsigned int uint32_t;
18 typedef unsigned long long uint64_t;
22 typedef signed char int_least8_t;
23 typedef signed short int_least16_t;
24 typedef signed int int_least32_t;
25 typedef signed long long int_least64_t;
27 typedef unsigned char uint_least8_t;
28 typedef unsigned short uint_least16_t;
29 typedef unsigned int uint_least32_t;
30 typedef unsigned long long uint_least64_t;
34 typedef signed char int_fast8_t;
35 typedef signed short int_fast16_t;
36 typedef signed int int_fast32_t;
37 typedef signed long long int_fast64_t;
39 typedef unsigned char uint_fast8_t;
40 typedef unsigned short uint_fast16_t;
41 typedef unsigned int uint_fast32_t;
42 typedef unsigned long long uint_fast64_t;
46 typedef int32_t intptr_t;
47 typedef uint32_t uintptr_t;
51 typedef int64_t intmax_t;
52 typedef uint64_t uintmax_t;
55 * To be strictly correct...
57 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
59 # define INT8_MIN (-128)
60 # define INT16_MIN (-32767-1)
61 # define INT32_MIN (-2147483647-1)
62 # define INT64_MIN (-9223372036854775807LL-1)
64 # define INT8_MAX (127)
65 # define INT16_MAX (32767)
66 # define INT32_MAX (2147483647)
67 # define INT64_MAX (9223372036854775807LL)
69 # define UINT8_MAX (255U)
70 # define UINT16_MAX (65535U)
71 # define UINT32_MAX (4294967295U)
72 # define UINT64_MAX (18446744073709551615ULL)
74 # define INT_LEAST8_MIN (-128)
75 # define INT_LEAST16_MIN (-32767-1)
76 # define INT_LEAST32_MIN (-2147483647-1)
77 # define INT_LEAST64_MIN (-9223372036854775807LL-1)
79 # define INT_LEAST8_MAX (127)
80 # define INT_LEAST16_MAX (32767)
81 # define INT_LEAST32_MAX (2147483647)
82 # define INT_LEAST64_MAX (9223372036854775807LL)
84 # define UINT_LEAST8_MAX (255U)
85 # define UINT_LEAST16_MAX (65535U)
86 # define UINT_LEAST32_MAX (4294967295U)
87 # define UINT_LEAST64_MAX (18446744073709551615ULL)
89 # define INT_FAST8_MIN (-128)
90 # define INT_FAST16_MIN (-32767-1)
91 # define INT_FAST32_MIN (-2147483647-1)
92 # define INT_FAST64_MIN (-9223372036854775807LL-1)
94 # define INT_FAST8_MAX (127)
95 # define INT_FAST16_MAX (32767)
96 # define INT_FAST32_MAX (2147483647)
97 # define INT_FAST64_MAX (9223372036854775807LL)
99 # define UINT_FAST8_MAX (255U)
100 # define UINT_FAST16_MAX (65535U)
101 # define UINT_FAST32_MAX (4294967295U)
102 # define UINT_FAST64_MAX (18446744073709551615ULL)
104 # define INTPTR_MIN (-2147483647-1)
105 # define INTPTR_MAX (2147483647)
106 # define UINTPTR_MAX (4294967295U)
108 # define INTMAX_MIN (-9223372036854775807LL-1)
109 # define INTMAX_MAX (9223372036854775807LL)
110 # define UINTMAX_MAX (18446744073709551615ULL)
112 /* ptrdiff_t limit */
113 # define PTRDIFF_MIN (-2147483647-1)
114 # define PTRDIFF_MAX (2147483647)
116 /* sig_atomic_t limit */
117 # define SIG_ATOMIC_MIN (-2147483647-1)
118 # define SIG_ATOMIC_MAX (2147483647)
121 # define SIZE_MAX (4294967295U)
123 #endif /* STDC_LIMIT_MACROS */
125 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
128 # define INT16_C(n) n
129 # define INT32_C(n) n
130 # define INT64_C(n) n ## LL
132 # define UINT8_C(n) n ## U
133 # define UINT16_C(n) n ## U
134 # define UINT32_C(n) n ## U
135 # define UINT64_C(n) n ## ULL
137 # define INTMAX_C(n) n ## LL
138 # define UINTMAX_C(n) n ## ULL
140 #endif /* STDC_CONSTANT_MACROS */
142 #endif /* _STDINT_H */