1 /* Copyright (C) 2006-2016 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. */
54 /* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
55 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
59 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
60 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
63 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
65 /* The definition of _GL_ARG_NONNULL is copied here. */
67 /* The definition of _GL_WARN_ON_USE is copied here. */
69 /* 7.8.1 Macros for format specifiers */
71 #if defined _TNS_R_TARGET
72 /* Tandem NonStop R series and compatible platforms released before
73 July 2005 support %Ld but not %lld. */
74 # define _LONG_LONG_FORMAT_PREFIX "L"
76 # define _LONG_LONG_FORMAT_PREFIX "ll"
79 #if !defined PRId8 || @PRI_MACROS_BROKEN@
85 #if !defined PRIi8 || @PRI_MACROS_BROKEN@
91 #if !defined PRIo8 || @PRI_MACROS_BROKEN@
97 #if !defined PRIu8 || @PRI_MACROS_BROKEN@
103 #if !defined PRIx8 || @PRI_MACROS_BROKEN@
109 #if !defined PRIX8 || @PRI_MACROS_BROKEN@
115 #if !defined PRId16 || @PRI_MACROS_BROKEN@
121 #if !defined PRIi16 || @PRI_MACROS_BROKEN@
127 #if !defined PRIo16 || @PRI_MACROS_BROKEN@
133 #if !defined PRIu16 || @PRI_MACROS_BROKEN@
139 #if !defined PRIx16 || @PRI_MACROS_BROKEN@
145 #if !defined PRIX16 || @PRI_MACROS_BROKEN@
151 #if !defined PRId32 || @PRI_MACROS_BROKEN@
157 #if !defined PRIi32 || @PRI_MACROS_BROKEN@
163 #if !defined PRIo32 || @PRI_MACROS_BROKEN@
169 #if !defined PRIu32 || @PRI_MACROS_BROKEN@
175 #if !defined PRIx32 || @PRI_MACROS_BROKEN@
181 #if !defined PRIX32 || @PRI_MACROS_BROKEN@
188 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
189 # define _PRI64_PREFIX "l"
190 # elif defined _MSC_VER || defined __MINGW32__
191 # define _PRI64_PREFIX "I64"
192 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
193 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
195 # if !defined PRId64 || @PRI_MACROS_BROKEN@
197 # define PRId64 _PRI64_PREFIX "d"
199 # if !defined PRIi64 || @PRI_MACROS_BROKEN@
201 # define PRIi64 _PRI64_PREFIX "i"
205 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
206 # define _PRIu64_PREFIX "l"
207 # elif defined _MSC_VER || defined __MINGW32__
208 # define _PRIu64_PREFIX "I64"
209 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
210 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
212 # if !defined PRIo64 || @PRI_MACROS_BROKEN@
214 # define PRIo64 _PRIu64_PREFIX "o"
216 # if !defined PRIu64 || @PRI_MACROS_BROKEN@
218 # define PRIu64 _PRIu64_PREFIX "u"
220 # if !defined PRIx64 || @PRI_MACROS_BROKEN@
222 # define PRIx64 _PRIu64_PREFIX "x"
224 # if !defined PRIX64 || @PRI_MACROS_BROKEN@
226 # define PRIX64 _PRIu64_PREFIX "X"
230 #if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
232 # define PRIdLEAST8 "d"
234 #if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
236 # define PRIiLEAST8 "i"
238 #if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
240 # define PRIoLEAST8 "o"
242 #if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
244 # define PRIuLEAST8 "u"
246 #if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
248 # define PRIxLEAST8 "x"
250 #if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
252 # define PRIXLEAST8 "X"
254 #if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
256 # define PRIdLEAST16 "d"
258 #if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
260 # define PRIiLEAST16 "i"
262 #if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
264 # define PRIoLEAST16 "o"
266 #if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
268 # define PRIuLEAST16 "u"
270 #if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
272 # define PRIxLEAST16 "x"
274 #if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
276 # define PRIXLEAST16 "X"
278 #if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
280 # define PRIdLEAST32 "d"
282 #if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
284 # define PRIiLEAST32 "i"
286 #if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
288 # define PRIoLEAST32 "o"
290 #if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
292 # define PRIuLEAST32 "u"
294 #if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
296 # define PRIxLEAST32 "x"
298 #if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
300 # define PRIXLEAST32 "X"
303 # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
305 # define PRIdLEAST64 PRId64
307 # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
309 # define PRIiLEAST64 PRIi64
313 # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
315 # define PRIoLEAST64 PRIo64
317 # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
319 # define PRIuLEAST64 PRIu64
321 # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
323 # define PRIxLEAST64 PRIx64
325 # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
327 # define PRIXLEAST64 PRIX64
331 #if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
333 # if INT_FAST8_MAX > INT32_MAX
334 # define PRIdFAST8 PRId64
336 # define PRIdFAST8 "d"
339 #if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
341 # if INT_FAST8_MAX > INT32_MAX
342 # define PRIiFAST8 PRIi64
344 # define PRIiFAST8 "i"
347 #if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
349 # if UINT_FAST8_MAX > UINT32_MAX
350 # define PRIoFAST8 PRIo64
352 # define PRIoFAST8 "o"
355 #if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
357 # if UINT_FAST8_MAX > UINT32_MAX
358 # define PRIuFAST8 PRIu64
360 # define PRIuFAST8 "u"
363 #if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
365 # if UINT_FAST8_MAX > UINT32_MAX
366 # define PRIxFAST8 PRIx64
368 # define PRIxFAST8 "x"
371 #if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
373 # if UINT_FAST8_MAX > UINT32_MAX
374 # define PRIXFAST8 PRIX64
376 # define PRIXFAST8 "X"
379 #if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
381 # if INT_FAST16_MAX > INT32_MAX
382 # define PRIdFAST16 PRId64
384 # define PRIdFAST16 "d"
387 #if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
389 # if INT_FAST16_MAX > INT32_MAX
390 # define PRIiFAST16 PRIi64
392 # define PRIiFAST16 "i"
395 #if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
397 # if UINT_FAST16_MAX > UINT32_MAX
398 # define PRIoFAST16 PRIo64
400 # define PRIoFAST16 "o"
403 #if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
405 # if UINT_FAST16_MAX > UINT32_MAX
406 # define PRIuFAST16 PRIu64
408 # define PRIuFAST16 "u"
411 #if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
413 # if UINT_FAST16_MAX > UINT32_MAX
414 # define PRIxFAST16 PRIx64
416 # define PRIxFAST16 "x"
419 #if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
421 # if UINT_FAST16_MAX > UINT32_MAX
422 # define PRIXFAST16 PRIX64
424 # define PRIXFAST16 "X"
427 #if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
429 # if INT_FAST32_MAX > INT32_MAX
430 # define PRIdFAST32 PRId64
432 # define PRIdFAST32 "d"
435 #if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
437 # if INT_FAST32_MAX > INT32_MAX
438 # define PRIiFAST32 PRIi64
440 # define PRIiFAST32 "i"
443 #if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
445 # if UINT_FAST32_MAX > UINT32_MAX
446 # define PRIoFAST32 PRIo64
448 # define PRIoFAST32 "o"
451 #if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
453 # if UINT_FAST32_MAX > UINT32_MAX
454 # define PRIuFAST32 PRIu64
456 # define PRIuFAST32 "u"
459 #if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
461 # if UINT_FAST32_MAX > UINT32_MAX
462 # define PRIxFAST32 PRIx64
464 # define PRIxFAST32 "x"
467 #if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
469 # if UINT_FAST32_MAX > UINT32_MAX
470 # define PRIXFAST32 PRIX64
472 # define PRIXFAST32 "X"
476 # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
478 # define PRIdFAST64 PRId64
480 # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
482 # define PRIiFAST64 PRIi64
486 # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
488 # define PRIoFAST64 PRIo64
490 # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
492 # define PRIuFAST64 PRIu64
494 # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
496 # define PRIxFAST64 PRIx64
498 # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
500 # define PRIXFAST64 PRIX64
504 #if !defined PRIdMAX || @PRI_MACROS_BROKEN@
506 # if @INT32_MAX_LT_INTMAX_MAX@
507 # define PRIdMAX PRId64
509 # define PRIdMAX "ld"
512 #if !defined PRIiMAX || @PRI_MACROS_BROKEN@
514 # if @INT32_MAX_LT_INTMAX_MAX@
515 # define PRIiMAX PRIi64
517 # define PRIiMAX "li"
520 #if !defined PRIoMAX || @PRI_MACROS_BROKEN@
522 # if @UINT32_MAX_LT_UINTMAX_MAX@
523 # define PRIoMAX PRIo64
525 # define PRIoMAX "lo"
528 #if !defined PRIuMAX || @PRI_MACROS_BROKEN@
530 # if @UINT32_MAX_LT_UINTMAX_MAX@
531 # define PRIuMAX PRIu64
533 # define PRIuMAX "lu"
536 #if !defined PRIxMAX || @PRI_MACROS_BROKEN@
538 # if @UINT32_MAX_LT_UINTMAX_MAX@
539 # define PRIxMAX PRIx64
541 # define PRIxMAX "lx"
544 #if !defined PRIXMAX || @PRI_MACROS_BROKEN@
546 # if @UINT32_MAX_LT_UINTMAX_MAX@
547 # define PRIXMAX PRIX64
549 # define PRIXMAX "lX"
553 #if !defined PRIdPTR || @PRI_MACROS_BROKEN@
556 # define PRIdPTR @PRIPTR_PREFIX@ "d"
559 #if !defined PRIiPTR || @PRI_MACROS_BROKEN@
562 # define PRIiPTR @PRIPTR_PREFIX@ "i"
565 #if !defined PRIoPTR || @PRI_MACROS_BROKEN@
568 # define PRIoPTR @PRIPTR_PREFIX@ "o"
571 #if !defined PRIuPTR || @PRI_MACROS_BROKEN@
574 # define PRIuPTR @PRIPTR_PREFIX@ "u"
577 #if !defined PRIxPTR || @PRI_MACROS_BROKEN@
580 # define PRIxPTR @PRIPTR_PREFIX@ "x"
583 #if !defined PRIXPTR || @PRI_MACROS_BROKEN@
586 # define PRIXPTR @PRIPTR_PREFIX@ "X"
590 #if !defined SCNd8 || @PRI_MACROS_BROKEN@
596 #if !defined SCNi8 || @PRI_MACROS_BROKEN@
602 #if !defined SCNo8 || @PRI_MACROS_BROKEN@
608 #if !defined SCNu8 || @PRI_MACROS_BROKEN@
614 #if !defined SCNx8 || @PRI_MACROS_BROKEN@
620 #if !defined SCNd16 || @PRI_MACROS_BROKEN@
626 #if !defined SCNi16 || @PRI_MACROS_BROKEN@
632 #if !defined SCNo16 || @PRI_MACROS_BROKEN@
638 #if !defined SCNu16 || @PRI_MACROS_BROKEN@
644 #if !defined SCNx16 || @PRI_MACROS_BROKEN@
650 #if !defined SCNd32 || @PRI_MACROS_BROKEN@
656 #if !defined SCNi32 || @PRI_MACROS_BROKEN@
662 #if !defined SCNo32 || @PRI_MACROS_BROKEN@
668 #if !defined SCNu32 || @PRI_MACROS_BROKEN@
674 #if !defined SCNx32 || @PRI_MACROS_BROKEN@
681 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
682 # define _SCN64_PREFIX "l"
683 # elif defined _MSC_VER || defined __MINGW32__
684 # define _SCN64_PREFIX "I64"
685 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
686 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
688 # if !defined SCNd64 || @PRI_MACROS_BROKEN@
690 # define SCNd64 _SCN64_PREFIX "d"
692 # if !defined SCNi64 || @PRI_MACROS_BROKEN@
694 # define SCNi64 _SCN64_PREFIX "i"
698 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
699 # define _SCNu64_PREFIX "l"
700 # elif defined _MSC_VER || defined __MINGW32__
701 # define _SCNu64_PREFIX "I64"
702 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
703 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
705 # if !defined SCNo64 || @PRI_MACROS_BROKEN@
707 # define SCNo64 _SCNu64_PREFIX "o"
709 # if !defined SCNu64 || @PRI_MACROS_BROKEN@
711 # define SCNu64 _SCNu64_PREFIX "u"
713 # if !defined SCNx64 || @PRI_MACROS_BROKEN@
715 # define SCNx64 _SCNu64_PREFIX "x"
719 #if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
721 # define SCNdLEAST8 "hhd"
723 #if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
725 # define SCNiLEAST8 "hhi"
727 #if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
729 # define SCNoLEAST8 "hho"
731 #if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
733 # define SCNuLEAST8 "hhu"
735 #if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
737 # define SCNxLEAST8 "hhx"
739 #if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
741 # define SCNdLEAST16 "hd"
743 #if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
745 # define SCNiLEAST16 "hi"
747 #if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
749 # define SCNoLEAST16 "ho"
751 #if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
753 # define SCNuLEAST16 "hu"
755 #if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
757 # define SCNxLEAST16 "hx"
759 #if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
761 # define SCNdLEAST32 "d"
763 #if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
765 # define SCNiLEAST32 "i"
767 #if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
769 # define SCNoLEAST32 "o"
771 #if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
773 # define SCNuLEAST32 "u"
775 #if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
777 # define SCNxLEAST32 "x"
780 # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
782 # define SCNdLEAST64 SCNd64
784 # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
786 # define SCNiLEAST64 SCNi64
790 # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
792 # define SCNoLEAST64 SCNo64
794 # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
796 # define SCNuLEAST64 SCNu64
798 # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
800 # define SCNxLEAST64 SCNx64
804 #if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
806 # if INT_FAST8_MAX > INT32_MAX
807 # define SCNdFAST8 SCNd64
808 # elif INT_FAST8_MAX == 0x7fff
809 # define SCNdFAST8 "hd"
810 # elif INT_FAST8_MAX == 0x7f
811 # define SCNdFAST8 "hhd"
813 # define SCNdFAST8 "d"
816 #if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
818 # if INT_FAST8_MAX > INT32_MAX
819 # define SCNiFAST8 SCNi64
820 # elif INT_FAST8_MAX == 0x7fff
821 # define SCNiFAST8 "hi"
822 # elif INT_FAST8_MAX == 0x7f
823 # define SCNiFAST8 "hhi"
825 # define SCNiFAST8 "i"
828 #if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
830 # if UINT_FAST8_MAX > UINT32_MAX
831 # define SCNoFAST8 SCNo64
832 # elif UINT_FAST8_MAX == 0xffff
833 # define SCNoFAST8 "ho"
834 # elif UINT_FAST8_MAX == 0xff
835 # define SCNoFAST8 "hho"
837 # define SCNoFAST8 "o"
840 #if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
842 # if UINT_FAST8_MAX > UINT32_MAX
843 # define SCNuFAST8 SCNu64
844 # elif UINT_FAST8_MAX == 0xffff
845 # define SCNuFAST8 "hu"
846 # elif UINT_FAST8_MAX == 0xff
847 # define SCNuFAST8 "hhu"
849 # define SCNuFAST8 "u"
852 #if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
854 # if UINT_FAST8_MAX > UINT32_MAX
855 # define SCNxFAST8 SCNx64
856 # elif UINT_FAST8_MAX == 0xffff
857 # define SCNxFAST8 "hx"
858 # elif UINT_FAST8_MAX == 0xff
859 # define SCNxFAST8 "hhx"
861 # define SCNxFAST8 "x"
864 #if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
866 # if INT_FAST16_MAX > INT32_MAX
867 # define SCNdFAST16 SCNd64
868 # elif INT_FAST16_MAX == 0x7fff
869 # define SCNdFAST16 "hd"
871 # define SCNdFAST16 "d"
874 #if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
876 # if INT_FAST16_MAX > INT32_MAX
877 # define SCNiFAST16 SCNi64
878 # elif INT_FAST16_MAX == 0x7fff
879 # define SCNiFAST16 "hi"
881 # define SCNiFAST16 "i"
884 #if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
886 # if UINT_FAST16_MAX > UINT32_MAX
887 # define SCNoFAST16 SCNo64
888 # elif UINT_FAST16_MAX == 0xffff
889 # define SCNoFAST16 "ho"
891 # define SCNoFAST16 "o"
894 #if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
896 # if UINT_FAST16_MAX > UINT32_MAX
897 # define SCNuFAST16 SCNu64
898 # elif UINT_FAST16_MAX == 0xffff
899 # define SCNuFAST16 "hu"
901 # define SCNuFAST16 "u"
904 #if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
906 # if UINT_FAST16_MAX > UINT32_MAX
907 # define SCNxFAST16 SCNx64
908 # elif UINT_FAST16_MAX == 0xffff
909 # define SCNxFAST16 "hx"
911 # define SCNxFAST16 "x"
914 #if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
916 # if INT_FAST32_MAX > INT32_MAX
917 # define SCNdFAST32 SCNd64
919 # define SCNdFAST32 "d"
922 #if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
924 # if INT_FAST32_MAX > INT32_MAX
925 # define SCNiFAST32 SCNi64
927 # define SCNiFAST32 "i"
930 #if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
932 # if UINT_FAST32_MAX > UINT32_MAX
933 # define SCNoFAST32 SCNo64
935 # define SCNoFAST32 "o"
938 #if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
940 # if UINT_FAST32_MAX > UINT32_MAX
941 # define SCNuFAST32 SCNu64
943 # define SCNuFAST32 "u"
946 #if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
948 # if UINT_FAST32_MAX > UINT32_MAX
949 # define SCNxFAST32 SCNx64
951 # define SCNxFAST32 "x"
955 # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
957 # define SCNdFAST64 SCNd64
959 # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
961 # define SCNiFAST64 SCNi64
965 # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
967 # define SCNoFAST64 SCNo64
969 # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
971 # define SCNuFAST64 SCNu64
973 # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
975 # define SCNxFAST64 SCNx64
979 #if !defined SCNdMAX || @PRI_MACROS_BROKEN@
981 # if @INT32_MAX_LT_INTMAX_MAX@
982 # define SCNdMAX SCNd64
984 # define SCNdMAX "ld"
987 #if !defined SCNiMAX || @PRI_MACROS_BROKEN@
989 # if @INT32_MAX_LT_INTMAX_MAX@
990 # define SCNiMAX SCNi64
992 # define SCNiMAX "li"
995 #if !defined SCNoMAX || @PRI_MACROS_BROKEN@
997 # if @UINT32_MAX_LT_UINTMAX_MAX@
998 # define SCNoMAX SCNo64
1000 # define SCNoMAX "lo"
1003 #if !defined SCNuMAX || @PRI_MACROS_BROKEN@
1005 # if @UINT32_MAX_LT_UINTMAX_MAX@
1006 # define SCNuMAX SCNu64
1008 # define SCNuMAX "lu"
1011 #if !defined SCNxMAX || @PRI_MACROS_BROKEN@
1013 # if @UINT32_MAX_LT_UINTMAX_MAX@
1014 # define SCNxMAX SCNx64
1016 # define SCNxMAX "lx"
1020 #if !defined SCNdPTR || @PRI_MACROS_BROKEN@
1023 # define SCNdPTR @PRIPTR_PREFIX@ "d"
1026 #if !defined SCNiPTR || @PRI_MACROS_BROKEN@
1029 # define SCNiPTR @PRIPTR_PREFIX@ "i"
1032 #if !defined SCNoPTR || @PRI_MACROS_BROKEN@
1035 # define SCNoPTR @PRIPTR_PREFIX@ "o"
1038 #if !defined SCNuPTR || @PRI_MACROS_BROKEN@
1041 # define SCNuPTR @PRIPTR_PREFIX@ "u"
1044 #if !defined SCNxPTR || @PRI_MACROS_BROKEN@
1047 # define SCNxPTR @PRIPTR_PREFIX@ "x"
1051 /* 7.8.2 Functions for greatest-width integer types */
1057 #if @GNULIB_IMAXABS@
1058 # if !@HAVE_DECL_IMAXABS@
1059 extern intmax_t imaxabs (intmax_t);
1061 #elif defined GNULIB_POSIXCHECK
1063 # if HAVE_RAW_DECL_IMAXABS
1064 _GL_WARN_ON_USE (imaxabs
, "imaxabs is unportable - "
1065 "use gnulib module imaxabs for portability");
1069 #if @GNULIB_IMAXDIV@
1070 # if !@HAVE_DECL_IMAXDIV@
1071 # if !GNULIB_defined_imaxdiv_t
1072 typedef struct { intmax_t quot
; intmax_t rem
; } imaxdiv_t
;
1073 # define GNULIB_defined_imaxdiv_t 1
1075 extern imaxdiv_t
imaxdiv (intmax_t, intmax_t);
1077 #elif defined GNULIB_POSIXCHECK
1079 # if HAVE_RAW_DECL_IMAXDIV
1080 _GL_WARN_ON_USE (imaxdiv
, "imaxdiv is unportable - "
1081 "use gnulib module imaxdiv for portability");
1085 #if @GNULIB_STRTOIMAX@
1086 # if @REPLACE_STRTOIMAX@
1087 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1089 # define strtoimax rpl_strtoimax
1091 _GL_FUNCDECL_RPL (strtoimax
, intmax_t,
1092 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1093 _GL_CXXALIAS_RPL (strtoimax
, intmax_t, (const char *, char **, int));
1095 # if !@HAVE_DECL_STRTOIMAX@
1097 _GL_FUNCDECL_SYS (strtoimax
, intmax_t,
1098 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1100 _GL_CXXALIAS_SYS (strtoimax
, intmax_t, (const char *, char **, int));
1102 _GL_CXXALIASWARN (strtoimax
);
1103 #elif defined GNULIB_POSIXCHECK
1105 # if HAVE_RAW_DECL_STRTOIMAX
1106 _GL_WARN_ON_USE (strtoimax
, "strtoimax is unportable - "
1107 "use gnulib module strtoimax for portability");
1111 #if @GNULIB_STRTOUMAX@
1112 # if @REPLACE_STRTOUMAX@
1113 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1115 # define strtoumax rpl_strtoumax
1117 _GL_FUNCDECL_RPL (strtoumax
, uintmax_t,
1118 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1119 _GL_CXXALIAS_RPL (strtoumax
, uintmax_t, (const char *, char **, int));
1121 # if !@HAVE_DECL_STRTOUMAX@
1123 _GL_FUNCDECL_SYS (strtoumax
, uintmax_t,
1124 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1126 _GL_CXXALIAS_SYS (strtoumax
, uintmax_t, (const char *, char **, int));
1128 _GL_CXXALIASWARN (strtoumax
);
1129 #elif defined GNULIB_POSIXCHECK
1131 # if HAVE_RAW_DECL_STRTOUMAX
1132 _GL_WARN_ON_USE (strtoumax
, "strtoumax is unportable - "
1133 "use gnulib module strtoumax for portability");
1137 /* Don't bother defining or declaring wcstoimax and wcstoumax, since
1138 wide-character functions like this are hardly ever useful. */
1144 #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */