1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // AIX system headers need <stdint.h> to be re-enterable when macro _STD_TYPES_T
10 // is defined. This test case checks that after defining _STD_TYPES_T, including
11 // <stdint.h>, and undefining _STD_TYPES_T, <stdint.h> can be re-entered to get
12 // to macros like UINT32_MAX.
13 //
14 // https://reviews.llvm.org/D59253
15 
16 #define _STD_TYPES_T
17 #   include <stdint.h>
18 #undef _STD_TYPES_T
19 #include <stdint.h>
20 
21 #ifndef INT8_MIN
22 #error INT8_MIN not defined
23 #endif
24 
25 #ifndef INT16_MIN
26 #error INT16_MIN not defined
27 #endif
28 
29 #ifndef INT32_MIN
30 #error INT32_MIN not defined
31 #endif
32 
33 #ifndef INT64_MIN
34 #error INT64_MIN not defined
35 #endif
36 
37 #ifndef INT8_MAX
38 #error INT8_MAX not defined
39 #endif
40 
41 #ifndef INT16_MAX
42 #error INT16_MAX not defined
43 #endif
44 
45 #ifndef INT32_MAX
46 #error INT32_MAX not defined
47 #endif
48 
49 #ifndef INT64_MAX
50 #error INT64_MAX not defined
51 #endif
52 
53 #ifndef UINT8_MAX
54 #error UINT8_MAX not defined
55 #endif
56 
57 #ifndef UINT16_MAX
58 #error UINT16_MAX not defined
59 #endif
60 
61 #ifndef UINT32_MAX
62 #error UINT32_MAX not defined
63 #endif
64 
65 #ifndef UINT64_MAX
66 #error UINT64_MAX not defined
67 #endif
68 
69 #ifndef INT_LEAST8_MIN
70 #error INT_LEAST8_MIN not defined
71 #endif
72 
73 #ifndef INT_LEAST16_MIN
74 #error INT_LEAST16_MIN not defined
75 #endif
76 
77 #ifndef INT_LEAST32_MIN
78 #error INT_LEAST32_MIN not defined
79 #endif
80 
81 #ifndef INT_LEAST64_MIN
82 #error INT_LEAST64_MIN not defined
83 #endif
84 
85 #ifndef INT_LEAST8_MAX
86 #error INT_LEAST8_MAX not defined
87 #endif
88 
89 #ifndef INT_LEAST16_MAX
90 #error INT_LEAST16_MAX not defined
91 #endif
92 
93 #ifndef INT_LEAST32_MAX
94 #error INT_LEAST32_MAX not defined
95 #endif
96 
97 #ifndef INT_LEAST64_MAX
98 #error INT_LEAST64_MAX not defined
99 #endif
100 
101 #ifndef UINT_LEAST8_MAX
102 #error UINT_LEAST8_MAX not defined
103 #endif
104 
105 #ifndef UINT_LEAST16_MAX
106 #error UINT_LEAST16_MAX not defined
107 #endif
108 
109 #ifndef UINT_LEAST32_MAX
110 #error UINT_LEAST32_MAX not defined
111 #endif
112 
113 #ifndef UINT_LEAST64_MAX
114 #error UINT_LEAST64_MAX not defined
115 #endif
116 
117 #ifndef INT_FAST8_MIN
118 #error INT_FAST8_MIN not defined
119 #endif
120 
121 #ifndef INT_FAST16_MIN
122 #error INT_FAST16_MIN not defined
123 #endif
124 
125 #ifndef INT_FAST32_MIN
126 #error INT_FAST32_MIN not defined
127 #endif
128 
129 #ifndef INT_FAST64_MIN
130 #error INT_FAST64_MIN not defined
131 #endif
132 
133 #ifndef INT_FAST8_MAX
134 #error INT_FAST8_MAX not defined
135 #endif
136 
137 #ifndef INT_FAST16_MAX
138 #error INT_FAST16_MAX not defined
139 #endif
140 
141 #ifndef INT_FAST32_MAX
142 #error INT_FAST32_MAX not defined
143 #endif
144 
145 #ifndef INT_FAST64_MAX
146 #error INT_FAST64_MAX not defined
147 #endif
148 
149 #ifndef UINT_FAST8_MAX
150 #error UINT_FAST8_MAX not defined
151 #endif
152 
153 #ifndef UINT_FAST16_MAX
154 #error UINT_FAST16_MAX not defined
155 #endif
156 
157 #ifndef UINT_FAST32_MAX
158 #error UINT_FAST32_MAX not defined
159 #endif
160 
161 #ifndef UINT_FAST64_MAX
162 #error UINT_FAST64_MAX not defined
163 #endif
164 
165 #ifndef INTPTR_MIN
166 #error INTPTR_MIN not defined
167 #endif
168 
169 #ifndef INTPTR_MAX
170 #error INTPTR_MAX not defined
171 #endif
172 
173 #ifndef UINTPTR_MAX
174 #error UINTPTR_MAX not defined
175 #endif
176 
177 #ifndef INTMAX_MIN
178 #error INTMAX_MIN not defined
179 #endif
180 
181 #ifndef INTMAX_MAX
182 #error INTMAX_MAX not defined
183 #endif
184 
185 #ifndef UINTMAX_MAX
186 #error UINTMAX_MAX not defined
187 #endif
188 
189 #ifndef PTRDIFF_MIN
190 #error PTRDIFF_MIN not defined
191 #endif
192 
193 #ifndef PTRDIFF_MAX
194 #error PTRDIFF_MAX not defined
195 #endif
196 
197 #ifndef SIG_ATOMIC_MIN
198 #error SIG_ATOMIC_MIN not defined
199 #endif
200 
201 #ifndef SIG_ATOMIC_MAX
202 #error SIG_ATOMIC_MAX not defined
203 #endif
204 
205 #ifndef SIZE_MAX
206 #error SIZE_MAX not defined
207 #endif
208 
209 #ifndef WCHAR_MIN
210 #error WCHAR_MIN not defined
211 #endif
212 
213 #ifndef WCHAR_MAX
214 #error WCHAR_MAX not defined
215 #endif
216 
217 #ifndef WINT_MIN
218 #error WINT_MIN not defined
219 #endif
220 
221 #ifndef WINT_MAX
222 #error WINT_MAX not defined
223 #endif
224 
225 #ifndef INT8_C
226 #error INT8_C not defined
227 #endif
228 
229 #ifndef INT16_C
230 #error INT16_C not defined
231 #endif
232 
233 #ifndef INT32_C
234 #error INT32_C not defined
235 #endif
236 
237 #ifndef INT64_C
238 #error INT64_C not defined
239 #endif
240 
241 #ifndef UINT8_C
242 #error UINT8_C not defined
243 #endif
244 
245 #ifndef UINT16_C
246 #error UINT16_C not defined
247 #endif
248 
249 #ifndef UINT32_C
250 #error UINT32_C not defined
251 #endif
252 
253 #ifndef UINT64_C
254 #error UINT64_C not defined
255 #endif
256 
257 #ifndef INTMAX_C
258 #error INTMAX_C not defined
259 #endif
260 
261 #ifndef UINTMAX_C
262 #error UINTMAX_C not defined
263 #endif
264