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 signed long intptr_t;
47 typedef unsigned long uintptr_t;
51 typedef int64_t intmax_t;
52 typedef uint64_t uintmax_t;
54 /* Rank definitions, used in inttypes.h */
55 #define __PRIFAST_RANK ""
56 #define __SCNFAST_RANK ""
57 #define __PRIPTR_RANK "l"
58 #define __SCNPTR_RANK "l"
59 #define __PRI64_RANK "ll"
60 #define __SCN64_RANK "ll"
63 * To be strictly correct...
65 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
67 # define INT8_MIN (-128)
68 # define INT16_MIN (-32767-1)
69 # define INT32_MIN (-2147483647-1)
70 # define INT64_MIN (-9223372036854775807LL-1)
72 # define INT8_MAX (127)
73 # define INT16_MAX (32767)
74 # define INT32_MAX (2147483647)
75 # define INT64_MAX (9223372036854775807LL)
77 # define UINT8_MAX (255U)
78 # define UINT16_MAX (65535U)
79 # define UINT32_MAX (4294967295U)
80 # define UINT64_MAX (18446744073709551615ULL)
82 # define INT_LEAST8_MIN (-128)
83 # define INT_LEAST16_MIN (-32767-1)
84 # define INT_LEAST32_MIN (-2147483647-1)
85 # define INT_LEAST64_MIN (-9223372036854775807LL-1)
87 # define INT_LEAST8_MAX (127)
88 # define INT_LEAST16_MAX (32767)
89 # define INT_LEAST32_MAX (2147483647)
90 # define INT_LEAST64_MAX (9223372036854775807LL)
92 # define UINT_LEAST8_MAX (255U)
93 # define UINT_LEAST16_MAX (65535U)
94 # define UINT_LEAST32_MAX (4294967295U)
95 # define UINT_LEAST64_MAX (18446744073709551615ULL)
97 # define INT_FAST8_MIN (-128)
98 # define INT_FAST16_MIN (-32767-1)
99 # define INT_FAST32_MIN (-2147483647-1)
100 # define INT_FAST64_MIN (-9223372036854775807LL-1)
102 # define INT_FAST8_MAX (127)
103 # define INT_FAST16_MAX (32767)
104 # define INT_FAST32_MAX (2147483647)
105 # define INT_FAST64_MAX (9223372036854775807LL)
107 # define UINT_FAST8_MAX (255U)
108 # define UINT_FAST16_MAX (65535U)
109 # define UINT_FAST32_MAX (4294967295U)
110 # define UINT_FAST64_MAX (18446744073709551615ULL)
112 # define INTPTR_MIN (-2147483647-1)
113 # define INTPTR_MAX (2147483647)
114 # define UINTPTR_MAX (4294967295U)
116 # define INTMAX_MIN (-9223372036854775807LL-1)
117 # define INTMAX_MAX (9223372036854775807LL)
118 # define UINTMAX_MAX (18446744073709551615ULL)
120 /* ptrdiff_t limit */
121 # define PTRDIFF_MIN (-2147483647-1)
122 # define PTRDIFF_MAX (2147483647)
124 /* sig_atomic_t limit */
125 # define SIG_ATOMIC_MIN (-2147483647-1)
126 # define SIG_ATOMIC_MAX (2147483647)
129 # define SIZE_MAX (4294967295U)
131 #endif /* STDC_LIMIT_MACROS */
133 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
136 # define INT16_C(n) n
137 # define INT32_C(n) n
138 # define INT64_C(n) n ## LL
140 # define UINT8_C(n) n ## U
141 # define UINT16_C(n) n ## U
142 # define UINT32_C(n) n ## U
143 # define UINT64_C(n) n ## ULL
145 # define INTMAX_C(n) n ## LL
146 # define UINTMAX_C(n) n ## ULL
148 #endif /* STDC_CONSTANT_MACROS */
150 #endif /* _STDINT_H */