444a08256c202aeb21d410df370dd80840c937fa
[gnulib.git] / lib / stdint_.h
1 /* Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
2    Written by Bruno Haible, Sam Steingold, Peter Burwood.
3    This file is part of gnulib.
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2, or (at your option)
8    any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software Foundation,
17    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
18
19 #ifndef _STDINT_H
20 #define _STDINT_H
21
22 /*
23  * ISO C 99 <stdint.h> for platforms that lack it.
24  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
25  */
26
27 /* Get wchar_t, WCHAR_MIN, WCHAR_MAX.  */
28 #include <stddef.h>
29 /* Some systems define WCHAR_MIN, WCHAR_MAX in <wchar.h>, not <stddef.h>.  */
30 #if !(defined(WCHAR_MIN) && defined(WCHAR_MAX)) && @HAVE_WCHAR_H@
31 # include <wchar.h>
32 #endif
33
34 /* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
35 #include <limits.h>
36
37 /* Get those types that are already defined in other system include files.  */
38 #if defined(__FreeBSD__) && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)
39 # include <sys/inttypes.h>
40 #endif
41 #if defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)
42   /* In OpenBSD 3.8, <sys/types.h> includes <machine/types.h>, which defines
43      int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
44      <inttypes.h> includes <machine/types.h> and also defines intptr_t and
45      uintptr_t.  */
46   /* BSD/OS 4.2 is similar, but doesn't have <inttypes.h> */
47   /* IRIX 6.5 has <inttypes.h>, and <sys/types.h> defines some of these
48      types as well.  */
49 # include <sys/types.h>
50 # if @HAVE_INTTYPES_H@
51 #  include @FULL_PATH_INTTYPES_H@
52 # endif
53 #endif
54 #if defined(__linux__) && @HAVE_SYS_BITYPES_H@
55   /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
56      int{8,16,32,64}_t and __BIT_TYPES_DEFINED__.  In libc5 >= 5.2.2 it is
57      included by <sys/types.h>.  */
58 # include <sys/bitypes.h>
59 #endif
60 #if defined(__sun) && @HAVE_SYS_INTTYPES_H@
61   /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
62      the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.
63      But note that <sys/int_types.h> contains only the type definitions!  */
64 # include <sys/inttypes.h>
65 #endif
66 #if (defined(__hpux) || defined(_AIX)) && @HAVE_INTTYPES_H@
67   /* HP-UX 10 <inttypes.h> has nearly everything, except UINT_LEAST8_MAX,
68      UINT_FAST8_MAX, PTRDIFF_MIN, PTRDIFF_MAX.  */
69   /* AIX 4 <inttypes.h> has nearly everything, except INTPTR_MIN, INTPTR_MAX,
70      UINTPTR_MAX, PTRDIFF_MIN, PTRDIFF_MAX.  */
71 # include @FULL_PATH_INTTYPES_H@
72 #endif
73 #if @HAVE_STDINT_H@
74   /* Other systems may have an incomplete <stdint.h>.  */
75   /* On some versions of IRIX, the SGI C compiler comes with an <stdint.h>,
76      but
77        - in c99 mode, <inttypes.h> includes <stdint.h>,
78        - in c89 mode, <stdint.h> spews warnings. <inttypes.h> defines only
79          a subset of the types and macros that are defined in <stdint.h>.
80      So we rely only on <inttypes.h> (included above).  It means that in
81      c89 mode, we shadow the contents of warning-spewing <stdint.h>.  */
82 # if !(defined(__sgi) && @HAVE_INTTYPES_H@ && !defined(__c99))
83 #  include @FULL_PATH_STDINT_H@
84 # endif
85 #endif
86
87 /* 7.18.1.1. Exact-width integer types */
88
89 /* Here we assume a standard architecture where the hardware integer
90    types have 8, 16, 32, optionally 64 bits.  */
91
92 #if !@HAVE_INT8_T@
93 typedef signed char    int8_t;
94 #endif
95 #if !@HAVE_UINT8_T@
96 typedef unsigned char  uint8_t;
97 # define _UINT8_T /* avoid collision with Solaris 2.5.1 <pthread.h> */
98 #endif
99
100 #if !@HAVE_INT16_T@
101 typedef short          int16_t;
102 #endif
103 #if !@HAVE_UINT16_T@
104 typedef unsigned short uint16_t;
105 #endif
106
107 #if !@HAVE_INT32_T@
108 typedef int            int32_t;
109 #endif
110 #if !@HAVE_UINT32_T@
111 typedef unsigned int   uint32_t;
112 # define _UINT32_T /* avoid collision with Solaris 2.5.1 <pthread.h> */
113 #endif
114
115 #if @HAVE_INT64_T@
116 # define _STDINT_H_HAVE_INT64 1
117 #else
118 # if @HAVE_LONG_64BIT@
119 typedef long           int64_t;
120 #  define _STDINT_H_HAVE_INT64 1
121 # elif @HAVE_LONG_LONG_64BIT@
122 typedef long long      int64_t;
123 #  define _STDINT_H_HAVE_INT64 1
124 # elif defined _MSC_VER
125 typedef __int64        int64_t;
126 #  define _STDINT_H_HAVE_INT64 1
127 # endif
128 #endif
129 #if @HAVE_UINT64_T@
130 # define _STDINT_H_HAVE_UINT64 1
131 #else
132 # if @HAVE_LONG_64BIT@
133 typedef unsigned long      uint64_t;
134 #  define _STDINT_H_HAVE_UINT64 1
135 # elif @HAVE_LONG_LONG_64BIT@
136 typedef unsigned long long uint64_t;
137 #  define _UINT64_T /* avoid collision with Solaris 2.5.1 <pthread.h> */
138 #  define _STDINT_H_HAVE_UINT64 1
139 # elif defined _MSC_VER
140 typedef unsigned __int64   uint64_t;
141 #  define _STDINT_H_HAVE_UINT64 1
142 # endif
143 #endif
144
145 /* 7.18.1.2. Minimum-width integer types */
146
147 /* Here we assume a standard architecture where the hardware integer
148    types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
149    are the same as the corresponding N_t types.  */
150
151 #if !@HAVE_INT_LEAST8_T@
152 typedef int8_t   int_least8_t;
153 #endif
154 #if !@HAVE_UINT_LEAST8_T@
155 typedef uint8_t  uint_least8_t;
156 #endif
157
158 #if !@HAVE_INT_LEAST16_T@
159 typedef int16_t  int_least16_t;
160 #endif
161 #if !@HAVE_UINT_LEAST16_T@
162 typedef uint16_t uint_least16_t;
163 #endif
164
165 #if !@HAVE_INT_LEAST32_T@
166 typedef int32_t  int_least32_t;
167 #endif
168 #if !@HAVE_UINT_LEAST32_T@
169 typedef uint32_t uint_least32_t;
170 #endif
171
172 #if !@HAVE_INT_LEAST64_T@ && _STDINT_H_HAVE_INT64
173 typedef int64_t  int_least64_t;
174 #endif
175 #if !@HAVE_UINT_LEAST64_T@ && _STDINT_H_HAVE_UINT64
176 typedef uint64_t uint_least64_t;
177 #endif
178
179 /* 7.18.1.3. Fastest minimum-width integer types */
180
181 /* Note: Other <stdint.h> substitutes may define these types differently.
182    It is not recommended to use these types in public header files. */
183
184 /* Here we assume a standard architecture where the hardware integer
185    types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
186    are taken from the same list of types.  */
187
188 /* On alpha processors, int32_t variables are slower than int64_t variables,
189    due to the necessary zap instructions.  */
190 #if defined __alpha
191 # define _STDINT_H_INT64_FASTER_THAN_INT32 1
192 #endif
193
194 #if !@HAVE_INT_FAST8_T@
195 # if _STDINT_H_INT64_FASTER_THAN_INT32
196 typedef int64_t  int_fast8_t;
197 # else
198 typedef int32_t  int_fast8_t;
199 # endif
200 #endif
201 #if !@HAVE_UINT_FAST8_T@
202 # if _STDINT_H_INT64_FASTER_THAN_INT32
203 typedef uint64_t uint_fast8_t;
204 # else
205 typedef uint32_t uint_fast8_t;
206 # endif
207 #endif
208
209 #if !@HAVE_INT_FAST16_T@
210 # if _STDINT_H_INT64_FASTER_THAN_INT32
211 typedef int64_t  int_fast16_t;
212 # else
213 typedef int32_t  int_fast16_t;
214 # endif
215 #endif
216 #if !@HAVE_UINT_FAST16_T@
217 # if _STDINT_H_INT64_FASTER_THAN_INT32
218 typedef uint64_t uint_fast16_t;
219 # else
220 typedef uint32_t uint_fast16_t;
221 # endif
222 #endif
223
224 #if !@HAVE_INT_FAST32_T@
225 # if _STDINT_H_INT64_FASTER_THAN_INT32
226 typedef int64_t  int_fast32_t;
227 # else
228 typedef int32_t  int_fast32_t;
229 # endif
230 #endif
231 #if !@HAVE_UINT_FAST32_T@
232 # if _STDINT_H_INT64_FASTER_THAN_INT32
233 typedef uint64_t uint_fast32_t;
234 # else
235 typedef uint32_t uint_fast32_t;
236 # endif
237 #endif
238
239 #if !@HAVE_INT_FAST64_T@ && _STDINT_H_HAVE_INT64
240 typedef int64_t  int_fast64_t;
241 #endif
242 #if !@HAVE_UINT_FAST64_T@ && _STDINT_H_HAVE_UINT64
243 typedef uint64_t uint_fast64_t;
244 #endif
245
246 /* 7.18.1.4. Integer types capable of holding object pointers */
247
248 /* On some platforms (like IRIX6 MIPS with -n32) sizeof(void*) < sizeof(long),
249    but this doesn't matter here.  */
250 #if !@HAVE_INTPTR_T@
251 typedef long          intptr_t;
252 #endif
253 #if !@HAVE_UINTPTR_T@
254 typedef unsigned long uintptr_t;
255 #endif
256
257 /* 7.18.1.5. Greatest-width integer types */
258
259 /* Note: These types are compiler dependent. It may be unwise to use them in
260    public header files. */
261
262 #if !@HAVE_INTMAX_T@
263 # ifdef _STDINT_H_HAVE_INT64
264 typedef int64_t  intmax_t;
265 # else
266 typedef int32_t  intmax_t;
267 # endif
268 #endif
269 #if !@HAVE_UINTMAX_T@
270 # ifdef _STDINT_H_HAVE_UINT64
271 typedef uint64_t uintmax_t;
272 # else
273 typedef uint32_t uintmax_t;
274 # endif
275 #endif
276
277 /* 7.18.2. Limits of specified-width integer types */
278
279 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
280
281 /* 7.18.2.1. Limits of exact-width integer types */
282
283 /* Here we assume a standard architecture where the hardware integer
284    types have 8, 16, 32, optionally 64 bits.  */
285
286 #if @HAVE_INT8_T@
287 # ifndef INT8_MIN
288 #  define INT8_MIN  (-1 << (@BITSIZEOF_INT8_T@ - 1))
289 # endif
290 #else
291 # define INT8_MIN  -128
292 #endif
293 #if @HAVE_INT8_T@
294 # ifndef INT8_MAX
295 #  define INT8_MAX  (~ (-1 << (@BITSIZEOF_INT8_T@ - 1)))
296 # endif
297 #else
298 # define INT8_MAX  127
299 #endif
300 #if @HAVE_UINT8_T@
301 # ifndef UINT8_MAX
302 #  if @BITSIZEOF_UINT8_T@ < @BITSIZEOF_UNSIGNED_INT@
303 #   define UINT8_MAX  (((1 << (@BITSIZEOF_UINT8_T@ - 1)) - 1) * 2 + 1)
304 #  else
305 #   define UINT8_MAX  (((1U << (@BITSIZEOF_UINT8_T@ - 1)) - 1) * 2 + 1)
306 #  endif
307 # endif
308 #else
309 # define UINT8_MAX  255
310 #endif
311
312 #if @HAVE_INT16_T@
313 # ifndef INT16_MIN
314 #  define INT16_MIN  (-1 << (@BITSIZEOF_INT16_T@ - 1))
315 # endif
316 #else
317 # define INT16_MIN  -32768
318 #endif
319 #if @HAVE_INT16_T@
320 # ifndef INT16_MAX
321 #  define INT16_MAX  (~ (-1 << (@BITSIZEOF_INT16_T@ - 1)))
322 # endif
323 #else
324 # define INT16_MAX  32767
325 #endif
326 #if @HAVE_UINT16_T@
327 # ifndef UINT16_MAX
328 #  if @BITSIZEOF_UINT16_T@ < @BITSIZEOF_UNSIGNED_INT@
329 #   define UINT16_MAX  (((1 << (@BITSIZEOF_UINT16_T@ - 1)) - 1) * 2 + 1)
330 #  else
331 #   define UINT16_MAX  (((1U << (@BITSIZEOF_UINT16_T@ - 1)) - 1) * 2 + 1)
332 #  endif
333 # endif
334 #else
335 # define UINT16_MAX  65535
336 #endif
337
338 #if @HAVE_INT32_T@
339 # ifndef INT32_MIN
340 #  define INT32_MIN  (-1 << (@BITSIZEOF_INT32_T@ - 1))
341 # endif
342 #else
343 # define INT32_MIN  (~INT32_MAX)
344 #endif
345 #if @HAVE_INT32_T@
346 # ifndef INT32_MAX
347 #  define INT32_MAX  (~ (-1 << (@BITSIZEOF_INT32_T@ - 1)))
348 # endif
349 #else
350 # define INT32_MAX  2147483647
351 #endif
352 #if @HAVE_UINT32_T@
353 # ifndef UINT32_MAX
354 #  if @BITSIZEOF_UINT32_T@ < @BITSIZEOF_UNSIGNED_INT@
355 #   define UINT32_MAX  (((1 << (@BITSIZEOF_UINT32_T@ - 1)) - 1) * 2 + 1)
356 #  else
357 #   define UINT32_MAX  (((1U << (@BITSIZEOF_UINT32_T@ - 1)) - 1) * 2 + 1)
358 #  endif
359 # endif
360 #else
361 # define UINT32_MAX  4294967295U
362 #endif
363
364 #if @HAVE_INT64_T@
365 # ifndef INT64_MIN
366 #  if @HAVE_LONG_64BIT@
367 #   define INT64_MIN  (-1L << (@BITSIZEOF_INT64_T@ - 1))
368 #  elif @HAVE_LONG_LONG_64BIT@
369 #   define INT64_MIN  (-1LL << (@BITSIZEOF_INT64_T@ - 1))
370 #  elif defined _MSC_VER
371 #   define INT64_MIN  (-1i64 << (@BITSIZEOF_INT64_T@ - 1))
372 #  endif
373 # endif
374 #else
375 # ifdef _STDINT_H_HAVE_INT64
376 #  define INT64_MIN  (~INT64_MAX)
377 # endif
378 #endif
379 #if @HAVE_INT64_T@
380 # ifndef INT64_MAX
381 #  if @HAVE_LONG_64BIT@
382 #   define INT64_MAX  (~ (-1L << (@BITSIZEOF_INT64_T@ - 1)))
383 #  elif @HAVE_LONG_LONG_64BIT@
384 #   define INT64_MAX  (~ (-1LL << (@BITSIZEOF_INT64_T@ - 1)))
385 #  elif defined _MSC_VER
386 #   define INT64_MAX  (~ (-1i64 << (@BITSIZEOF_INT64_T@ - 1)))
387 #  endif
388 # endif
389 #else
390 # ifdef _STDINT_H_HAVE_INT64
391 #  if @HAVE_LONG_64BIT@
392 #   define INT64_MAX  9223372036854775807L
393 #  elif @HAVE_LONG_LONG_64BIT@
394 #   define INT64_MAX  9223372036854775807LL
395 #  elif defined _MSC_VER
396 #   define INT64_MAX  9223372036854775807i64
397 #  endif
398 # endif
399 #endif
400 #if @HAVE_UINT64_T@
401 # ifndef UINT64_MAX
402 #  if @HAVE_LONG_64BIT@
403 #   define UINT64_MAX  (((1UL << (@BITSIZEOF_UINT64_T@ - 1)) - 1) * 2 + 1)
404 #  elif @HAVE_LONG_LONG_64BIT@
405 #   define UINT64_MAX  (((1ULL << (@BITSIZEOF_UINT64_T@ - 1)) - 1) * 2 + 1)
406 #  elif defined _MSC_VER
407 #   define UINT64_MAX  (((1ui64 << (@BITSIZEOF_UINT64_T@ - 1)) - 1) * 2 + 1)
408 #  endif
409 # endif
410 #else
411 # ifdef _STDINT_H_HAVE_UINT64
412 #  if @HAVE_LONG_64BIT@
413 #   define UINT64_MAX 18446744073709551615UL
414 #  elif @HAVE_LONG_LONG_64BIT@
415 #   define UINT64_MAX 18446744073709551615ULL
416 #  elif defined _MSC_VER
417 #   define UINT64_MAX 18446744073709551615ui64
418 #  endif
419 # endif
420 #endif
421
422 /* 7.18.2.2. Limits of minimum-width integer types */
423
424 /* Here we assume a standard architecture where the hardware integer
425    types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
426    are the same as the corresponding N_t types.  */
427
428 #if @HAVE_INT_LEAST8_T@
429 # ifndef INT_LEAST8_MIN
430 #  define INT_LEAST8_MIN  (-1 << (@BITSIZEOF_INT_LEAST8_T@ - 1))
431 # endif
432 #else
433 # define INT_LEAST8_MIN  INT8_MIN
434 #endif
435 #if @HAVE_INT_LEAST8_T@
436 # ifndef INT_LEAST8_MAX
437 #  define INT_LEAST8_MAX  (~ (-1 << (@BITSIZEOF_INT_LEAST8_T@ - 1)))
438 # endif
439 #else
440 # define INT_LEAST8_MAX  INT8_MAX
441 #endif
442 #if @HAVE_UINT_LEAST8_T@
443 # ifndef UINT_LEAST8_MAX
444 #  if @BITSIZEOF_UINT_LEAST8_T@ < @BITSIZEOF_UNSIGNED_INT@
445 #   define UINT_LEAST8_MAX  (((1 << (@BITSIZEOF_UINT_LEAST8_T@ - 1)) - 1) * 2 + 1)
446 #  else
447 #   define UINT_LEAST8_MAX  (((1U << (@BITSIZEOF_UINT_LEAST8_T@ - 1)) - 1) * 2 + 1)
448 #  endif
449 # endif
450 #else
451 # define UINT_LEAST8_MAX  UINT8_MAX
452 #endif
453
454 #if @HAVE_INT_LEAST16_T@
455 # ifndef INT_LEAST16_MIN
456 #  define INT_LEAST16_MIN  (-1 << (@BITSIZEOF_INT_LEAST16_T@ - 1))
457 # endif
458 #else
459 # define INT_LEAST16_MIN  INT16_MIN
460 #endif
461 #if @HAVE_INT_LEAST16_T@
462 # ifndef INT_LEAST16_MAX
463 #  define INT_LEAST16_MAX  (~ (-1 << (@BITSIZEOF_INT_LEAST16_T@ - 1)))
464 # endif
465 #else
466 # define INT_LEAST16_MAX  INT16_MAX
467 #endif
468 #if @HAVE_UINT_LEAST16_T@
469 # ifndef UINT_LEAST16_MAX
470 #  if @BITSIZEOF_UINT_LEAST16_T@ < @BITSIZEOF_UNSIGNED_INT@
471 #   define UINT_LEAST16_MAX  (((1 << (@BITSIZEOF_UINT_LEAST16_T@ - 1)) - 1) * 2 + 1)
472 #  else
473 #   define UINT_LEAST16_MAX  (((1U << (@BITSIZEOF_UINT_LEAST16_T@ - 1)) - 1) * 2 + 1)
474 #  endif
475 # endif
476 #else
477 # define UINT_LEAST16_MAX  UINT16_MAX
478 #endif
479
480 #if @HAVE_INT_LEAST32_T@
481 # ifndef INT_LEAST32_MIN
482 #  define INT_LEAST32_MIN  (-1 << (@BITSIZEOF_INT_LEAST32_T@ - 1))
483 # endif
484 #else
485 # define INT_LEAST32_MIN  INT32_MIN
486 #endif
487 #if @HAVE_INT_LEAST32_T@
488 # ifndef INT_LEAST32_MAX
489 #  define INT_LEAST32_MAX  (~ (-1 << (@BITSIZEOF_INT_LEAST32_T@ - 1)))
490 # endif
491 #else
492 # define INT_LEAST32_MAX  INT32_MAX
493 #endif
494 #if @HAVE_UINT_LEAST32_T@
495 # ifndef UINT_LEAST32_MAX
496 #  if @BITSIZEOF_UINT_LEAST32_T@ < @BITSIZEOF_UNSIGNED_INT@
497 #   define UINT_LEAST32_MAX  (((1 << (@BITSIZEOF_UINT_LEAST32_T@ - 1)) - 1) * 2 + 1)
498 #  else
499 #   define UINT_LEAST32_MAX  (((1U << (@BITSIZEOF_UINT_LEAST32_T@ - 1)) - 1) * 2 + 1)
500 #  endif
501 # endif
502 #else
503 # define UINT_LEAST32_MAX  UINT32_MAX
504 #endif
505
506 #if @HAVE_INT_LEAST64_T@
507 # ifndef INT_LEAST64_MIN
508 #  if @HAVE_LONG_64BIT@
509 #   define INT_LEAST64_MIN  (-1L << (@BITSIZEOF_INT_LEAST64_T@ - 1))
510 #  elif @HAVE_LONG_LONG_64BIT@
511 #   define INT_LEAST64_MIN  (-1LL << (@BITSIZEOF_INT_LEAST64_T@ - 1))
512 #  elif defined _MSC_VER
513 #   define INT_LEAST64_MIN  (-1i64 << (@BITSIZEOF_INT_LEAST64_T@ - 1))
514 #  endif
515 # endif
516 #else
517 # ifdef _STDINT_H_HAVE_INT64
518 #  define INT_LEAST64_MIN  INT64_MIN
519 # endif
520 #endif
521 #if @HAVE_INT_LEAST64_T@
522 # ifndef INT_LEAST64_MAX
523 #  if @HAVE_LONG_64BIT@
524 #   define INT_LEAST64_MAX  (~ (-1L << (@BITSIZEOF_INT_LEAST64_T@ - 1)))
525 #  elif @HAVE_LONG_LONG_64BIT@
526 #   define INT_LEAST64_MAX  (~ (-1LL << (@BITSIZEOF_INT_LEAST64_T@ - 1)))
527 #  elif defined _MSC_VER
528 #   define INT_LEAST64_MAX  (~ (-1i64 << (@BITSIZEOF_INT_LEAST64_T@ - 1)))
529 #  endif
530 # endif
531 #else
532 # ifdef _STDINT_H_HAVE_INT64
533 #  define INT_LEAST64_MAX  INT64_MAX
534 # endif
535 #endif
536 #if @HAVE_UINT_LEAST64_T@
537 # ifndef UINT_LEAST64_MAX
538 #  if @HAVE_LONG_64BIT@
539 #   define UINT_LEAST64_MAX  (((1UL << (@BITSIZEOF_UINT_LEAST64_T@ - 1)) - 1) * 2 + 1)
540 #  elif @HAVE_LONG_LONG_64BIT@
541 #   define UINT_LEAST64_MAX  (((1ULL << (@BITSIZEOF_UINT_LEAST64_T@ - 1)) - 1) * 2 + 1)
542 #  elif defined _MSC_VER
543 #   define UINT_LEAST64_MAX  (((1ui64 << (@BITSIZEOF_UINT_LEAST64_T@ - 1)) - 1) * 2 + 1)
544 #  endif
545 # endif
546 #else
547 # ifdef _STDINT_H_HAVE_UINT64
548 #  define UINT_LEAST64_MAX  UINT64_MAX
549 # endif
550 #endif
551
552 /* 7.18.2.3. Limits of fastest minimum-width integer types */
553
554 /* Here we assume a standard architecture where the hardware integer
555    types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
556    are taken from the same list of types.  */
557
558 #if @HAVE_INT_FAST8_T@
559 # ifndef INT_FAST8_MIN
560 #  define INT_FAST8_MIN  (-1L << (@BITSIZEOF_INT_FAST8_T@ - 1))
561 # endif
562 #else
563 # if _STDINT_H_INT64_FASTER_THAN_INT32
564 #  define INT_FAST8_MIN  INT64_MIN
565 # else
566 #  define INT_FAST8_MIN  INT32_MIN
567 # endif
568 #endif
569 #if @HAVE_INT_FAST8_T@
570 # ifndef INT_FAST8_MAX
571 #  define INT_FAST8_MAX  (~ (-1L << (@BITSIZEOF_INT_FAST8_T@ - 1)))
572 # endif
573 #else
574 # if _STDINT_H_INT64_FASTER_THAN_INT32
575 #  define INT_FAST8_MAX  INT64_MAX
576 # else
577 #  define INT_FAST8_MAX  INT32_MAX
578 # endif
579 #endif
580 #if @HAVE_UINT_FAST8_T@
581 # ifndef UINT_FAST8_MAX
582 #  if @BITSIZEOF_UINT_FAST8_T@ < @BITSIZEOF_UNSIGNED_INT@
583 #   define UINT_FAST8_MAX  (((1 << (@BITSIZEOF_UINT_FAST8_T@ - 1)) - 1) * 2 + 1)
584 #  else
585 #   define UINT_FAST8_MAX  (((1UL << (@BITSIZEOF_UINT_FAST8_T@ - 1)) - 1) * 2 + 1)
586 #  endif
587 # endif
588 #else
589 # if _STDINT_H_INT64_FASTER_THAN_INT32
590 #  define UINT_FAST8_MAX  UINT64_MAX
591 # else
592 #  define UINT_FAST8_MAX  UINT32_MAX
593 # endif
594 #endif
595
596 #if @HAVE_INT_FAST16_T@
597 # ifndef INT_FAST16_MIN
598 #  define INT_FAST16_MIN  (-1L << (@BITSIZEOF_INT_FAST16_T@ - 1))
599 # endif
600 #else
601 # if _STDINT_H_INT64_FASTER_THAN_INT32
602 #  define INT_FAST16_MIN  INT64_MIN
603 # else
604 #  define INT_FAST16_MIN  INT32_MIN
605 # endif
606 #endif
607 #if @HAVE_INT_FAST16_T@
608 # ifndef INT_FAST16_MAX
609 #  define INT_FAST16_MAX  (~ (-1L << (@BITSIZEOF_INT_FAST16_T@ - 1)))
610 # endif
611 #else
612 # if _STDINT_H_INT64_FASTER_THAN_INT32
613 #  define INT_FAST16_MAX  INT64_MAX
614 # else
615 #  define INT_FAST16_MAX  INT32_MAX
616 # endif
617 #endif
618 #if @HAVE_UINT_FAST16_T@
619 # ifndef UINT_FAST16_MAX
620 #  if @BITSIZEOF_UINT_FAST16_T@ < @BITSIZEOF_UNSIGNED_INT@
621 #   define UINT_FAST16_MAX  (((1 << (@BITSIZEOF_UINT_FAST16_T@ - 1)) - 1) * 2 + 1)
622 #  else
623 #   define UINT_FAST16_MAX  (((1UL << (@BITSIZEOF_UINT_FAST16_T@ - 1)) - 1) * 2 + 1)
624 #  endif
625 # endif
626 #else
627 # if _STDINT_H_INT64_FASTER_THAN_INT32
628 #  define UINT_FAST16_MAX  UINT64_MAX
629 # else
630 #  define UINT_FAST16_MAX  UINT32_MAX
631 # endif
632 #endif
633
634 #if @HAVE_INT_FAST32_T@
635 # ifndef INT_FAST32_MIN
636 #  define INT_FAST32_MIN  (-1L << (@BITSIZEOF_INT_FAST32_T@ - 1))
637 # endif
638 #else
639 # if _STDINT_H_INT64_FASTER_THAN_INT32
640 #  define INT_FAST32_MIN  INT64_MIN
641 # else
642 #  define INT_FAST32_MIN  INT32_MIN
643 # endif
644 #endif
645 #if @HAVE_INT_FAST32_T@
646 # ifndef INT_FAST32_MAX
647 #  define INT_FAST32_MAX  (~ (-1L << (@BITSIZEOF_INT_FAST32_T@ - 1)))
648 # endif
649 #else
650 # if _STDINT_H_INT64_FASTER_THAN_INT32
651 #  define INT_FAST32_MAX  INT64_MAX
652 # else
653 #  define INT_FAST32_MAX  INT32_MAX
654 # endif
655 #endif
656 #if @HAVE_UINT_FAST32_T@
657 # ifndef UINT_FAST32_MAX
658 #  if @BITSIZEOF_UINT_FAST32_T@ < @BITSIZEOF_UNSIGNED_INT@
659 #   define UINT_FAST32_MAX  (((1 << (@BITSIZEOF_UINT_FAST32_T@ - 1)) - 1) * 2 + 1)
660 #  else
661 #   define UINT_FAST32_MAX  (((1UL << (@BITSIZEOF_UINT_FAST32_T@ - 1)) - 1) * 2 + 1)
662 #  endif
663 # endif
664 #else
665 # if _STDINT_H_INT64_FASTER_THAN_INT32
666 #  define UINT_FAST32_MAX  UINT64_MAX
667 # else
668 #  define UINT_FAST32_MAX  UINT32_MAX
669 # endif
670 #endif
671
672 #if @HAVE_INT_FAST64_T@
673 # ifndef INT_FAST64_MIN
674 #  if @HAVE_LONG_64BIT@
675 #   define INT_FAST64_MIN  (-1L << (@BITSIZEOF_INT_FAST64_T@ - 1))
676 #  elif @HAVE_LONG_LONG_64BIT@
677 #   define INT_FAST64_MIN  (-1LL << (@BITSIZEOF_INT_FAST64_T@ - 1))
678 #  elif defined _MSC_VER
679 #   define INT_FAST64_MIN  (-1i64 << (@BITSIZEOF_INT_FAST64_T@ - 1))
680 #  endif
681 # endif
682 #else
683 # ifdef _STDINT_H_HAVE_INT64
684 #  define INT_FAST64_MIN  INT64_MIN
685 # endif
686 #endif
687 #if @HAVE_INT_FAST64_T@
688 # ifndef INT_FAST64_MAX
689 #  if @HAVE_LONG_64BIT@
690 #   define INT_FAST64_MAX  (~ (-1L << (@BITSIZEOF_INT_FAST64_T@ - 1)))
691 #  elif @HAVE_LONG_LONG_64BIT@
692 #   define INT_FAST64_MAX  (~ (-1LL << (@BITSIZEOF_INT_FAST64_T@ - 1)))
693 #  elif defined _MSC_VER
694 #   define INT_FAST64_MAX  (~ (-1i64 << (@BITSIZEOF_INT_FAST64_T@ - 1)))
695 #  endif
696 # endif
697 #else
698 # ifdef _STDINT_H_HAVE_INT64
699 #  define INT_FAST64_MAX  INT64_MAX
700 # endif
701 #endif
702 #if @HAVE_UINT_FAST64_T@
703 # ifndef UINT_FAST64_MAX
704 #  if @HAVE_LONG_64BIT@
705 #   define UINT_FAST64_MAX  (((1UL << (@BITSIZEOF_UINT_FAST64_T@ - 1)) - 1) * 2 + 1)
706 #  elif @HAVE_LONG_LONG_64BIT@
707 #   define UINT_FAST64_MAX  (((1ULL << (@BITSIZEOF_UINT_FAST64_T@ - 1)) - 1) * 2 + 1)
708 #  elif defined _MSC_VER
709 #   define UINT_FAST64_MAX  (((1ui64 << (@BITSIZEOF_UINT_FAST64_T@ - 1)) - 1) * 2 + 1)
710 #  endif
711 # endif
712 #else
713 # ifdef _STDINT_H_HAVE_UINT64
714 #  define UINT_FAST64_MAX  UINT64_MAX
715 # endif
716 #endif
717
718 /* 7.18.2.4. Limits of integer types capable of holding object pointers */
719
720 #if @HAVE_INTPTR_T@
721 # ifndef INTPTR_MIN
722 #  if @BITSIZEOF_INTPTR_T@ > @BITSIZEOF_LONG@
723 #   define INTPTR_MIN  (-1LL << (@BITSIZEOF_INTPTR_T@ - 1))
724 #  else
725 #   define INTPTR_MIN  (-1L << (@BITSIZEOF_INTPTR_T@ - 1))
726 #  endif
727 # endif
728 #else
729 # define INTPTR_MIN  LONG_MIN
730 #endif
731 #if @HAVE_INTPTR_T@
732 # ifndef INTPTR_MAX
733 #  if @BITSIZEOF_INTPTR_T@ > @BITSIZEOF_LONG@
734 #   define INTPTR_MAX  (~ (-1LL << (@BITSIZEOF_INTPTR_T@ - 1)))
735 #  else
736 #   define INTPTR_MAX  (~ (-1L << (@BITSIZEOF_INTPTR_T@ - 1)))
737 #  endif
738 # endif
739 #else
740 # define INTPTR_MAX  LONG_MAX
741 #endif
742 #if @HAVE_UINTPTR_T@
743 # ifndef UINTPTR_MAX
744 #  if @BITSIZEOF_UINTPTR_T@ > @BITSIZEOF_UNSIGNED_LONG@
745 #   define UINTPTR_MAX  (((1ULL << (@BITSIZEOF_UINTPTR_T@ - 1)) - 1) * 2 + 1)
746 #  else
747 #   define UINTPTR_MAX  (((1UL << (@BITSIZEOF_UINTPTR_T@ - 1)) - 1) * 2 + 1)
748 #  endif
749 # endif
750 #else
751 # define UINTPTR_MAX  ULONG_MAX
752 #endif
753
754 /* 7.18.2.5. Limits of greatest-width integer types */
755
756 #if @HAVE_INTMAX_T@
757 # ifndef INTMAX_MIN
758 #  if @BITSIZEOF_INTMAX_T@ > @BITSIZEOF_LONG@
759 #   define INTMAX_MIN  (-1LL << (@BITSIZEOF_INTMAX_T@ - 1))
760 #  else
761 #   define INTMAX_MIN  (-1L << (@BITSIZEOF_INTMAX_T@ - 1))
762 #  endif
763 # endif
764 #else
765 # ifdef _STDINT_H_HAVE_INT64
766 #  define INTMAX_MIN  INT64_MIN
767 # else
768 #  define INTMAX_MIN  INT32_MIN
769 # endif
770 #endif
771 #if @HAVE_INTMAX_T@
772 # ifndef INTMAX_MAX
773 #  if @BITSIZEOF_INTMAX_T@ > @BITSIZEOF_LONG@
774 #   define INTMAX_MAX  (~ (-1LL << (@BITSIZEOF_INTMAX_T@ - 1)))
775 #  else
776 #   define INTMAX_MAX  (~ (-1L << (@BITSIZEOF_INTMAX_T@ - 1)))
777 #  endif
778 # endif
779 #else
780 # ifdef _STDINT_H_HAVE_INT64
781 #  define INTMAX_MAX  INT64_MAX
782 # else
783 #  define INTMAX_MAX  INT32_MAX
784 # endif
785 #endif
786 #if @HAVE_UINTMAX_T@
787 # ifndef UINTMAX_MAX
788 #  if @BITSIZEOF_UINTMAX_T@ > @BITSIZEOF_UNSIGNED_LONG@
789 #   define UINTMAX_MAX  (((1ULL << (@BITSIZEOF_UINTMAX_T@ - 1)) - 1) * 2 + 1)
790 #  else
791 #   define UINTMAX_MAX  (((1UL << (@BITSIZEOF_UINTMAX_T@ - 1)) - 1) * 2 + 1)
792 #  endif
793 # endif
794 #else
795 # ifdef _STDINT_H_HAVE_INT64
796 #  define UINTMAX_MAX  UINT64_MAX
797 # else
798 #  define UINTMAX_MAX  UINT32_MAX
799 # endif
800 #endif
801
802 /* 7.18.3. Limits of other integer types */
803
804 /* ptrdiff_t limits */
805 #ifndef PTRDIFF_MIN
806 # if @BITSIZEOF_PTRDIFF_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_PTRDIFF_T_LONG@
807 #  define PTRDIFF_MIN  (-1L << (@BITSIZEOF_PTRDIFF_T@ - 1))
808 # else
809 #  define PTRDIFF_MIN  (-1 << (@BITSIZEOF_PTRDIFF_T@ - 1))
810 # endif
811 #endif
812 #ifndef PTRDIFF_MAX
813 # if @BITSIZEOF_PTRDIFF_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_PTRDIFF_T_LONG@
814 #  define PTRDIFF_MAX  (~ (-1L << (@BITSIZEOF_PTRDIFF_T@ - 1)))
815 # else
816 #  define PTRDIFF_MAX  (~ (-1 << (@BITSIZEOF_PTRDIFF_T@ - 1)))
817 # endif
818 #endif
819
820 /* sig_atomic_t limits */
821 #ifndef SIG_ATOMIC_MIN
822 # if @HAVE_SIGNED_SIG_ATOMIC_T@
823 #  if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_LONG@
824 #   define SIG_ATOMIC_MIN  (-1L << (@BITSIZEOF_SIG_ATOMIC_T@ - 1))
825 #  else
826 #   define SIG_ATOMIC_MIN  (-1 << (@BITSIZEOF_SIG_ATOMIC_T@ - 1))
827 #  endif
828 # else
829 #  if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_UNSIGNED_LONG@
830 #   define SIG_ATOMIC_MIN  0UL
831 #  elif @BITSIZEOF_SIG_ATOMIC_T@ >= @BITSIZEOF_UNSIGNED_INT@
832 #   define SIG_ATOMIC_MIN  0U
833 #  else
834 #   define SIG_ATOMIC_MIN  0
835 #  endif
836 # endif
837 #endif
838 #ifndef SIG_ATOMIC_MAX
839 # if @HAVE_SIGNED_SIG_ATOMIC_T@
840 #  if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_LONG@
841 #   define SIG_ATOMIC_MAX  (~ (-1L << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)))
842 #  else
843 #   define SIG_ATOMIC_MAX  (~ (-1 << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)))
844 #  endif
845 # else
846 #  if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_UNSIGNED_LONG@
847 #   define SIG_ATOMIC_MAX  (((1UL << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)) - 1) * 2 + 1)
848 #  elif @BITSIZEOF_SIG_ATOMIC_T@ >= @BITSIZEOF_UNSIGNED_INT@
849 #   define SIG_ATOMIC_MAX  (((1U << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)) - 1) * 2 + 1)
850 #  else
851 #   define SIG_ATOMIC_MAX  (((1 << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)) - 1) * 2 + 1)
852 #  endif
853 # endif
854 #endif
855
856 /* size_t limit */
857 #ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */
858 # if @BITSIZEOF_SIZE_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_SIZE_T_UNSIGNED_LONG@
859 #  define SIZE_MAX  (((1UL << (@BITSIZEOF_SIZE_T@ - 1)) - 1) * 2 + 1)
860 # else
861 #  define SIZE_MAX  (((1U << (@BITSIZEOF_SIZE_T@ - 1)) - 1) * 2 + 1)
862 # endif
863 #endif
864
865 /* wchar_t limits may already be defined in <stddef.h>.  */
866 #ifndef WCHAR_MIN
867 # if @HAVE_SIGNED_WCHAR_T@
868 #  if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WCHAR_T_LONG@
869 #   define WCHAR_MIN  (-1L << (@BITSIZEOF_WCHAR_T@ - 1))
870 #  else
871 #   define WCHAR_MIN  (-1 << (@BITSIZEOF_WCHAR_T@ - 1))
872 #  endif
873 # else
874 #  if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WCHAR_T_UNSIGNED_LONG@
875 #   define WCHAR_MIN  0UL
876 #  elif @BITSIZEOF_WCHAR_T@ >= @BITSIZEOF_UNSIGNED_INT@
877 #   define WCHAR_MIN  0U
878 #  else
879 #   define WCHAR_MIN  0
880 #  endif
881 # endif
882 #endif
883 #ifndef WCHAR_MAX
884 # if @HAVE_SIGNED_WCHAR_T@
885 #  if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WCHAR_T_LONG@
886 #   define WCHAR_MAX  (~ (-1L << (@BITSIZEOF_WCHAR_T@ - 1)))
887 #  else
888 #   define WCHAR_MAX  (~ (-1 << (@BITSIZEOF_WCHAR_T@ - 1)))
889 #  endif
890 # else
891 #  if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WCHAR_T_UNSIGNED_LONG@
892 #   define WCHAR_MAX  (((1UL << (@BITSIZEOF_WCHAR_T@ - 1)) - 1) * 2 + 1)
893 #  elif @BITSIZEOF_WCHAR_T@ >= @BITSIZEOF_UNSIGNED_INT@
894 #   define WCHAR_MAX  (((1U << (@BITSIZEOF_WCHAR_T@ - 1)) - 1) * 2 + 1)
895 #  else
896 #   define WCHAR_MAX  (((1 << (@BITSIZEOF_WCHAR_T@ - 1)) - 1) * 2 + 1)
897 #  endif
898 # endif
899 #endif
900
901 /* wint_t limits */
902 #ifndef WINT_MIN
903 # if @HAVE_SIGNED_WINT_T@
904 #  if @BITSIZEOF_WINT_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WINT_T_LONG@
905 #   define WINT_MIN  (-1L << (@BITSIZEOF_WINT_T@ - 1))
906 #  else
907 #   define WINT_MIN  (-1 << (@BITSIZEOF_WINT_T@ - 1))
908 #  endif
909 # else
910 #  if @BITSIZEOF_WINT_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WINT_T_UNSIGNED_LONG@
911 #   define WINT_MIN  0UL
912 #  elif @BITSIZEOF_WINT_T@ >= @BITSIZEOF_UNSIGNED_INT@
913 #   define WINT_MIN  0U
914 #  else
915 #   define WINT_MIN  0
916 #  endif
917 # endif
918 #endif
919 #ifndef WINT_MAX
920 # if @HAVE_SIGNED_WINT_T@
921 #  if @BITSIZEOF_WINT_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WINT_T_LONG@
922 #   define WINT_MAX  (~ (-1L << (@BITSIZEOF_WINT_T@ - 1)))
923 #  else
924 #   define WINT_MAX  (~ (-1 << (@BITSIZEOF_WINT_T@ - 1)))
925 #  endif
926 # else
927 #  if @BITSIZEOF_WINT_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WINT_T_UNSIGNED_LONG@
928 #   define WINT_MAX  (((1UL << (@BITSIZEOF_WINT_T@ - 1)) - 1) * 2 + 1)
929 #  elif @BITSIZEOF_WINT_T@ >= @BITSIZEOF_UNSIGNED_INT@
930 #   define WINT_MAX  (((1U << (@BITSIZEOF_WINT_T@ - 1)) - 1) * 2 + 1)
931 #  else
932 #   define WINT_MAX  (((1 << (@BITSIZEOF_WINT_T@ - 1)) - 1) * 2 + 1)
933 #  endif
934 # endif
935 #endif
936
937 #endif
938
939 /* 7.18.4. Macros for integer constants */
940
941 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
942
943 /* 7.18.4.1. Macros for minimum-width integer constants */
944 /* According to ISO C 99 Technical Corrigendum 1 */
945
946 #undef INT8_C
947 #undef UINT8_C
948 #define INT8_C(x) x
949 #if @HAVE_UINT8_T@
950 # if @BITSIZEOF_UINT8_T@ < @BITSIZEOF_UNSIGNED_INT@
951 #  define UINT8_C(x) x
952 # else
953 #  define UINT8_C(x) x##U
954 # endif
955 #else
956 # define UINT8_C(x) x
957 #endif
958
959 #undef INT16_C
960 #undef UINT16_C
961 #define INT16_C(x) x
962 #if @HAVE_UINT16_T@
963 # if @BITSIZEOF_UINT16_T@ < @BITSIZEOF_UNSIGNED_INT@
964 #  define UINT16_C(x) x
965 # else
966 #  define UINT16_C(x) x##U
967 # endif
968 #else
969 # define UINT16_C(x) x
970 #endif
971
972 #undef INT32_C
973 #undef UINT32_C
974 #define INT32_C(x) x
975 #if @HAVE_UINT32_T@
976 # if @BITSIZEOF_UINT32_T@ < @BITSIZEOF_UNSIGNED_INT@
977 #  define UINT32_C(x) x
978 # else
979 #  define UINT32_C(x) x##U
980 # endif
981 #else
982 # define UINT32_C(x) x
983 #endif
984
985 #undef INT64_C
986 #undef UINT64_C
987 #if @HAVE_LONG_64BIT@
988 # define INT64_C(x) x##L
989 # define UINT64_C(x) x##UL
990 #elif @HAVE_LONG_LONG_64BIT@
991 # define INT64_C(x) x##LL
992 # define UINT64_C(x) x##ULL
993 #elif defined(_MSC_VER)
994 # define INT64_C(x) x##i64
995 # define UINT64_C(x) x##ui64
996 #endif
997
998 /* 7.18.4.2. Macros for greatest-width integer constants */
999
1000 #undef INTMAX_C
1001 #undef UINTMAX_C
1002 #if @HAVE_LONG_64BIT@
1003 # define INTMAX_C(x) x##L
1004 # define UINTMAX_C(x) x##UL
1005 #elif @HAVE_LONG_LONG_64BIT@
1006 # define INTMAX_C(x) x##LL
1007 # define UINTMAX_C(x) x##ULL
1008 #elif defined(_MSC_VER)
1009 # define INTMAX_C(x) x##i64
1010 # define UINTMAX_C(x) x##ui64
1011 #else
1012 # define INTMAX_C(x) x
1013 # define UINTMAX_C(x) x##U
1014 #endif
1015
1016 #endif
1017
1018 #endif /* _STDINT_H */