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