]> code.delx.au - gnu-emacs/blob - lib/inttypes.h
* Makefile.in (GNULIB_MODULES): Add strtoumax.
[gnu-emacs] / lib / inttypes.h
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Copyright (C) 2006-2011 Free Software Foundation, Inc.
3 Written by Paul Eggert, Bruno Haible, Derek Price.
4 This file is part of gnulib.
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 /*
20 * ISO C 99 <inttypes.h> for platforms that lack it.
21 * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
22 */
23
24 #if __GNUC__ >= 3
25 #pragma GCC system_header
26 #endif
27
28
29 /* Include the original <inttypes.h> if it exists, and if this file
30 has not been included yet or if this file includes gnulib stdint.h
31 which in turn includes this file.
32 The include_next requires a split double-inclusion guard. */
33 #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
34 # if 1
35 # include_next <inttypes.h>
36 # endif
37 #endif
38
39 #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
40 #define INTTYPES_H
41
42 /* Include <stdint.h> or the gnulib replacement.
43 But avoid namespace pollution on glibc systems. */
44 #ifndef __GLIBC__
45 # include <stdint.h>
46 #endif
47 /* Get CHAR_BIT. */
48 #include <limits.h>
49
50 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
51 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
52 #endif
53
54 /* The definition of _GL_ARG_NONNULL is copied here. */
55 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
56 that the values passed as arguments n, ..., m must be non-NULL pointers.
57 n = 1 stands for the first argument, n = 2 for the second argument etc. */
58 #ifndef _GL_ARG_NONNULL
59 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
60 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
61 # else
62 # define _GL_ARG_NONNULL(params)
63 # endif
64 #endif
65
66 /* The definition of _GL_WARN_ON_USE is copied here. */
67 #ifndef _GL_WARN_ON_USE
68
69 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
70 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
71 # define _GL_WARN_ON_USE(function, message) \
72 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
73 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
74 /* Verify the existence of the function. */
75 # define _GL_WARN_ON_USE(function, message) \
76 extern __typeof__ (function) function
77 # else /* Unsupported. */
78 # define _GL_WARN_ON_USE(function, message) \
79 _GL_WARN_EXTERN_C int _gl_warn_on_use
80 # endif
81 #endif
82
83 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
84 is like _GL_WARN_ON_USE (function, "string"), except that the function is
85 declared with the given prototype, consisting of return type, parameters,
86 and attributes.
87 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
88 not work in this case. */
89 #ifndef _GL_WARN_ON_USE_CXX
90 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
91 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
92 extern rettype function parameters_and_attributes \
93 __attribute__ ((__warning__ (msg)))
94 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
95 /* Verify the existence of the function. */
96 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
97 extern rettype function parameters_and_attributes
98 # else /* Unsupported. */
99 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
100 _GL_WARN_EXTERN_C int _gl_warn_on_use
101 # endif
102 #endif
103
104 /* _GL_WARN_EXTERN_C declaration;
105 performs the declaration with C linkage. */
106 #ifndef _GL_WARN_EXTERN_C
107 # if defined __cplusplus
108 # define _GL_WARN_EXTERN_C extern "C"
109 # else
110 # define _GL_WARN_EXTERN_C extern
111 # endif
112 #endif
113
114 /* 7.8.1 Macros for format specifiers */
115
116 #if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
117
118 # if defined _TNS_R_TARGET
119 /* Tandem NonStop R series and compatible platforms released before
120 July 2005 support %Ld but not %lld. */
121 # define _LONG_LONG_FORMAT_PREFIX "L"
122 # else
123 # define _LONG_LONG_FORMAT_PREFIX "ll"
124 # endif
125
126 # if !defined PRId8 || 0
127 # undef PRId8
128 # ifdef INT8_MAX
129 # define PRId8 "d"
130 # endif
131 # endif
132 # if !defined PRIi8 || 0
133 # undef PRIi8
134 # ifdef INT8_MAX
135 # define PRIi8 "i"
136 # endif
137 # endif
138 # if !defined PRIo8 || 0
139 # undef PRIo8
140 # ifdef UINT8_MAX
141 # define PRIo8 "o"
142 # endif
143 # endif
144 # if !defined PRIu8 || 0
145 # undef PRIu8
146 # ifdef UINT8_MAX
147 # define PRIu8 "u"
148 # endif
149 # endif
150 # if !defined PRIx8 || 0
151 # undef PRIx8
152 # ifdef UINT8_MAX
153 # define PRIx8 "x"
154 # endif
155 # endif
156 # if !defined PRIX8 || 0
157 # undef PRIX8
158 # ifdef UINT8_MAX
159 # define PRIX8 "X"
160 # endif
161 # endif
162 # if !defined PRId16 || 0
163 # undef PRId16
164 # ifdef INT16_MAX
165 # define PRId16 "d"
166 # endif
167 # endif
168 # if !defined PRIi16 || 0
169 # undef PRIi16
170 # ifdef INT16_MAX
171 # define PRIi16 "i"
172 # endif
173 # endif
174 # if !defined PRIo16 || 0
175 # undef PRIo16
176 # ifdef UINT16_MAX
177 # define PRIo16 "o"
178 # endif
179 # endif
180 # if !defined PRIu16 || 0
181 # undef PRIu16
182 # ifdef UINT16_MAX
183 # define PRIu16 "u"
184 # endif
185 # endif
186 # if !defined PRIx16 || 0
187 # undef PRIx16
188 # ifdef UINT16_MAX
189 # define PRIx16 "x"
190 # endif
191 # endif
192 # if !defined PRIX16 || 0
193 # undef PRIX16
194 # ifdef UINT16_MAX
195 # define PRIX16 "X"
196 # endif
197 # endif
198 # if !defined PRId32 || 0
199 # undef PRId32
200 # ifdef INT32_MAX
201 # define PRId32 "d"
202 # endif
203 # endif
204 # if !defined PRIi32 || 0
205 # undef PRIi32
206 # ifdef INT32_MAX
207 # define PRIi32 "i"
208 # endif
209 # endif
210 # if !defined PRIo32 || 0
211 # undef PRIo32
212 # ifdef UINT32_MAX
213 # define PRIo32 "o"
214 # endif
215 # endif
216 # if !defined PRIu32 || 0
217 # undef PRIu32
218 # ifdef UINT32_MAX
219 # define PRIu32 "u"
220 # endif
221 # endif
222 # if !defined PRIx32 || 0
223 # undef PRIx32
224 # ifdef UINT32_MAX
225 # define PRIx32 "x"
226 # endif
227 # endif
228 # if !defined PRIX32 || 0
229 # undef PRIX32
230 # ifdef UINT32_MAX
231 # define PRIX32 "X"
232 # endif
233 # endif
234 # ifdef INT64_MAX
235 # if (0 ? defined _LP64 : 1)
236 # define _PRI64_PREFIX "l"
237 # elif defined _MSC_VER || defined __MINGW32__
238 # define _PRI64_PREFIX "I64"
239 # elif 1 && LONG_MAX >> 30 == 1
240 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
241 # endif
242 # if !defined PRId64 || 0
243 # undef PRId64
244 # define PRId64 _PRI64_PREFIX "d"
245 # endif
246 # if !defined PRIi64 || 0
247 # undef PRIi64
248 # define PRIi64 _PRI64_PREFIX "i"
249 # endif
250 # endif
251 # ifdef UINT64_MAX
252 # if (0 ? defined _LP64 : 1)
253 # define _PRIu64_PREFIX "l"
254 # elif defined _MSC_VER || defined __MINGW32__
255 # define _PRIu64_PREFIX "I64"
256 # elif 1 && ULONG_MAX >> 31 == 1
257 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
258 # endif
259 # if !defined PRIo64 || 0
260 # undef PRIo64
261 # define PRIo64 _PRIu64_PREFIX "o"
262 # endif
263 # if !defined PRIu64 || 0
264 # undef PRIu64
265 # define PRIu64 _PRIu64_PREFIX "u"
266 # endif
267 # if !defined PRIx64 || 0
268 # undef PRIx64
269 # define PRIx64 _PRIu64_PREFIX "x"
270 # endif
271 # if !defined PRIX64 || 0
272 # undef PRIX64
273 # define PRIX64 _PRIu64_PREFIX "X"
274 # endif
275 # endif
276
277 # if !defined PRIdLEAST8 || 0
278 # undef PRIdLEAST8
279 # define PRIdLEAST8 "d"
280 # endif
281 # if !defined PRIiLEAST8 || 0
282 # undef PRIiLEAST8
283 # define PRIiLEAST8 "i"
284 # endif
285 # if !defined PRIoLEAST8 || 0
286 # undef PRIoLEAST8
287 # define PRIoLEAST8 "o"
288 # endif
289 # if !defined PRIuLEAST8 || 0
290 # undef PRIuLEAST8
291 # define PRIuLEAST8 "u"
292 # endif
293 # if !defined PRIxLEAST8 || 0
294 # undef PRIxLEAST8
295 # define PRIxLEAST8 "x"
296 # endif
297 # if !defined PRIXLEAST8 || 0
298 # undef PRIXLEAST8
299 # define PRIXLEAST8 "X"
300 # endif
301 # if !defined PRIdLEAST16 || 0
302 # undef PRIdLEAST16
303 # define PRIdLEAST16 "d"
304 # endif
305 # if !defined PRIiLEAST16 || 0
306 # undef PRIiLEAST16
307 # define PRIiLEAST16 "i"
308 # endif
309 # if !defined PRIoLEAST16 || 0
310 # undef PRIoLEAST16
311 # define PRIoLEAST16 "o"
312 # endif
313 # if !defined PRIuLEAST16 || 0
314 # undef PRIuLEAST16
315 # define PRIuLEAST16 "u"
316 # endif
317 # if !defined PRIxLEAST16 || 0
318 # undef PRIxLEAST16
319 # define PRIxLEAST16 "x"
320 # endif
321 # if !defined PRIXLEAST16 || 0
322 # undef PRIXLEAST16
323 # define PRIXLEAST16 "X"
324 # endif
325 # if !defined PRIdLEAST32 || 0
326 # undef PRIdLEAST32
327 # define PRIdLEAST32 "d"
328 # endif
329 # if !defined PRIiLEAST32 || 0
330 # undef PRIiLEAST32
331 # define PRIiLEAST32 "i"
332 # endif
333 # if !defined PRIoLEAST32 || 0
334 # undef PRIoLEAST32
335 # define PRIoLEAST32 "o"
336 # endif
337 # if !defined PRIuLEAST32 || 0
338 # undef PRIuLEAST32
339 # define PRIuLEAST32 "u"
340 # endif
341 # if !defined PRIxLEAST32 || 0
342 # undef PRIxLEAST32
343 # define PRIxLEAST32 "x"
344 # endif
345 # if !defined PRIXLEAST32 || 0
346 # undef PRIXLEAST32
347 # define PRIXLEAST32 "X"
348 # endif
349 # ifdef INT64_MAX
350 # if !defined PRIdLEAST64 || 0
351 # undef PRIdLEAST64
352 # define PRIdLEAST64 PRId64
353 # endif
354 # if !defined PRIiLEAST64 || 0
355 # undef PRIiLEAST64
356 # define PRIiLEAST64 PRIi64
357 # endif
358 # endif
359 # ifdef UINT64_MAX
360 # if !defined PRIoLEAST64 || 0
361 # undef PRIoLEAST64
362 # define PRIoLEAST64 PRIo64
363 # endif
364 # if !defined PRIuLEAST64 || 0
365 # undef PRIuLEAST64
366 # define PRIuLEAST64 PRIu64
367 # endif
368 # if !defined PRIxLEAST64 || 0
369 # undef PRIxLEAST64
370 # define PRIxLEAST64 PRIx64
371 # endif
372 # if !defined PRIXLEAST64 || 0
373 # undef PRIXLEAST64
374 # define PRIXLEAST64 PRIX64
375 # endif
376 # endif
377
378 # if !defined PRIdFAST8 || 0
379 # undef PRIdFAST8
380 # if INT_FAST8_MAX > INT32_MAX
381 # define PRIdFAST8 PRId64
382 # else
383 # define PRIdFAST8 "d"
384 # endif
385 # endif
386 # if !defined PRIiFAST8 || 0
387 # undef PRIiFAST8
388 # if INT_FAST8_MAX > INT32_MAX
389 # define PRIiFAST8 PRIi64
390 # else
391 # define PRIiFAST8 "i"
392 # endif
393 # endif
394 # if !defined PRIoFAST8 || 0
395 # undef PRIoFAST8
396 # if UINT_FAST8_MAX > UINT32_MAX
397 # define PRIoFAST8 PRIo64
398 # else
399 # define PRIoFAST8 "o"
400 # endif
401 # endif
402 # if !defined PRIuFAST8 || 0
403 # undef PRIuFAST8
404 # if UINT_FAST8_MAX > UINT32_MAX
405 # define PRIuFAST8 PRIu64
406 # else
407 # define PRIuFAST8 "u"
408 # endif
409 # endif
410 # if !defined PRIxFAST8 || 0
411 # undef PRIxFAST8
412 # if UINT_FAST8_MAX > UINT32_MAX
413 # define PRIxFAST8 PRIx64
414 # else
415 # define PRIxFAST8 "x"
416 # endif
417 # endif
418 # if !defined PRIXFAST8 || 0
419 # undef PRIXFAST8
420 # if UINT_FAST8_MAX > UINT32_MAX
421 # define PRIXFAST8 PRIX64
422 # else
423 # define PRIXFAST8 "X"
424 # endif
425 # endif
426 # if !defined PRIdFAST16 || 0
427 # undef PRIdFAST16
428 # if INT_FAST16_MAX > INT32_MAX
429 # define PRIdFAST16 PRId64
430 # else
431 # define PRIdFAST16 "d"
432 # endif
433 # endif
434 # if !defined PRIiFAST16 || 0
435 # undef PRIiFAST16
436 # if INT_FAST16_MAX > INT32_MAX
437 # define PRIiFAST16 PRIi64
438 # else
439 # define PRIiFAST16 "i"
440 # endif
441 # endif
442 # if !defined PRIoFAST16 || 0
443 # undef PRIoFAST16
444 # if UINT_FAST16_MAX > UINT32_MAX
445 # define PRIoFAST16 PRIo64
446 # else
447 # define PRIoFAST16 "o"
448 # endif
449 # endif
450 # if !defined PRIuFAST16 || 0
451 # undef PRIuFAST16
452 # if UINT_FAST16_MAX > UINT32_MAX
453 # define PRIuFAST16 PRIu64
454 # else
455 # define PRIuFAST16 "u"
456 # endif
457 # endif
458 # if !defined PRIxFAST16 || 0
459 # undef PRIxFAST16
460 # if UINT_FAST16_MAX > UINT32_MAX
461 # define PRIxFAST16 PRIx64
462 # else
463 # define PRIxFAST16 "x"
464 # endif
465 # endif
466 # if !defined PRIXFAST16 || 0
467 # undef PRIXFAST16
468 # if UINT_FAST16_MAX > UINT32_MAX
469 # define PRIXFAST16 PRIX64
470 # else
471 # define PRIXFAST16 "X"
472 # endif
473 # endif
474 # if !defined PRIdFAST32 || 0
475 # undef PRIdFAST32
476 # if INT_FAST32_MAX > INT32_MAX
477 # define PRIdFAST32 PRId64
478 # else
479 # define PRIdFAST32 "d"
480 # endif
481 # endif
482 # if !defined PRIiFAST32 || 0
483 # undef PRIiFAST32
484 # if INT_FAST32_MAX > INT32_MAX
485 # define PRIiFAST32 PRIi64
486 # else
487 # define PRIiFAST32 "i"
488 # endif
489 # endif
490 # if !defined PRIoFAST32 || 0
491 # undef PRIoFAST32
492 # if UINT_FAST32_MAX > UINT32_MAX
493 # define PRIoFAST32 PRIo64
494 # else
495 # define PRIoFAST32 "o"
496 # endif
497 # endif
498 # if !defined PRIuFAST32 || 0
499 # undef PRIuFAST32
500 # if UINT_FAST32_MAX > UINT32_MAX
501 # define PRIuFAST32 PRIu64
502 # else
503 # define PRIuFAST32 "u"
504 # endif
505 # endif
506 # if !defined PRIxFAST32 || 0
507 # undef PRIxFAST32
508 # if UINT_FAST32_MAX > UINT32_MAX
509 # define PRIxFAST32 PRIx64
510 # else
511 # define PRIxFAST32 "x"
512 # endif
513 # endif
514 # if !defined PRIXFAST32 || 0
515 # undef PRIXFAST32
516 # if UINT_FAST32_MAX > UINT32_MAX
517 # define PRIXFAST32 PRIX64
518 # else
519 # define PRIXFAST32 "X"
520 # endif
521 # endif
522 # ifdef INT64_MAX
523 # if !defined PRIdFAST64 || 0
524 # undef PRIdFAST64
525 # define PRIdFAST64 PRId64
526 # endif
527 # if !defined PRIiFAST64 || 0
528 # undef PRIiFAST64
529 # define PRIiFAST64 PRIi64
530 # endif
531 # endif
532 # ifdef UINT64_MAX
533 # if !defined PRIoFAST64 || 0
534 # undef PRIoFAST64
535 # define PRIoFAST64 PRIo64
536 # endif
537 # if !defined PRIuFAST64 || 0
538 # undef PRIuFAST64
539 # define PRIuFAST64 PRIu64
540 # endif
541 # if !defined PRIxFAST64 || 0
542 # undef PRIxFAST64
543 # define PRIxFAST64 PRIx64
544 # endif
545 # if !defined PRIXFAST64 || 0
546 # undef PRIXFAST64
547 # define PRIXFAST64 PRIX64
548 # endif
549 # endif
550
551 # if !defined PRIdMAX || 0
552 # undef PRIdMAX
553 # if 1
554 # define PRIdMAX PRId64
555 # else
556 # define PRIdMAX "ld"
557 # endif
558 # endif
559 # if !defined PRIiMAX || 0
560 # undef PRIiMAX
561 # if 1
562 # define PRIiMAX PRIi64
563 # else
564 # define PRIiMAX "li"
565 # endif
566 # endif
567 # if !defined PRIoMAX || 0
568 # undef PRIoMAX
569 # if 1
570 # define PRIoMAX PRIo64
571 # else
572 # define PRIoMAX "lo"
573 # endif
574 # endif
575 # if !defined PRIuMAX || 0
576 # undef PRIuMAX
577 # if 1
578 # define PRIuMAX PRIu64
579 # else
580 # define PRIuMAX "lu"
581 # endif
582 # endif
583 # if !defined PRIxMAX || 0
584 # undef PRIxMAX
585 # if 1
586 # define PRIxMAX PRIx64
587 # else
588 # define PRIxMAX "lx"
589 # endif
590 # endif
591 # if !defined PRIXMAX || 0
592 # undef PRIXMAX
593 # if 1
594 # define PRIXMAX PRIX64
595 # else
596 # define PRIXMAX "lX"
597 # endif
598 # endif
599
600 # if !defined PRIdPTR || 0
601 # undef PRIdPTR
602 # ifdef INTPTR_MAX
603 # define PRIdPTR "l" "d"
604 # endif
605 # endif
606 # if !defined PRIiPTR || 0
607 # undef PRIiPTR
608 # ifdef INTPTR_MAX
609 # define PRIiPTR "l" "i"
610 # endif
611 # endif
612 # if !defined PRIoPTR || 0
613 # undef PRIoPTR
614 # ifdef UINTPTR_MAX
615 # define PRIoPTR "l" "o"
616 # endif
617 # endif
618 # if !defined PRIuPTR || 0
619 # undef PRIuPTR
620 # ifdef UINTPTR_MAX
621 # define PRIuPTR "l" "u"
622 # endif
623 # endif
624 # if !defined PRIxPTR || 0
625 # undef PRIxPTR
626 # ifdef UINTPTR_MAX
627 # define PRIxPTR "l" "x"
628 # endif
629 # endif
630 # if !defined PRIXPTR || 0
631 # undef PRIXPTR
632 # ifdef UINTPTR_MAX
633 # define PRIXPTR "l" "X"
634 # endif
635 # endif
636
637 # if !defined SCNd8 || 0
638 # undef SCNd8
639 # ifdef INT8_MAX
640 # define SCNd8 "hhd"
641 # endif
642 # endif
643 # if !defined SCNi8 || 0
644 # undef SCNi8
645 # ifdef INT8_MAX
646 # define SCNi8 "hhi"
647 # endif
648 # endif
649 # if !defined SCNo8 || 0
650 # undef SCNo8
651 # ifdef UINT8_MAX
652 # define SCNo8 "hho"
653 # endif
654 # endif
655 # if !defined SCNu8 || 0
656 # undef SCNu8
657 # ifdef UINT8_MAX
658 # define SCNu8 "hhu"
659 # endif
660 # endif
661 # if !defined SCNx8 || 0
662 # undef SCNx8
663 # ifdef UINT8_MAX
664 # define SCNx8 "hhx"
665 # endif
666 # endif
667 # if !defined SCNd16 || 0
668 # undef SCNd16
669 # ifdef INT16_MAX
670 # define SCNd16 "hd"
671 # endif
672 # endif
673 # if !defined SCNi16 || 0
674 # undef SCNi16
675 # ifdef INT16_MAX
676 # define SCNi16 "hi"
677 # endif
678 # endif
679 # if !defined SCNo16 || 0
680 # undef SCNo16
681 # ifdef UINT16_MAX
682 # define SCNo16 "ho"
683 # endif
684 # endif
685 # if !defined SCNu16 || 0
686 # undef SCNu16
687 # ifdef UINT16_MAX
688 # define SCNu16 "hu"
689 # endif
690 # endif
691 # if !defined SCNx16 || 0
692 # undef SCNx16
693 # ifdef UINT16_MAX
694 # define SCNx16 "hx"
695 # endif
696 # endif
697 # if !defined SCNd32 || 0
698 # undef SCNd32
699 # ifdef INT32_MAX
700 # define SCNd32 "d"
701 # endif
702 # endif
703 # if !defined SCNi32 || 0
704 # undef SCNi32
705 # ifdef INT32_MAX
706 # define SCNi32 "i"
707 # endif
708 # endif
709 # if !defined SCNo32 || 0
710 # undef SCNo32
711 # ifdef UINT32_MAX
712 # define SCNo32 "o"
713 # endif
714 # endif
715 # if !defined SCNu32 || 0
716 # undef SCNu32
717 # ifdef UINT32_MAX
718 # define SCNu32 "u"
719 # endif
720 # endif
721 # if !defined SCNx32 || 0
722 # undef SCNx32
723 # ifdef UINT32_MAX
724 # define SCNx32 "x"
725 # endif
726 # endif
727 # ifdef INT64_MAX
728 # if (0 ? defined _LP64 : 1)
729 # define _SCN64_PREFIX "l"
730 # elif defined _MSC_VER || defined __MINGW32__
731 # define _SCN64_PREFIX "I64"
732 # elif 1 && LONG_MAX >> 30 == 1
733 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
734 # endif
735 # if !defined SCNd64 || 0
736 # undef SCNd64
737 # define SCNd64 _SCN64_PREFIX "d"
738 # endif
739 # if !defined SCNi64 || 0
740 # undef SCNi64
741 # define SCNi64 _SCN64_PREFIX "i"
742 # endif
743 # endif
744 # ifdef UINT64_MAX
745 # if (0 ? defined _LP64 : 1)
746 # define _SCNu64_PREFIX "l"
747 # elif defined _MSC_VER || defined __MINGW32__
748 # define _SCNu64_PREFIX "I64"
749 # elif 1 && ULONG_MAX >> 31 == 1
750 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
751 # endif
752 # if !defined SCNo64 || 0
753 # undef SCNo64
754 # define SCNo64 _SCNu64_PREFIX "o"
755 # endif
756 # if !defined SCNu64 || 0
757 # undef SCNu64
758 # define SCNu64 _SCNu64_PREFIX "u"
759 # endif
760 # if !defined SCNx64 || 0
761 # undef SCNx64
762 # define SCNx64 _SCNu64_PREFIX "x"
763 # endif
764 # endif
765
766 # if !defined SCNdLEAST8 || 0
767 # undef SCNdLEAST8
768 # define SCNdLEAST8 "hhd"
769 # endif
770 # if !defined SCNiLEAST8 || 0
771 # undef SCNiLEAST8
772 # define SCNiLEAST8 "hhi"
773 # endif
774 # if !defined SCNoLEAST8 || 0
775 # undef SCNoLEAST8
776 # define SCNoLEAST8 "hho"
777 # endif
778 # if !defined SCNuLEAST8 || 0
779 # undef SCNuLEAST8
780 # define SCNuLEAST8 "hhu"
781 # endif
782 # if !defined SCNxLEAST8 || 0
783 # undef SCNxLEAST8
784 # define SCNxLEAST8 "hhx"
785 # endif
786 # if !defined SCNdLEAST16 || 0
787 # undef SCNdLEAST16
788 # define SCNdLEAST16 "hd"
789 # endif
790 # if !defined SCNiLEAST16 || 0
791 # undef SCNiLEAST16
792 # define SCNiLEAST16 "hi"
793 # endif
794 # if !defined SCNoLEAST16 || 0
795 # undef SCNoLEAST16
796 # define SCNoLEAST16 "ho"
797 # endif
798 # if !defined SCNuLEAST16 || 0
799 # undef SCNuLEAST16
800 # define SCNuLEAST16 "hu"
801 # endif
802 # if !defined SCNxLEAST16 || 0
803 # undef SCNxLEAST16
804 # define SCNxLEAST16 "hx"
805 # endif
806 # if !defined SCNdLEAST32 || 0
807 # undef SCNdLEAST32
808 # define SCNdLEAST32 "d"
809 # endif
810 # if !defined SCNiLEAST32 || 0
811 # undef SCNiLEAST32
812 # define SCNiLEAST32 "i"
813 # endif
814 # if !defined SCNoLEAST32 || 0
815 # undef SCNoLEAST32
816 # define SCNoLEAST32 "o"
817 # endif
818 # if !defined SCNuLEAST32 || 0
819 # undef SCNuLEAST32
820 # define SCNuLEAST32 "u"
821 # endif
822 # if !defined SCNxLEAST32 || 0
823 # undef SCNxLEAST32
824 # define SCNxLEAST32 "x"
825 # endif
826 # ifdef INT64_MAX
827 # if !defined SCNdLEAST64 || 0
828 # undef SCNdLEAST64
829 # define SCNdLEAST64 SCNd64
830 # endif
831 # if !defined SCNiLEAST64 || 0
832 # undef SCNiLEAST64
833 # define SCNiLEAST64 SCNi64
834 # endif
835 # endif
836 # ifdef UINT64_MAX
837 # if !defined SCNoLEAST64 || 0
838 # undef SCNoLEAST64
839 # define SCNoLEAST64 SCNo64
840 # endif
841 # if !defined SCNuLEAST64 || 0
842 # undef SCNuLEAST64
843 # define SCNuLEAST64 SCNu64
844 # endif
845 # if !defined SCNxLEAST64 || 0
846 # undef SCNxLEAST64
847 # define SCNxLEAST64 SCNx64
848 # endif
849 # endif
850
851 # if !defined SCNdFAST8 || 0
852 # undef SCNdFAST8
853 # if INT_FAST8_MAX > INT32_MAX
854 # define SCNdFAST8 SCNd64
855 # elif INT_FAST8_MAX == 0x7fff
856 # define SCNdFAST8 "hd"
857 # elif INT_FAST8_MAX == 0x7f
858 # define SCNdFAST8 "hhd"
859 # else
860 # define SCNdFAST8 "d"
861 # endif
862 # endif
863 # if !defined SCNiFAST8 || 0
864 # undef SCNiFAST8
865 # if INT_FAST8_MAX > INT32_MAX
866 # define SCNiFAST8 SCNi64
867 # elif INT_FAST8_MAX == 0x7fff
868 # define SCNiFAST8 "hi"
869 # elif INT_FAST8_MAX == 0x7f
870 # define SCNiFAST8 "hhi"
871 # else
872 # define SCNiFAST8 "i"
873 # endif
874 # endif
875 # if !defined SCNoFAST8 || 0
876 # undef SCNoFAST8
877 # if UINT_FAST8_MAX > UINT32_MAX
878 # define SCNoFAST8 SCNo64
879 # elif UINT_FAST8_MAX == 0xffff
880 # define SCNoFAST8 "ho"
881 # elif UINT_FAST8_MAX == 0xff
882 # define SCNoFAST8 "hho"
883 # else
884 # define SCNoFAST8 "o"
885 # endif
886 # endif
887 # if !defined SCNuFAST8 || 0
888 # undef SCNuFAST8
889 # if UINT_FAST8_MAX > UINT32_MAX
890 # define SCNuFAST8 SCNu64
891 # elif UINT_FAST8_MAX == 0xffff
892 # define SCNuFAST8 "hu"
893 # elif UINT_FAST8_MAX == 0xff
894 # define SCNuFAST8 "hhu"
895 # else
896 # define SCNuFAST8 "u"
897 # endif
898 # endif
899 # if !defined SCNxFAST8 || 0
900 # undef SCNxFAST8
901 # if UINT_FAST8_MAX > UINT32_MAX
902 # define SCNxFAST8 SCNx64
903 # elif UINT_FAST8_MAX == 0xffff
904 # define SCNxFAST8 "hx"
905 # elif UINT_FAST8_MAX == 0xff
906 # define SCNxFAST8 "hhx"
907 # else
908 # define SCNxFAST8 "x"
909 # endif
910 # endif
911 # if !defined SCNdFAST16 || 0
912 # undef SCNdFAST16
913 # if INT_FAST16_MAX > INT32_MAX
914 # define SCNdFAST16 SCNd64
915 # elif INT_FAST16_MAX == 0x7fff
916 # define SCNdFAST16 "hd"
917 # else
918 # define SCNdFAST16 "d"
919 # endif
920 # endif
921 # if !defined SCNiFAST16 || 0
922 # undef SCNiFAST16
923 # if INT_FAST16_MAX > INT32_MAX
924 # define SCNiFAST16 SCNi64
925 # elif INT_FAST16_MAX == 0x7fff
926 # define SCNiFAST16 "hi"
927 # else
928 # define SCNiFAST16 "i"
929 # endif
930 # endif
931 # if !defined SCNoFAST16 || 0
932 # undef SCNoFAST16
933 # if UINT_FAST16_MAX > UINT32_MAX
934 # define SCNoFAST16 SCNo64
935 # elif UINT_FAST16_MAX == 0xffff
936 # define SCNoFAST16 "ho"
937 # else
938 # define SCNoFAST16 "o"
939 # endif
940 # endif
941 # if !defined SCNuFAST16 || 0
942 # undef SCNuFAST16
943 # if UINT_FAST16_MAX > UINT32_MAX
944 # define SCNuFAST16 SCNu64
945 # elif UINT_FAST16_MAX == 0xffff
946 # define SCNuFAST16 "hu"
947 # else
948 # define SCNuFAST16 "u"
949 # endif
950 # endif
951 # if !defined SCNxFAST16 || 0
952 # undef SCNxFAST16
953 # if UINT_FAST16_MAX > UINT32_MAX
954 # define SCNxFAST16 SCNx64
955 # elif UINT_FAST16_MAX == 0xffff
956 # define SCNxFAST16 "hx"
957 # else
958 # define SCNxFAST16 "x"
959 # endif
960 # endif
961 # if !defined SCNdFAST32 || 0
962 # undef SCNdFAST32
963 # if INT_FAST32_MAX > INT32_MAX
964 # define SCNdFAST32 SCNd64
965 # else
966 # define SCNdFAST32 "d"
967 # endif
968 # endif
969 # if !defined SCNiFAST32 || 0
970 # undef SCNiFAST32
971 # if INT_FAST32_MAX > INT32_MAX
972 # define SCNiFAST32 SCNi64
973 # else
974 # define SCNiFAST32 "i"
975 # endif
976 # endif
977 # if !defined SCNoFAST32 || 0
978 # undef SCNoFAST32
979 # if UINT_FAST32_MAX > UINT32_MAX
980 # define SCNoFAST32 SCNo64
981 # else
982 # define SCNoFAST32 "o"
983 # endif
984 # endif
985 # if !defined SCNuFAST32 || 0
986 # undef SCNuFAST32
987 # if UINT_FAST32_MAX > UINT32_MAX
988 # define SCNuFAST32 SCNu64
989 # else
990 # define SCNuFAST32 "u"
991 # endif
992 # endif
993 # if !defined SCNxFAST32 || 0
994 # undef SCNxFAST32
995 # if UINT_FAST32_MAX > UINT32_MAX
996 # define SCNxFAST32 SCNx64
997 # else
998 # define SCNxFAST32 "x"
999 # endif
1000 # endif
1001 # ifdef INT64_MAX
1002 # if !defined SCNdFAST64 || 0
1003 # undef SCNdFAST64
1004 # define SCNdFAST64 SCNd64
1005 # endif
1006 # if !defined SCNiFAST64 || 0
1007 # undef SCNiFAST64
1008 # define SCNiFAST64 SCNi64
1009 # endif
1010 # endif
1011 # ifdef UINT64_MAX
1012 # if !defined SCNoFAST64 || 0
1013 # undef SCNoFAST64
1014 # define SCNoFAST64 SCNo64
1015 # endif
1016 # if !defined SCNuFAST64 || 0
1017 # undef SCNuFAST64
1018 # define SCNuFAST64 SCNu64
1019 # endif
1020 # if !defined SCNxFAST64 || 0
1021 # undef SCNxFAST64
1022 # define SCNxFAST64 SCNx64
1023 # endif
1024 # endif
1025
1026 # if !defined SCNdMAX || 0
1027 # undef SCNdMAX
1028 # if 1
1029 # define SCNdMAX SCNd64
1030 # else
1031 # define SCNdMAX "ld"
1032 # endif
1033 # endif
1034 # if !defined SCNiMAX || 0
1035 # undef SCNiMAX
1036 # if 1
1037 # define SCNiMAX SCNi64
1038 # else
1039 # define SCNiMAX "li"
1040 # endif
1041 # endif
1042 # if !defined SCNoMAX || 0
1043 # undef SCNoMAX
1044 # if 1
1045 # define SCNoMAX SCNo64
1046 # else
1047 # define SCNoMAX "lo"
1048 # endif
1049 # endif
1050 # if !defined SCNuMAX || 0
1051 # undef SCNuMAX
1052 # if 1
1053 # define SCNuMAX SCNu64
1054 # else
1055 # define SCNuMAX "lu"
1056 # endif
1057 # endif
1058 # if !defined SCNxMAX || 0
1059 # undef SCNxMAX
1060 # if 1
1061 # define SCNxMAX SCNx64
1062 # else
1063 # define SCNxMAX "lx"
1064 # endif
1065 # endif
1066
1067 # if !defined SCNdPTR || 0
1068 # undef SCNdPTR
1069 # ifdef INTPTR_MAX
1070 # define SCNdPTR "l" "d"
1071 # endif
1072 # endif
1073 # if !defined SCNiPTR || 0
1074 # undef SCNiPTR
1075 # ifdef INTPTR_MAX
1076 # define SCNiPTR "l" "i"
1077 # endif
1078 # endif
1079 # if !defined SCNoPTR || 0
1080 # undef SCNoPTR
1081 # ifdef UINTPTR_MAX
1082 # define SCNoPTR "l" "o"
1083 # endif
1084 # endif
1085 # if !defined SCNuPTR || 0
1086 # undef SCNuPTR
1087 # ifdef UINTPTR_MAX
1088 # define SCNuPTR "l" "u"
1089 # endif
1090 # endif
1091 # if !defined SCNxPTR || 0
1092 # undef SCNxPTR
1093 # ifdef UINTPTR_MAX
1094 # define SCNxPTR "l" "x"
1095 # endif
1096 # endif
1097
1098 #endif
1099
1100 /* 7.8.2 Functions for greatest-width integer types */
1101
1102 #ifdef __cplusplus
1103 extern "C" {
1104 #endif
1105
1106 #if 0
1107 # if !1
1108 extern intmax_t imaxabs (intmax_t);
1109 # endif
1110 #elif defined GNULIB_POSIXCHECK
1111 # undef imaxabs
1112 # if HAVE_RAW_DECL_IMAXABS
1113 _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
1114 "use gnulib module imaxabs for portability");
1115 # endif
1116 #endif
1117
1118 #if 0
1119 # if !1
1120 # if !GNULIB_defined_imaxdiv_t
1121 typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
1122 # define GNULIB_defined_imaxdiv_t 1
1123 # endif
1124 extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
1125 # endif
1126 #elif defined GNULIB_POSIXCHECK
1127 # undef imaxdiv
1128 # if HAVE_RAW_DECL_IMAXDIV
1129 _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
1130 "use gnulib module imaxdiv for portability");
1131 # endif
1132 #endif
1133
1134 #if 1
1135 # if !1
1136 extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1137 # endif
1138 #elif defined GNULIB_POSIXCHECK
1139 # undef strtoimax
1140 # if HAVE_RAW_DECL_STRTOIMAX
1141 _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
1142 "use gnulib module strtoimax for portability");
1143 # endif
1144 #endif
1145
1146 #if 1
1147 # if !1
1148 extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1149 # endif
1150 #elif defined GNULIB_POSIXCHECK
1151 # undef strtoumax
1152 # if HAVE_RAW_DECL_STRTOUMAX
1153 _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
1154 "use gnulib module strtoumax for portability");
1155 # endif
1156 #endif
1157
1158 /* Don't bother defining or declaring wcstoimax and wcstoumax, since
1159 wide-character functions like this are hardly ever useful. */
1160
1161 #ifdef __cplusplus
1162 }
1163 #endif
1164
1165 #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */