1 /* Copyright (C) 2006-2012 Free Software Foundation, Inc.
2 Written by Paul Eggert, Bruno Haible, Derek Price.
3 This file is part of gnulib.
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 3 of the License, or
8 (at your option) any later version.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 * ISO C 99 <inttypes.h> for platforms that lack it.
20 * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
24 @PRAGMA_SYSTEM_HEADER@
28 /* Include the original <inttypes.h> if it exists, and if this file
29 has not been included yet or if this file includes gnulib stdint.h
30 which in turn includes this file.
31 The include_next requires a split double-inclusion guard. */
32 #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
33 # if @HAVE_INTTYPES_H@
35 /* Some pre-C++11 <stdint.h> implementations need this. */
36 # if defined __cplusplus && ! defined __STDC_FORMAT_MACROS
37 # define __STDC_FORMAT_MACROS 1
40 # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
44 #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
47 /* Include <stdint.h> or the gnulib replacement.
48 But avoid namespace pollution on glibc systems. */
55 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
56 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
59 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
61 /* The definition of _GL_ARG_NONNULL is copied here. */
63 /* The definition of _GL_WARN_ON_USE is copied here. */
65 /* 7.8.1 Macros for format specifiers */
67 #if defined _TNS_R_TARGET
68 /* Tandem NonStop R series and compatible platforms released before
69 July 2005 support %Ld but not %lld. */
70 # define _LONG_LONG_FORMAT_PREFIX "L"
72 # define _LONG_LONG_FORMAT_PREFIX "ll"
75 #if !defined PRId8 || @PRI_MACROS_BROKEN@
81 #if !defined PRIi8 || @PRI_MACROS_BROKEN@
87 #if !defined PRIo8 || @PRI_MACROS_BROKEN@
93 #if !defined PRIu8 || @PRI_MACROS_BROKEN@
99 #if !defined PRIx8 || @PRI_MACROS_BROKEN@
105 #if !defined PRIX8 || @PRI_MACROS_BROKEN@
111 #if !defined PRId16 || @PRI_MACROS_BROKEN@
117 #if !defined PRIi16 || @PRI_MACROS_BROKEN@
123 #if !defined PRIo16 || @PRI_MACROS_BROKEN@
129 #if !defined PRIu16 || @PRI_MACROS_BROKEN@
135 #if !defined PRIx16 || @PRI_MACROS_BROKEN@
141 #if !defined PRIX16 || @PRI_MACROS_BROKEN@
147 #if !defined PRId32 || @PRI_MACROS_BROKEN@
153 #if !defined PRIi32 || @PRI_MACROS_BROKEN@
159 #if !defined PRIo32 || @PRI_MACROS_BROKEN@
165 #if !defined PRIu32 || @PRI_MACROS_BROKEN@
171 #if !defined PRIx32 || @PRI_MACROS_BROKEN@
177 #if !defined PRIX32 || @PRI_MACROS_BROKEN@
184 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
185 # define _PRI64_PREFIX "l"
186 # elif defined _MSC_VER || defined __MINGW32__
187 # define _PRI64_PREFIX "I64"
188 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
189 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
191 # if !defined PRId64 || @PRI_MACROS_BROKEN@
193 # define PRId64 _PRI64_PREFIX "d"
195 # if !defined PRIi64 || @PRI_MACROS_BROKEN@
197 # define PRIi64 _PRI64_PREFIX "i"
201 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
202 # define _PRIu64_PREFIX "l"
203 # elif defined _MSC_VER || defined __MINGW32__
204 # define _PRIu64_PREFIX "I64"
205 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
206 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
208 # if !defined PRIo64 || @PRI_MACROS_BROKEN@
210 # define PRIo64 _PRIu64_PREFIX "o"
212 # if !defined PRIu64 || @PRI_MACROS_BROKEN@
214 # define PRIu64 _PRIu64_PREFIX "u"
216 # if !defined PRIx64 || @PRI_MACROS_BROKEN@
218 # define PRIx64 _PRIu64_PREFIX "x"
220 # if !defined PRIX64 || @PRI_MACROS_BROKEN@
222 # define PRIX64 _PRIu64_PREFIX "X"
226 #if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
228 # define PRIdLEAST8 "d"
230 #if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
232 # define PRIiLEAST8 "i"
234 #if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
236 # define PRIoLEAST8 "o"
238 #if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
240 # define PRIuLEAST8 "u"
242 #if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
244 # define PRIxLEAST8 "x"
246 #if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
248 # define PRIXLEAST8 "X"
250 #if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
252 # define PRIdLEAST16 "d"
254 #if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
256 # define PRIiLEAST16 "i"
258 #if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
260 # define PRIoLEAST16 "o"
262 #if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
264 # define PRIuLEAST16 "u"
266 #if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
268 # define PRIxLEAST16 "x"
270 #if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
272 # define PRIXLEAST16 "X"
274 #if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
276 # define PRIdLEAST32 "d"
278 #if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
280 # define PRIiLEAST32 "i"
282 #if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
284 # define PRIoLEAST32 "o"
286 #if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
288 # define PRIuLEAST32 "u"
290 #if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
292 # define PRIxLEAST32 "x"
294 #if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
296 # define PRIXLEAST32 "X"
299 # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
301 # define PRIdLEAST64 PRId64
303 # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
305 # define PRIiLEAST64 PRIi64
309 # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
311 # define PRIoLEAST64 PRIo64
313 # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
315 # define PRIuLEAST64 PRIu64
317 # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
319 # define PRIxLEAST64 PRIx64
321 # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
323 # define PRIXLEAST64 PRIX64
327 #if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
329 # if INT_FAST8_MAX > INT32_MAX
330 # define PRIdFAST8 PRId64
332 # define PRIdFAST8 "d"
335 #if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
337 # if INT_FAST8_MAX > INT32_MAX
338 # define PRIiFAST8 PRIi64
340 # define PRIiFAST8 "i"
343 #if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
345 # if UINT_FAST8_MAX > UINT32_MAX
346 # define PRIoFAST8 PRIo64
348 # define PRIoFAST8 "o"
351 #if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
353 # if UINT_FAST8_MAX > UINT32_MAX
354 # define PRIuFAST8 PRIu64
356 # define PRIuFAST8 "u"
359 #if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
361 # if UINT_FAST8_MAX > UINT32_MAX
362 # define PRIxFAST8 PRIx64
364 # define PRIxFAST8 "x"
367 #if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
369 # if UINT_FAST8_MAX > UINT32_MAX
370 # define PRIXFAST8 PRIX64
372 # define PRIXFAST8 "X"
375 #if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
377 # if INT_FAST16_MAX > INT32_MAX
378 # define PRIdFAST16 PRId64
380 # define PRIdFAST16 "d"
383 #if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
385 # if INT_FAST16_MAX > INT32_MAX
386 # define PRIiFAST16 PRIi64
388 # define PRIiFAST16 "i"
391 #if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
393 # if UINT_FAST16_MAX > UINT32_MAX
394 # define PRIoFAST16 PRIo64
396 # define PRIoFAST16 "o"
399 #if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
401 # if UINT_FAST16_MAX > UINT32_MAX
402 # define PRIuFAST16 PRIu64
404 # define PRIuFAST16 "u"
407 #if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
409 # if UINT_FAST16_MAX > UINT32_MAX
410 # define PRIxFAST16 PRIx64
412 # define PRIxFAST16 "x"
415 #if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
417 # if UINT_FAST16_MAX > UINT32_MAX
418 # define PRIXFAST16 PRIX64
420 # define PRIXFAST16 "X"
423 #if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
425 # if INT_FAST32_MAX > INT32_MAX
426 # define PRIdFAST32 PRId64
428 # define PRIdFAST32 "d"
431 #if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
433 # if INT_FAST32_MAX > INT32_MAX
434 # define PRIiFAST32 PRIi64
436 # define PRIiFAST32 "i"
439 #if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
441 # if UINT_FAST32_MAX > UINT32_MAX
442 # define PRIoFAST32 PRIo64
444 # define PRIoFAST32 "o"
447 #if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
449 # if UINT_FAST32_MAX > UINT32_MAX
450 # define PRIuFAST32 PRIu64
452 # define PRIuFAST32 "u"
455 #if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
457 # if UINT_FAST32_MAX > UINT32_MAX
458 # define PRIxFAST32 PRIx64
460 # define PRIxFAST32 "x"
463 #if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
465 # if UINT_FAST32_MAX > UINT32_MAX
466 # define PRIXFAST32 PRIX64
468 # define PRIXFAST32 "X"
472 # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
474 # define PRIdFAST64 PRId64
476 # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
478 # define PRIiFAST64 PRIi64
482 # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
484 # define PRIoFAST64 PRIo64
486 # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
488 # define PRIuFAST64 PRIu64
490 # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
492 # define PRIxFAST64 PRIx64
494 # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
496 # define PRIXFAST64 PRIX64
500 #if !defined PRIdMAX || @PRI_MACROS_BROKEN@
502 # if @INT32_MAX_LT_INTMAX_MAX@
503 # define PRIdMAX PRId64
505 # define PRIdMAX "ld"
508 #if !defined PRIiMAX || @PRI_MACROS_BROKEN@
510 # if @INT32_MAX_LT_INTMAX_MAX@
511 # define PRIiMAX PRIi64
513 # define PRIiMAX "li"
516 #if !defined PRIoMAX || @PRI_MACROS_BROKEN@
518 # if @UINT32_MAX_LT_UINTMAX_MAX@
519 # define PRIoMAX PRIo64
521 # define PRIoMAX "lo"
524 #if !defined PRIuMAX || @PRI_MACROS_BROKEN@
526 # if @UINT32_MAX_LT_UINTMAX_MAX@
527 # define PRIuMAX PRIu64
529 # define PRIuMAX "lu"
532 #if !defined PRIxMAX || @PRI_MACROS_BROKEN@
534 # if @UINT32_MAX_LT_UINTMAX_MAX@
535 # define PRIxMAX PRIx64
537 # define PRIxMAX "lx"
540 #if !defined PRIXMAX || @PRI_MACROS_BROKEN@
542 # if @UINT32_MAX_LT_UINTMAX_MAX@
543 # define PRIXMAX PRIX64
545 # define PRIXMAX "lX"
549 #if !defined PRIdPTR || @PRI_MACROS_BROKEN@
552 # define PRIdPTR @PRIPTR_PREFIX@ "d"
555 #if !defined PRIiPTR || @PRI_MACROS_BROKEN@
558 # define PRIiPTR @PRIPTR_PREFIX@ "i"
561 #if !defined PRIoPTR || @PRI_MACROS_BROKEN@
564 # define PRIoPTR @PRIPTR_PREFIX@ "o"
567 #if !defined PRIuPTR || @PRI_MACROS_BROKEN@
570 # define PRIuPTR @PRIPTR_PREFIX@ "u"
573 #if !defined PRIxPTR || @PRI_MACROS_BROKEN@
576 # define PRIxPTR @PRIPTR_PREFIX@ "x"
579 #if !defined PRIXPTR || @PRI_MACROS_BROKEN@
582 # define PRIXPTR @PRIPTR_PREFIX@ "X"
586 #if !defined SCNd8 || @PRI_MACROS_BROKEN@
592 #if !defined SCNi8 || @PRI_MACROS_BROKEN@
598 #if !defined SCNo8 || @PRI_MACROS_BROKEN@
604 #if !defined SCNu8 || @PRI_MACROS_BROKEN@
610 #if !defined SCNx8 || @PRI_MACROS_BROKEN@
616 #if !defined SCNd16 || @PRI_MACROS_BROKEN@
622 #if !defined SCNi16 || @PRI_MACROS_BROKEN@
628 #if !defined SCNo16 || @PRI_MACROS_BROKEN@
634 #if !defined SCNu16 || @PRI_MACROS_BROKEN@
640 #if !defined SCNx16 || @PRI_MACROS_BROKEN@
646 #if !defined SCNd32 || @PRI_MACROS_BROKEN@
652 #if !defined SCNi32 || @PRI_MACROS_BROKEN@
658 #if !defined SCNo32 || @PRI_MACROS_BROKEN@
664 #if !defined SCNu32 || @PRI_MACROS_BROKEN@
670 #if !defined SCNx32 || @PRI_MACROS_BROKEN@
677 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
678 # define _SCN64_PREFIX "l"
679 # elif defined _MSC_VER || defined __MINGW32__
680 # define _SCN64_PREFIX "I64"
681 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
682 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
684 # if !defined SCNd64 || @PRI_MACROS_BROKEN@
686 # define SCNd64 _SCN64_PREFIX "d"
688 # if !defined SCNi64 || @PRI_MACROS_BROKEN@
690 # define SCNi64 _SCN64_PREFIX "i"
694 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
695 # define _SCNu64_PREFIX "l"
696 # elif defined _MSC_VER || defined __MINGW32__
697 # define _SCNu64_PREFIX "I64"
698 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
699 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
701 # if !defined SCNo64 || @PRI_MACROS_BROKEN@
703 # define SCNo64 _SCNu64_PREFIX "o"
705 # if !defined SCNu64 || @PRI_MACROS_BROKEN@
707 # define SCNu64 _SCNu64_PREFIX "u"
709 # if !defined SCNx64 || @PRI_MACROS_BROKEN@
711 # define SCNx64 _SCNu64_PREFIX "x"
715 #if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
717 # define SCNdLEAST8 "hhd"
719 #if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
721 # define SCNiLEAST8 "hhi"
723 #if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
725 # define SCNoLEAST8 "hho"
727 #if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
729 # define SCNuLEAST8 "hhu"
731 #if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
733 # define SCNxLEAST8 "hhx"
735 #if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
737 # define SCNdLEAST16 "hd"
739 #if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
741 # define SCNiLEAST16 "hi"
743 #if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
745 # define SCNoLEAST16 "ho"
747 #if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
749 # define SCNuLEAST16 "hu"
751 #if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
753 # define SCNxLEAST16 "hx"
755 #if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
757 # define SCNdLEAST32 "d"
759 #if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
761 # define SCNiLEAST32 "i"
763 #if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
765 # define SCNoLEAST32 "o"
767 #if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
769 # define SCNuLEAST32 "u"
771 #if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
773 # define SCNxLEAST32 "x"
776 # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
778 # define SCNdLEAST64 SCNd64
780 # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
782 # define SCNiLEAST64 SCNi64
786 # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
788 # define SCNoLEAST64 SCNo64
790 # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
792 # define SCNuLEAST64 SCNu64
794 # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
796 # define SCNxLEAST64 SCNx64
800 #if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
802 # if INT_FAST8_MAX > INT32_MAX
803 # define SCNdFAST8 SCNd64
804 # elif INT_FAST8_MAX == 0x7fff
805 # define SCNdFAST8 "hd"
806 # elif INT_FAST8_MAX == 0x7f
807 # define SCNdFAST8 "hhd"
809 # define SCNdFAST8 "d"
812 #if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
814 # if INT_FAST8_MAX > INT32_MAX
815 # define SCNiFAST8 SCNi64
816 # elif INT_FAST8_MAX == 0x7fff
817 # define SCNiFAST8 "hi"
818 # elif INT_FAST8_MAX == 0x7f
819 # define SCNiFAST8 "hhi"
821 # define SCNiFAST8 "i"
824 #if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
826 # if UINT_FAST8_MAX > UINT32_MAX
827 # define SCNoFAST8 SCNo64
828 # elif UINT_FAST8_MAX == 0xffff
829 # define SCNoFAST8 "ho"
830 # elif UINT_FAST8_MAX == 0xff
831 # define SCNoFAST8 "hho"
833 # define SCNoFAST8 "o"
836 #if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
838 # if UINT_FAST8_MAX > UINT32_MAX
839 # define SCNuFAST8 SCNu64
840 # elif UINT_FAST8_MAX == 0xffff
841 # define SCNuFAST8 "hu"
842 # elif UINT_FAST8_MAX == 0xff
843 # define SCNuFAST8 "hhu"
845 # define SCNuFAST8 "u"
848 #if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
850 # if UINT_FAST8_MAX > UINT32_MAX
851 # define SCNxFAST8 SCNx64
852 # elif UINT_FAST8_MAX == 0xffff
853 # define SCNxFAST8 "hx"
854 # elif UINT_FAST8_MAX == 0xff
855 # define SCNxFAST8 "hhx"
857 # define SCNxFAST8 "x"
860 #if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
862 # if INT_FAST16_MAX > INT32_MAX
863 # define SCNdFAST16 SCNd64
864 # elif INT_FAST16_MAX == 0x7fff
865 # define SCNdFAST16 "hd"
867 # define SCNdFAST16 "d"
870 #if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
872 # if INT_FAST16_MAX > INT32_MAX
873 # define SCNiFAST16 SCNi64
874 # elif INT_FAST16_MAX == 0x7fff
875 # define SCNiFAST16 "hi"
877 # define SCNiFAST16 "i"
880 #if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
882 # if UINT_FAST16_MAX > UINT32_MAX
883 # define SCNoFAST16 SCNo64
884 # elif UINT_FAST16_MAX == 0xffff
885 # define SCNoFAST16 "ho"
887 # define SCNoFAST16 "o"
890 #if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
892 # if UINT_FAST16_MAX > UINT32_MAX
893 # define SCNuFAST16 SCNu64
894 # elif UINT_FAST16_MAX == 0xffff
895 # define SCNuFAST16 "hu"
897 # define SCNuFAST16 "u"
900 #if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
902 # if UINT_FAST16_MAX > UINT32_MAX
903 # define SCNxFAST16 SCNx64
904 # elif UINT_FAST16_MAX == 0xffff
905 # define SCNxFAST16 "hx"
907 # define SCNxFAST16 "x"
910 #if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
912 # if INT_FAST32_MAX > INT32_MAX
913 # define SCNdFAST32 SCNd64
915 # define SCNdFAST32 "d"
918 #if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
920 # if INT_FAST32_MAX > INT32_MAX
921 # define SCNiFAST32 SCNi64
923 # define SCNiFAST32 "i"
926 #if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
928 # if UINT_FAST32_MAX > UINT32_MAX
929 # define SCNoFAST32 SCNo64
931 # define SCNoFAST32 "o"
934 #if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
936 # if UINT_FAST32_MAX > UINT32_MAX
937 # define SCNuFAST32 SCNu64
939 # define SCNuFAST32 "u"
942 #if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
944 # if UINT_FAST32_MAX > UINT32_MAX
945 # define SCNxFAST32 SCNx64
947 # define SCNxFAST32 "x"
951 # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
953 # define SCNdFAST64 SCNd64
955 # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
957 # define SCNiFAST64 SCNi64
961 # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
963 # define SCNoFAST64 SCNo64
965 # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
967 # define SCNuFAST64 SCNu64
969 # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
971 # define SCNxFAST64 SCNx64
975 #if !defined SCNdMAX || @PRI_MACROS_BROKEN@
977 # if @INT32_MAX_LT_INTMAX_MAX@
978 # define SCNdMAX SCNd64
980 # define SCNdMAX "ld"
983 #if !defined SCNiMAX || @PRI_MACROS_BROKEN@
985 # if @INT32_MAX_LT_INTMAX_MAX@
986 # define SCNiMAX SCNi64
988 # define SCNiMAX "li"
991 #if !defined SCNoMAX || @PRI_MACROS_BROKEN@
993 # if @UINT32_MAX_LT_UINTMAX_MAX@
994 # define SCNoMAX SCNo64
996 # define SCNoMAX "lo"
999 #if !defined SCNuMAX || @PRI_MACROS_BROKEN@
1001 # if @UINT32_MAX_LT_UINTMAX_MAX@
1002 # define SCNuMAX SCNu64
1004 # define SCNuMAX "lu"
1007 #if !defined SCNxMAX || @PRI_MACROS_BROKEN@
1009 # if @UINT32_MAX_LT_UINTMAX_MAX@
1010 # define SCNxMAX SCNx64
1012 # define SCNxMAX "lx"
1016 #if !defined SCNdPTR || @PRI_MACROS_BROKEN@
1019 # define SCNdPTR @PRIPTR_PREFIX@ "d"
1022 #if !defined SCNiPTR || @PRI_MACROS_BROKEN@
1025 # define SCNiPTR @PRIPTR_PREFIX@ "i"
1028 #if !defined SCNoPTR || @PRI_MACROS_BROKEN@
1031 # define SCNoPTR @PRIPTR_PREFIX@ "o"
1034 #if !defined SCNuPTR || @PRI_MACROS_BROKEN@
1037 # define SCNuPTR @PRIPTR_PREFIX@ "u"
1040 #if !defined SCNxPTR || @PRI_MACROS_BROKEN@
1043 # define SCNxPTR @PRIPTR_PREFIX@ "x"
1047 /* 7.8.2 Functions for greatest-width integer types */
1053 #if @GNULIB_IMAXABS@
1054 # if !@HAVE_DECL_IMAXABS@
1055 extern intmax_t imaxabs (intmax_t);
1057 #elif defined GNULIB_POSIXCHECK
1059 # if HAVE_RAW_DECL_IMAXABS
1060 _GL_WARN_ON_USE (imaxabs
, "imaxabs is unportable - "
1061 "use gnulib module imaxabs for portability");
1065 #if @GNULIB_IMAXDIV@
1066 # if !@HAVE_DECL_IMAXDIV@
1067 # if !GNULIB_defined_imaxdiv_t
1068 typedef struct { intmax_t quot
; intmax_t rem
; } imaxdiv_t
;
1069 # define GNULIB_defined_imaxdiv_t 1
1071 extern imaxdiv_t
imaxdiv (intmax_t, intmax_t);
1073 #elif defined GNULIB_POSIXCHECK
1075 # if HAVE_RAW_DECL_IMAXDIV
1076 _GL_WARN_ON_USE (imaxdiv
, "imaxdiv is unportable - "
1077 "use gnulib module imaxdiv for portability");
1081 #if @GNULIB_STRTOIMAX@
1082 # if @REPLACE_STRTOIMAX@
1083 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1085 # define strtoimax rpl_strtoimax
1087 _GL_FUNCDECL_RPL (strtoimax
, intmax_t,
1088 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1089 _GL_CXXALIAS_RPL (strtoimax
, intmax_t, (const char *, char **, int));
1091 # if !@HAVE_DECL_STRTOIMAX@
1093 _GL_FUNCDECL_SYS (strtoimax
, intmax_t,
1094 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1096 _GL_CXXALIAS_SYS (strtoimax
, intmax_t, (const char *, char **, int));
1098 _GL_CXXALIASWARN (strtoimax
);
1099 #elif defined GNULIB_POSIXCHECK
1101 # if HAVE_RAW_DECL_STRTOIMAX
1102 _GL_WARN_ON_USE (strtoimax
, "strtoimax is unportable - "
1103 "use gnulib module strtoimax for portability");
1107 #if @GNULIB_STRTOUMAX@
1108 # if !@HAVE_DECL_STRTOUMAX@
1110 _GL_FUNCDECL_SYS (strtoumax
, uintmax_t,
1111 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1113 _GL_CXXALIAS_SYS (strtoumax
, uintmax_t, (const char *, char **, int));
1114 _GL_CXXALIASWARN (strtoumax
);
1115 #elif defined GNULIB_POSIXCHECK
1117 # if HAVE_RAW_DECL_STRTOUMAX
1118 _GL_WARN_ON_USE (strtoumax
, "strtoumax is unportable - "
1119 "use gnulib module strtoumax for portability");
1123 /* Don't bother defining or declaring wcstoimax and wcstoumax, since
1124 wide-character functions like this are hardly ever useful. */
1130 #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */