1 /* Copyright (C) 2006-2011 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@
34 # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
38 #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
41 /* Include <stdint.h> or the gnulib replacement.
42 But avoid namespace pollution on glibc systems. */
49 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
50 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
53 /* The definition of _GL_ARG_NONNULL is copied here. */
55 /* The definition of _GL_WARN_ON_USE is copied here. */
57 /* 7.8.1 Macros for format specifiers */
59 #if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
61 # if defined _TNS_R_TARGET
62 /* Tandem NonStop R series and compatible platforms released before
63 July 2005 support %Ld but not %lld. */
64 # define _LONG_LONG_FORMAT_PREFIX "L"
66 # define _LONG_LONG_FORMAT_PREFIX "ll"
69 # if !defined PRId8 || @PRI_MACROS_BROKEN@
75 # if !defined PRIi8 || @PRI_MACROS_BROKEN@
81 # if !defined PRIo8 || @PRI_MACROS_BROKEN@
87 # if !defined PRIu8 || @PRI_MACROS_BROKEN@
93 # if !defined PRIx8 || @PRI_MACROS_BROKEN@
99 # if !defined PRIX8 || @PRI_MACROS_BROKEN@
105 # if !defined PRId16 || @PRI_MACROS_BROKEN@
111 # if !defined PRIi16 || @PRI_MACROS_BROKEN@
117 # if !defined PRIo16 || @PRI_MACROS_BROKEN@
123 # if !defined PRIu16 || @PRI_MACROS_BROKEN@
129 # if !defined PRIx16 || @PRI_MACROS_BROKEN@
135 # if !defined PRIX16 || @PRI_MACROS_BROKEN@
141 # if !defined PRId32 || @PRI_MACROS_BROKEN@
147 # if !defined PRIi32 || @PRI_MACROS_BROKEN@
153 # if !defined PRIo32 || @PRI_MACROS_BROKEN@
159 # if !defined PRIu32 || @PRI_MACROS_BROKEN@
165 # if !defined PRIx32 || @PRI_MACROS_BROKEN@
171 # if !defined PRIX32 || @PRI_MACROS_BROKEN@
178 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
179 # define _PRI64_PREFIX "l"
180 # elif defined _MSC_VER || defined __MINGW32__
181 # define _PRI64_PREFIX "I64"
182 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
183 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
185 # if !defined PRId64 || @PRI_MACROS_BROKEN@
187 # define PRId64 _PRI64_PREFIX "d"
189 # if !defined PRIi64 || @PRI_MACROS_BROKEN@
191 # define PRIi64 _PRI64_PREFIX "i"
195 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
196 # define _PRIu64_PREFIX "l"
197 # elif defined _MSC_VER || defined __MINGW32__
198 # define _PRIu64_PREFIX "I64"
199 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
200 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
202 # if !defined PRIo64 || @PRI_MACROS_BROKEN@
204 # define PRIo64 _PRIu64_PREFIX "o"
206 # if !defined PRIu64 || @PRI_MACROS_BROKEN@
208 # define PRIu64 _PRIu64_PREFIX "u"
210 # if !defined PRIx64 || @PRI_MACROS_BROKEN@
212 # define PRIx64 _PRIu64_PREFIX "x"
214 # if !defined PRIX64 || @PRI_MACROS_BROKEN@
216 # define PRIX64 _PRIu64_PREFIX "X"
220 # if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
222 # define PRIdLEAST8 "d"
224 # if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
226 # define PRIiLEAST8 "i"
228 # if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
230 # define PRIoLEAST8 "o"
232 # if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
234 # define PRIuLEAST8 "u"
236 # if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
238 # define PRIxLEAST8 "x"
240 # if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
242 # define PRIXLEAST8 "X"
244 # if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
246 # define PRIdLEAST16 "d"
248 # if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
250 # define PRIiLEAST16 "i"
252 # if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
254 # define PRIoLEAST16 "o"
256 # if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
258 # define PRIuLEAST16 "u"
260 # if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
262 # define PRIxLEAST16 "x"
264 # if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
266 # define PRIXLEAST16 "X"
268 # if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
270 # define PRIdLEAST32 "d"
272 # if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
274 # define PRIiLEAST32 "i"
276 # if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
278 # define PRIoLEAST32 "o"
280 # if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
282 # define PRIuLEAST32 "u"
284 # if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
286 # define PRIxLEAST32 "x"
288 # if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
290 # define PRIXLEAST32 "X"
293 # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
295 # define PRIdLEAST64 PRId64
297 # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
299 # define PRIiLEAST64 PRIi64
303 # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
305 # define PRIoLEAST64 PRIo64
307 # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
309 # define PRIuLEAST64 PRIu64
311 # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
313 # define PRIxLEAST64 PRIx64
315 # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
317 # define PRIXLEAST64 PRIX64
321 # if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
323 # if INT_FAST8_MAX > INT32_MAX
324 # define PRIdFAST8 PRId64
326 # define PRIdFAST8 "d"
329 # if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
331 # if INT_FAST8_MAX > INT32_MAX
332 # define PRIiFAST8 PRIi64
334 # define PRIiFAST8 "i"
337 # if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
339 # if UINT_FAST8_MAX > UINT32_MAX
340 # define PRIoFAST8 PRIo64
342 # define PRIoFAST8 "o"
345 # if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
347 # if UINT_FAST8_MAX > UINT32_MAX
348 # define PRIuFAST8 PRIu64
350 # define PRIuFAST8 "u"
353 # if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
355 # if UINT_FAST8_MAX > UINT32_MAX
356 # define PRIxFAST8 PRIx64
358 # define PRIxFAST8 "x"
361 # if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
363 # if UINT_FAST8_MAX > UINT32_MAX
364 # define PRIXFAST8 PRIX64
366 # define PRIXFAST8 "X"
369 # if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
371 # if INT_FAST16_MAX > INT32_MAX
372 # define PRIdFAST16 PRId64
374 # define PRIdFAST16 "d"
377 # if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
379 # if INT_FAST16_MAX > INT32_MAX
380 # define PRIiFAST16 PRIi64
382 # define PRIiFAST16 "i"
385 # if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
387 # if UINT_FAST16_MAX > UINT32_MAX
388 # define PRIoFAST16 PRIo64
390 # define PRIoFAST16 "o"
393 # if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
395 # if UINT_FAST16_MAX > UINT32_MAX
396 # define PRIuFAST16 PRIu64
398 # define PRIuFAST16 "u"
401 # if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
403 # if UINT_FAST16_MAX > UINT32_MAX
404 # define PRIxFAST16 PRIx64
406 # define PRIxFAST16 "x"
409 # if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
411 # if UINT_FAST16_MAX > UINT32_MAX
412 # define PRIXFAST16 PRIX64
414 # define PRIXFAST16 "X"
417 # if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
419 # if INT_FAST32_MAX > INT32_MAX
420 # define PRIdFAST32 PRId64
422 # define PRIdFAST32 "d"
425 # if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
427 # if INT_FAST32_MAX > INT32_MAX
428 # define PRIiFAST32 PRIi64
430 # define PRIiFAST32 "i"
433 # if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
435 # if UINT_FAST32_MAX > UINT32_MAX
436 # define PRIoFAST32 PRIo64
438 # define PRIoFAST32 "o"
441 # if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
443 # if UINT_FAST32_MAX > UINT32_MAX
444 # define PRIuFAST32 PRIu64
446 # define PRIuFAST32 "u"
449 # if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
451 # if UINT_FAST32_MAX > UINT32_MAX
452 # define PRIxFAST32 PRIx64
454 # define PRIxFAST32 "x"
457 # if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
459 # if UINT_FAST32_MAX > UINT32_MAX
460 # define PRIXFAST32 PRIX64
462 # define PRIXFAST32 "X"
466 # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
468 # define PRIdFAST64 PRId64
470 # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
472 # define PRIiFAST64 PRIi64
476 # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
478 # define PRIoFAST64 PRIo64
480 # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
482 # define PRIuFAST64 PRIu64
484 # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
486 # define PRIxFAST64 PRIx64
488 # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
490 # define PRIXFAST64 PRIX64
494 # if !defined PRIdMAX || @PRI_MACROS_BROKEN@
496 # if @INT32_MAX_LT_INTMAX_MAX@
497 # define PRIdMAX PRId64
499 # define PRIdMAX "ld"
502 # if !defined PRIiMAX || @PRI_MACROS_BROKEN@
504 # if @INT32_MAX_LT_INTMAX_MAX@
505 # define PRIiMAX PRIi64
507 # define PRIiMAX "li"
510 # if !defined PRIoMAX || @PRI_MACROS_BROKEN@
512 # if @UINT32_MAX_LT_UINTMAX_MAX@
513 # define PRIoMAX PRIo64
515 # define PRIoMAX "lo"
518 # if !defined PRIuMAX || @PRI_MACROS_BROKEN@
520 # if @UINT32_MAX_LT_UINTMAX_MAX@
521 # define PRIuMAX PRIu64
523 # define PRIuMAX "lu"
526 # if !defined PRIxMAX || @PRI_MACROS_BROKEN@
528 # if @UINT32_MAX_LT_UINTMAX_MAX@
529 # define PRIxMAX PRIx64
531 # define PRIxMAX "lx"
534 # if !defined PRIXMAX || @PRI_MACROS_BROKEN@
536 # if @UINT32_MAX_LT_UINTMAX_MAX@
537 # define PRIXMAX PRIX64
539 # define PRIXMAX "lX"
543 # if !defined PRIdPTR || @PRI_MACROS_BROKEN@
546 # define PRIdPTR @PRIPTR_PREFIX@ "d"
549 # if !defined PRIiPTR || @PRI_MACROS_BROKEN@
552 # define PRIiPTR @PRIPTR_PREFIX@ "i"
555 # if !defined PRIoPTR || @PRI_MACROS_BROKEN@
558 # define PRIoPTR @PRIPTR_PREFIX@ "o"
561 # if !defined PRIuPTR || @PRI_MACROS_BROKEN@
564 # define PRIuPTR @PRIPTR_PREFIX@ "u"
567 # if !defined PRIxPTR || @PRI_MACROS_BROKEN@
570 # define PRIxPTR @PRIPTR_PREFIX@ "x"
573 # if !defined PRIXPTR || @PRI_MACROS_BROKEN@
576 # define PRIXPTR @PRIPTR_PREFIX@ "X"
580 # if !defined SCNd8 || @PRI_MACROS_BROKEN@
586 # if !defined SCNi8 || @PRI_MACROS_BROKEN@
592 # if !defined SCNo8 || @PRI_MACROS_BROKEN@
598 # if !defined SCNu8 || @PRI_MACROS_BROKEN@
604 # if !defined SCNx8 || @PRI_MACROS_BROKEN@
610 # if !defined SCNd16 || @PRI_MACROS_BROKEN@
616 # if !defined SCNi16 || @PRI_MACROS_BROKEN@
622 # if !defined SCNo16 || @PRI_MACROS_BROKEN@
628 # if !defined SCNu16 || @PRI_MACROS_BROKEN@
634 # if !defined SCNx16 || @PRI_MACROS_BROKEN@
640 # if !defined SCNd32 || @PRI_MACROS_BROKEN@
646 # if !defined SCNi32 || @PRI_MACROS_BROKEN@
652 # if !defined SCNo32 || @PRI_MACROS_BROKEN@
658 # if !defined SCNu32 || @PRI_MACROS_BROKEN@
664 # if !defined SCNx32 || @PRI_MACROS_BROKEN@
671 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
672 # define _SCN64_PREFIX "l"
673 # elif defined _MSC_VER || defined __MINGW32__
674 # define _SCN64_PREFIX "I64"
675 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
676 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
678 # if !defined SCNd64 || @PRI_MACROS_BROKEN@
680 # define SCNd64 _SCN64_PREFIX "d"
682 # if !defined SCNi64 || @PRI_MACROS_BROKEN@
684 # define SCNi64 _SCN64_PREFIX "i"
688 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
689 # define _SCNu64_PREFIX "l"
690 # elif defined _MSC_VER || defined __MINGW32__
691 # define _SCNu64_PREFIX "I64"
692 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
693 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
695 # if !defined SCNo64 || @PRI_MACROS_BROKEN@
697 # define SCNo64 _SCNu64_PREFIX "o"
699 # if !defined SCNu64 || @PRI_MACROS_BROKEN@
701 # define SCNu64 _SCNu64_PREFIX "u"
703 # if !defined SCNx64 || @PRI_MACROS_BROKEN@
705 # define SCNx64 _SCNu64_PREFIX "x"
709 # if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
711 # define SCNdLEAST8 "hhd"
713 # if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
715 # define SCNiLEAST8 "hhi"
717 # if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
719 # define SCNoLEAST8 "hho"
721 # if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
723 # define SCNuLEAST8 "hhu"
725 # if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
727 # define SCNxLEAST8 "hhx"
729 # if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
731 # define SCNdLEAST16 "hd"
733 # if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
735 # define SCNiLEAST16 "hi"
737 # if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
739 # define SCNoLEAST16 "ho"
741 # if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
743 # define SCNuLEAST16 "hu"
745 # if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
747 # define SCNxLEAST16 "hx"
749 # if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
751 # define SCNdLEAST32 "d"
753 # if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
755 # define SCNiLEAST32 "i"
757 # if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
759 # define SCNoLEAST32 "o"
761 # if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
763 # define SCNuLEAST32 "u"
765 # if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
767 # define SCNxLEAST32 "x"
770 # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
772 # define SCNdLEAST64 SCNd64
774 # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
776 # define SCNiLEAST64 SCNi64
780 # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
782 # define SCNoLEAST64 SCNo64
784 # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
786 # define SCNuLEAST64 SCNu64
788 # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
790 # define SCNxLEAST64 SCNx64
794 # if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
796 # if INT_FAST8_MAX > INT32_MAX
797 # define SCNdFAST8 SCNd64
798 # elif INT_FAST8_MAX == 0x7fff
799 # define SCNdFAST8 "hd"
800 # elif INT_FAST8_MAX == 0x7f
801 # define SCNdFAST8 "hhd"
803 # define SCNdFAST8 "d"
806 # if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
808 # if INT_FAST8_MAX > INT32_MAX
809 # define SCNiFAST8 SCNi64
810 # elif INT_FAST8_MAX == 0x7fff
811 # define SCNiFAST8 "hi"
812 # elif INT_FAST8_MAX == 0x7f
813 # define SCNiFAST8 "hhi"
815 # define SCNiFAST8 "i"
818 # if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
820 # if UINT_FAST8_MAX > UINT32_MAX
821 # define SCNoFAST8 SCNo64
822 # elif UINT_FAST8_MAX == 0xffff
823 # define SCNoFAST8 "ho"
824 # elif UINT_FAST8_MAX == 0xff
825 # define SCNoFAST8 "hho"
827 # define SCNoFAST8 "o"
830 # if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
832 # if UINT_FAST8_MAX > UINT32_MAX
833 # define SCNuFAST8 SCNu64
834 # elif UINT_FAST8_MAX == 0xffff
835 # define SCNuFAST8 "hu"
836 # elif UINT_FAST8_MAX == 0xff
837 # define SCNuFAST8 "hhu"
839 # define SCNuFAST8 "u"
842 # if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
844 # if UINT_FAST8_MAX > UINT32_MAX
845 # define SCNxFAST8 SCNx64
846 # elif UINT_FAST8_MAX == 0xffff
847 # define SCNxFAST8 "hx"
848 # elif UINT_FAST8_MAX == 0xff
849 # define SCNxFAST8 "hhx"
851 # define SCNxFAST8 "x"
854 # if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
856 # if INT_FAST16_MAX > INT32_MAX
857 # define SCNdFAST16 SCNd64
858 # elif INT_FAST16_MAX == 0x7fff
859 # define SCNdFAST16 "hd"
861 # define SCNdFAST16 "d"
864 # if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
866 # if INT_FAST16_MAX > INT32_MAX
867 # define SCNiFAST16 SCNi64
868 # elif INT_FAST16_MAX == 0x7fff
869 # define SCNiFAST16 "hi"
871 # define SCNiFAST16 "i"
874 # if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
876 # if UINT_FAST16_MAX > UINT32_MAX
877 # define SCNoFAST16 SCNo64
878 # elif UINT_FAST16_MAX == 0xffff
879 # define SCNoFAST16 "ho"
881 # define SCNoFAST16 "o"
884 # if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
886 # if UINT_FAST16_MAX > UINT32_MAX
887 # define SCNuFAST16 SCNu64
888 # elif UINT_FAST16_MAX == 0xffff
889 # define SCNuFAST16 "hu"
891 # define SCNuFAST16 "u"
894 # if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
896 # if UINT_FAST16_MAX > UINT32_MAX
897 # define SCNxFAST16 SCNx64
898 # elif UINT_FAST16_MAX == 0xffff
899 # define SCNxFAST16 "hx"
901 # define SCNxFAST16 "x"
904 # if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
906 # if INT_FAST32_MAX > INT32_MAX
907 # define SCNdFAST32 SCNd64
909 # define SCNdFAST32 "d"
912 # if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
914 # if INT_FAST32_MAX > INT32_MAX
915 # define SCNiFAST32 SCNi64
917 # define SCNiFAST32 "i"
920 # if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
922 # if UINT_FAST32_MAX > UINT32_MAX
923 # define SCNoFAST32 SCNo64
925 # define SCNoFAST32 "o"
928 # if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
930 # if UINT_FAST32_MAX > UINT32_MAX
931 # define SCNuFAST32 SCNu64
933 # define SCNuFAST32 "u"
936 # if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
938 # if UINT_FAST32_MAX > UINT32_MAX
939 # define SCNxFAST32 SCNx64
941 # define SCNxFAST32 "x"
945 # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
947 # define SCNdFAST64 SCNd64
949 # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
951 # define SCNiFAST64 SCNi64
955 # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
957 # define SCNoFAST64 SCNo64
959 # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
961 # define SCNuFAST64 SCNu64
963 # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
965 # define SCNxFAST64 SCNx64
969 # if !defined SCNdMAX || @PRI_MACROS_BROKEN@
971 # if @INT32_MAX_LT_INTMAX_MAX@
972 # define SCNdMAX SCNd64
974 # define SCNdMAX "ld"
977 # if !defined SCNiMAX || @PRI_MACROS_BROKEN@
979 # if @INT32_MAX_LT_INTMAX_MAX@
980 # define SCNiMAX SCNi64
982 # define SCNiMAX "li"
985 # if !defined SCNoMAX || @PRI_MACROS_BROKEN@
987 # if @UINT32_MAX_LT_UINTMAX_MAX@
988 # define SCNoMAX SCNo64
990 # define SCNoMAX "lo"
993 # if !defined SCNuMAX || @PRI_MACROS_BROKEN@
995 # if @UINT32_MAX_LT_UINTMAX_MAX@
996 # define SCNuMAX SCNu64
998 # define SCNuMAX "lu"
1001 # if !defined SCNxMAX || @PRI_MACROS_BROKEN@
1003 # if @UINT32_MAX_LT_UINTMAX_MAX@
1004 # define SCNxMAX SCNx64
1006 # define SCNxMAX "lx"
1010 # if !defined SCNdPTR || @PRI_MACROS_BROKEN@
1013 # define SCNdPTR @PRIPTR_PREFIX@ "d"
1016 # if !defined SCNiPTR || @PRI_MACROS_BROKEN@
1019 # define SCNiPTR @PRIPTR_PREFIX@ "i"
1022 # if !defined SCNoPTR || @PRI_MACROS_BROKEN@
1025 # define SCNoPTR @PRIPTR_PREFIX@ "o"
1028 # if !defined SCNuPTR || @PRI_MACROS_BROKEN@
1031 # define SCNuPTR @PRIPTR_PREFIX@ "u"
1034 # if !defined SCNxPTR || @PRI_MACROS_BROKEN@
1037 # define SCNxPTR @PRIPTR_PREFIX@ "x"
1043 /* 7.8.2 Functions for greatest-width integer types */
1049 #if @GNULIB_IMAXABS@
1050 # if !@HAVE_DECL_IMAXABS@
1051 extern intmax_t imaxabs (intmax_t);
1053 #elif defined GNULIB_POSIXCHECK
1055 # if HAVE_RAW_DECL_IMAXABS
1056 _GL_WARN_ON_USE (imaxabs
, "imaxabs is unportable - "
1057 "use gnulib module imaxabs for portability");
1061 #if @GNULIB_IMAXDIV@
1062 # if !@HAVE_DECL_IMAXDIV@
1063 # if !GNULIB_defined_imaxdiv_t
1064 typedef struct { intmax_t quot
; intmax_t rem
; } imaxdiv_t
;
1065 # define GNULIB_defined_imaxdiv_t 1
1067 extern imaxdiv_t
imaxdiv (intmax_t, intmax_t);
1069 #elif defined GNULIB_POSIXCHECK
1071 # if HAVE_RAW_DECL_IMAXDIV
1072 _GL_WARN_ON_USE (imaxdiv
, "imaxdiv is unportable - "
1073 "use gnulib module imaxdiv for portability");
1077 #if @GNULIB_STRTOIMAX@
1078 # if !@HAVE_DECL_STRTOIMAX@
1080 extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1082 #elif defined GNULIB_POSIXCHECK
1084 # if HAVE_RAW_DECL_STRTOIMAX
1085 _GL_WARN_ON_USE (strtoimax
, "strtoimax is unportable - "
1086 "use gnulib module strtoimax for portability");
1090 #if @GNULIB_STRTOUMAX@
1091 # if !@HAVE_DECL_STRTOUMAX@
1093 extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1095 #elif defined GNULIB_POSIXCHECK
1097 # if HAVE_RAW_DECL_STRTOUMAX
1098 _GL_WARN_ON_USE (strtoumax
, "strtoumax is unportable - "
1099 "use gnulib module strtoumax for portability");
1103 /* Don't bother defining or declaring wcstoimax and wcstoumax, since
1104 wide-character functions like this are hardly ever useful. */
1110 #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */