1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Copyright (C) 2006-2014 Free Software Foundation, Inc.
3 Written by Paul Eggert, Bruno Haible, Derek Price.
4 This file is part of gnulib.
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.
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.
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/>. */
20 * ISO C 99 <inttypes.h> for platforms that lack it.
21 * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
25 #pragma GCC system_header
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
36 /* Some pre-C++11 <stdint.h> implementations need this. */
37 # if defined __cplusplus && ! defined __STDC_FORMAT_MACROS
38 # define __STDC_FORMAT_MACROS 1
41 # include_next <inttypes.h>
45 #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
48 /* Include <stdint.h> or the gnulib replacement.
49 But avoid namespace pollution on glibc systems. */
56 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
57 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
60 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
64 /* The three most frequent use cases of these macros are:
66 * For providing a substitute for a function that is missing on some
67 platforms, but is declared and works fine on the platforms on which
72 _GL_FUNCDECL_SYS (foo, ...);
74 _GL_CXXALIAS_SYS (foo, ...);
75 _GL_CXXALIASWARN (foo);
76 #elif defined GNULIB_POSIXCHECK
80 * For providing a replacement for a function that exists on all platforms,
81 but is broken/insufficient and needs to be replaced on some platforms:
85 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
89 _GL_FUNCDECL_RPL (foo, ...);
90 _GL_CXXALIAS_RPL (foo, ...);
92 _GL_CXXALIAS_SYS (foo, ...);
94 _GL_CXXALIASWARN (foo);
95 #elif defined GNULIB_POSIXCHECK
99 * For providing a replacement for a function that exists on some platforms
100 but is broken/insufficient and needs to be replaced on some of them and
101 is additionally either missing or undeclared on some other platforms:
105 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
109 _GL_FUNCDECL_RPL (foo, ...);
110 _GL_CXXALIAS_RPL (foo, ...);
112 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
113 _GL_FUNCDECL_SYS (foo, ...);
115 _GL_CXXALIAS_SYS (foo, ...);
117 _GL_CXXALIASWARN (foo);
118 #elif defined GNULIB_POSIXCHECK
123 /* _GL_EXTERN_C declaration;
124 performs the declaration with C linkage. */
125 #if defined __cplusplus
126 # define _GL_EXTERN_C extern "C"
128 # define _GL_EXTERN_C extern
131 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
132 declares a replacement function, named rpl_func, with the given prototype,
133 consisting of return type, parameters, and attributes.
135 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
136 _GL_ARG_NONNULL ((1)));
138 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
139 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
140 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
141 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
143 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
144 declares the system function, named func, with the given prototype,
145 consisting of return type, parameters, and attributes.
147 _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
148 _GL_ARG_NONNULL ((1)));
150 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
151 _GL_EXTERN_C rettype func parameters_and_attributes
153 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
154 declares a C++ alias called GNULIB_NAMESPACE::func
155 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
157 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
159 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
160 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
161 #if defined __cplusplus && defined GNULIB_NAMESPACE
162 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
163 namespace GNULIB_NAMESPACE \
165 rettype (*const func) parameters = ::rpl_func; \
167 _GL_EXTERN_C int _gl_cxxalias_dummy
169 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
170 _GL_EXTERN_C int _gl_cxxalias_dummy
173 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
174 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
175 except that the C function rpl_func may have a slightly different
176 declaration. A cast is used to silence the "invalid conversion" error
177 that would otherwise occur. */
178 #if defined __cplusplus && defined GNULIB_NAMESPACE
179 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
180 namespace GNULIB_NAMESPACE \
182 rettype (*const func) parameters = \
183 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
185 _GL_EXTERN_C int _gl_cxxalias_dummy
187 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
188 _GL_EXTERN_C int _gl_cxxalias_dummy
191 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
192 declares a C++ alias called GNULIB_NAMESPACE::func
193 that redirects to the system provided function func, if GNULIB_NAMESPACE
196 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
198 #if defined __cplusplus && defined GNULIB_NAMESPACE
199 /* If we were to write
200 rettype (*const func) parameters = ::func;
201 like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
202 better (remove an indirection through a 'static' pointer variable),
203 but then the _GL_CXXALIASWARN macro below would cause a warning not only
204 for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
205 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
206 namespace GNULIB_NAMESPACE \
208 static rettype (*func) parameters = ::func; \
210 _GL_EXTERN_C int _gl_cxxalias_dummy
212 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
213 _GL_EXTERN_C int _gl_cxxalias_dummy
216 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
217 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
218 except that the C function func may have a slightly different declaration.
219 A cast is used to silence the "invalid conversion" error that would
221 #if defined __cplusplus && defined GNULIB_NAMESPACE
222 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
223 namespace GNULIB_NAMESPACE \
225 static rettype (*func) parameters = \
226 reinterpret_cast<rettype(*)parameters>(::func); \
228 _GL_EXTERN_C int _gl_cxxalias_dummy
230 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
231 _GL_EXTERN_C int _gl_cxxalias_dummy
234 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
235 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
236 except that the C function is picked among a set of overloaded functions,
237 namely the one with rettype2 and parameters2. Two consecutive casts
238 are used to silence the "cannot find a match" and "invalid conversion"
239 errors that would otherwise occur. */
240 #if defined __cplusplus && defined GNULIB_NAMESPACE
241 /* The outer cast must be a reinterpret_cast.
242 The inner cast: When the function is defined as a set of overloaded
243 functions, it works as a static_cast<>, choosing the designated variant.
244 When the function is defined as a single variant, it works as a
245 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
246 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
247 namespace GNULIB_NAMESPACE \
249 static rettype (*func) parameters = \
250 reinterpret_cast<rettype(*)parameters>( \
251 (rettype2(*)parameters2)(::func)); \
253 _GL_EXTERN_C int _gl_cxxalias_dummy
255 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
256 _GL_EXTERN_C int _gl_cxxalias_dummy
259 /* _GL_CXXALIASWARN (func);
260 causes a warning to be emitted when ::func is used but not when
261 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
263 #if defined __cplusplus && defined GNULIB_NAMESPACE
264 # define _GL_CXXALIASWARN(func) \
265 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
266 # define _GL_CXXALIASWARN_1(func,namespace) \
267 _GL_CXXALIASWARN_2 (func, namespace)
268 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
269 we enable the warning only when not optimizing. */
271 # define _GL_CXXALIASWARN_2(func,namespace) \
272 _GL_WARN_ON_USE (func, \
273 "The symbol ::" #func " refers to the system function. " \
274 "Use " #namespace "::" #func " instead.")
275 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
276 # define _GL_CXXALIASWARN_2(func,namespace) \
277 extern __typeof__ (func) func
279 # define _GL_CXXALIASWARN_2(func,namespace) \
280 _GL_EXTERN_C int _gl_cxxalias_dummy
283 # define _GL_CXXALIASWARN(func) \
284 _GL_EXTERN_C int _gl_cxxalias_dummy
287 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
288 causes a warning to be emitted when the given overloaded variant of ::func
289 is used but not when GNULIB_NAMESPACE::func is used. */
290 #if defined __cplusplus && defined GNULIB_NAMESPACE
291 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
292 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
294 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
295 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
296 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
297 we enable the warning only when not optimizing. */
299 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
300 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
301 "The symbol ::" #func " refers to the system function. " \
302 "Use " #namespace "::" #func " instead.")
303 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
304 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
305 extern __typeof__ (func) func
307 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
308 _GL_EXTERN_C int _gl_cxxalias_dummy
311 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
312 _GL_EXTERN_C int _gl_cxxalias_dummy
315 #endif /* _GL_CXXDEFS_H */
317 /* The definition of _GL_ARG_NONNULL is copied here. */
318 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
319 that the values passed as arguments n, ..., m must be non-NULL pointers.
320 n = 1 stands for the first argument, n = 2 for the second argument etc. */
321 #ifndef _GL_ARG_NONNULL
322 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
323 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
325 # define _GL_ARG_NONNULL(params)
329 /* The definition of _GL_WARN_ON_USE is copied here. */
330 #ifndef _GL_WARN_ON_USE
332 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
333 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
334 # define _GL_WARN_ON_USE(function, message) \
335 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
336 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
337 /* Verify the existence of the function. */
338 # define _GL_WARN_ON_USE(function, message) \
339 extern __typeof__ (function) function
340 # else /* Unsupported. */
341 # define _GL_WARN_ON_USE(function, message) \
342 _GL_WARN_EXTERN_C int _gl_warn_on_use
346 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
347 is like _GL_WARN_ON_USE (function, "string"), except that the function is
348 declared with the given prototype, consisting of return type, parameters,
350 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
351 not work in this case. */
352 #ifndef _GL_WARN_ON_USE_CXX
353 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
354 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
355 extern rettype function parameters_and_attributes \
356 __attribute__ ((__warning__ (msg)))
357 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
358 /* Verify the existence of the function. */
359 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
360 extern rettype function parameters_and_attributes
361 # else /* Unsupported. */
362 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
363 _GL_WARN_EXTERN_C int _gl_warn_on_use
367 /* _GL_WARN_EXTERN_C declaration;
368 performs the declaration with C linkage. */
369 #ifndef _GL_WARN_EXTERN_C
370 # if defined __cplusplus
371 # define _GL_WARN_EXTERN_C extern "C"
373 # define _GL_WARN_EXTERN_C extern
377 /* 7.8.1 Macros for format specifiers */
379 #if defined _TNS_R_TARGET
380 /* Tandem NonStop R series and compatible platforms released before
381 July 2005 support %Ld but not %lld. */
382 # define _LONG_LONG_FORMAT_PREFIX "L"
384 # define _LONG_LONG_FORMAT_PREFIX "ll"
387 #if !defined PRId8 || 0
393 #if !defined PRIi8 || 0
399 #if !defined PRIo8 || 0
405 #if !defined PRIu8 || 0
411 #if !defined PRIx8 || 0
417 #if !defined PRIX8 || 0
423 #if !defined PRId16 || 0
429 #if !defined PRIi16 || 0
435 #if !defined PRIo16 || 0
441 #if !defined PRIu16 || 0
447 #if !defined PRIx16 || 0
453 #if !defined PRIX16 || 0
459 #if !defined PRId32 || 0
465 #if !defined PRIi32 || 0
471 #if !defined PRIo32 || 0
477 #if !defined PRIu32 || 0
483 #if !defined PRIx32 || 0
489 #if !defined PRIX32 || 0
496 # if (0 ? defined _LP64 : 1)
497 # define _PRI64_PREFIX "l"
498 # elif defined _MSC_VER || defined __MINGW32__
499 # define _PRI64_PREFIX "I64"
500 # elif 1 && LONG_MAX >> 30 == 1
501 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
503 # if !defined PRId64 || 0
505 # define PRId64 _PRI64_PREFIX "d"
507 # if !defined PRIi64 || 0
509 # define PRIi64 _PRI64_PREFIX "i"
513 # if (0 ? defined _LP64 : 1)
514 # define _PRIu64_PREFIX "l"
515 # elif defined _MSC_VER || defined __MINGW32__
516 # define _PRIu64_PREFIX "I64"
517 # elif 1 && ULONG_MAX >> 31 == 1
518 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
520 # if !defined PRIo64 || 0
522 # define PRIo64 _PRIu64_PREFIX "o"
524 # if !defined PRIu64 || 0
526 # define PRIu64 _PRIu64_PREFIX "u"
528 # if !defined PRIx64 || 0
530 # define PRIx64 _PRIu64_PREFIX "x"
532 # if !defined PRIX64 || 0
534 # define PRIX64 _PRIu64_PREFIX "X"
538 #if !defined PRIdLEAST8 || 0
540 # define PRIdLEAST8 "d"
542 #if !defined PRIiLEAST8 || 0
544 # define PRIiLEAST8 "i"
546 #if !defined PRIoLEAST8 || 0
548 # define PRIoLEAST8 "o"
550 #if !defined PRIuLEAST8 || 0
552 # define PRIuLEAST8 "u"
554 #if !defined PRIxLEAST8 || 0
556 # define PRIxLEAST8 "x"
558 #if !defined PRIXLEAST8 || 0
560 # define PRIXLEAST8 "X"
562 #if !defined PRIdLEAST16 || 0
564 # define PRIdLEAST16 "d"
566 #if !defined PRIiLEAST16 || 0
568 # define PRIiLEAST16 "i"
570 #if !defined PRIoLEAST16 || 0
572 # define PRIoLEAST16 "o"
574 #if !defined PRIuLEAST16 || 0
576 # define PRIuLEAST16 "u"
578 #if !defined PRIxLEAST16 || 0
580 # define PRIxLEAST16 "x"
582 #if !defined PRIXLEAST16 || 0
584 # define PRIXLEAST16 "X"
586 #if !defined PRIdLEAST32 || 0
588 # define PRIdLEAST32 "d"
590 #if !defined PRIiLEAST32 || 0
592 # define PRIiLEAST32 "i"
594 #if !defined PRIoLEAST32 || 0
596 # define PRIoLEAST32 "o"
598 #if !defined PRIuLEAST32 || 0
600 # define PRIuLEAST32 "u"
602 #if !defined PRIxLEAST32 || 0
604 # define PRIxLEAST32 "x"
606 #if !defined PRIXLEAST32 || 0
608 # define PRIXLEAST32 "X"
611 # if !defined PRIdLEAST64 || 0
613 # define PRIdLEAST64 PRId64
615 # if !defined PRIiLEAST64 || 0
617 # define PRIiLEAST64 PRIi64
621 # if !defined PRIoLEAST64 || 0
623 # define PRIoLEAST64 PRIo64
625 # if !defined PRIuLEAST64 || 0
627 # define PRIuLEAST64 PRIu64
629 # if !defined PRIxLEAST64 || 0
631 # define PRIxLEAST64 PRIx64
633 # if !defined PRIXLEAST64 || 0
635 # define PRIXLEAST64 PRIX64
639 #if !defined PRIdFAST8 || 0
641 # if INT_FAST8_MAX > INT32_MAX
642 # define PRIdFAST8 PRId64
644 # define PRIdFAST8 "d"
647 #if !defined PRIiFAST8 || 0
649 # if INT_FAST8_MAX > INT32_MAX
650 # define PRIiFAST8 PRIi64
652 # define PRIiFAST8 "i"
655 #if !defined PRIoFAST8 || 0
657 # if UINT_FAST8_MAX > UINT32_MAX
658 # define PRIoFAST8 PRIo64
660 # define PRIoFAST8 "o"
663 #if !defined PRIuFAST8 || 0
665 # if UINT_FAST8_MAX > UINT32_MAX
666 # define PRIuFAST8 PRIu64
668 # define PRIuFAST8 "u"
671 #if !defined PRIxFAST8 || 0
673 # if UINT_FAST8_MAX > UINT32_MAX
674 # define PRIxFAST8 PRIx64
676 # define PRIxFAST8 "x"
679 #if !defined PRIXFAST8 || 0
681 # if UINT_FAST8_MAX > UINT32_MAX
682 # define PRIXFAST8 PRIX64
684 # define PRIXFAST8 "X"
687 #if !defined PRIdFAST16 || 0
689 # if INT_FAST16_MAX > INT32_MAX
690 # define PRIdFAST16 PRId64
692 # define PRIdFAST16 "d"
695 #if !defined PRIiFAST16 || 0
697 # if INT_FAST16_MAX > INT32_MAX
698 # define PRIiFAST16 PRIi64
700 # define PRIiFAST16 "i"
703 #if !defined PRIoFAST16 || 0
705 # if UINT_FAST16_MAX > UINT32_MAX
706 # define PRIoFAST16 PRIo64
708 # define PRIoFAST16 "o"
711 #if !defined PRIuFAST16 || 0
713 # if UINT_FAST16_MAX > UINT32_MAX
714 # define PRIuFAST16 PRIu64
716 # define PRIuFAST16 "u"
719 #if !defined PRIxFAST16 || 0
721 # if UINT_FAST16_MAX > UINT32_MAX
722 # define PRIxFAST16 PRIx64
724 # define PRIxFAST16 "x"
727 #if !defined PRIXFAST16 || 0
729 # if UINT_FAST16_MAX > UINT32_MAX
730 # define PRIXFAST16 PRIX64
732 # define PRIXFAST16 "X"
735 #if !defined PRIdFAST32 || 0
737 # if INT_FAST32_MAX > INT32_MAX
738 # define PRIdFAST32 PRId64
740 # define PRIdFAST32 "d"
743 #if !defined PRIiFAST32 || 0
745 # if INT_FAST32_MAX > INT32_MAX
746 # define PRIiFAST32 PRIi64
748 # define PRIiFAST32 "i"
751 #if !defined PRIoFAST32 || 0
753 # if UINT_FAST32_MAX > UINT32_MAX
754 # define PRIoFAST32 PRIo64
756 # define PRIoFAST32 "o"
759 #if !defined PRIuFAST32 || 0
761 # if UINT_FAST32_MAX > UINT32_MAX
762 # define PRIuFAST32 PRIu64
764 # define PRIuFAST32 "u"
767 #if !defined PRIxFAST32 || 0
769 # if UINT_FAST32_MAX > UINT32_MAX
770 # define PRIxFAST32 PRIx64
772 # define PRIxFAST32 "x"
775 #if !defined PRIXFAST32 || 0
777 # if UINT_FAST32_MAX > UINT32_MAX
778 # define PRIXFAST32 PRIX64
780 # define PRIXFAST32 "X"
784 # if !defined PRIdFAST64 || 0
786 # define PRIdFAST64 PRId64
788 # if !defined PRIiFAST64 || 0
790 # define PRIiFAST64 PRIi64
794 # if !defined PRIoFAST64 || 0
796 # define PRIoFAST64 PRIo64
798 # if !defined PRIuFAST64 || 0
800 # define PRIuFAST64 PRIu64
802 # if !defined PRIxFAST64 || 0
804 # define PRIxFAST64 PRIx64
806 # if !defined PRIXFAST64 || 0
808 # define PRIXFAST64 PRIX64
812 #if !defined PRIdMAX || 0
815 # define PRIdMAX PRId64
817 # define PRIdMAX "ld"
820 #if !defined PRIiMAX || 0
823 # define PRIiMAX PRIi64
825 # define PRIiMAX "li"
828 #if !defined PRIoMAX || 0
831 # define PRIoMAX PRIo64
833 # define PRIoMAX "lo"
836 #if !defined PRIuMAX || 0
839 # define PRIuMAX PRIu64
841 # define PRIuMAX "lu"
844 #if !defined PRIxMAX || 0
847 # define PRIxMAX PRIx64
849 # define PRIxMAX "lx"
852 #if !defined PRIXMAX || 0
855 # define PRIXMAX PRIX64
857 # define PRIXMAX "lX"
861 #if !defined PRIdPTR || 0
864 # define PRIdPTR "l" "d"
867 #if !defined PRIiPTR || 0
870 # define PRIiPTR "l" "i"
873 #if !defined PRIoPTR || 0
876 # define PRIoPTR "l" "o"
879 #if !defined PRIuPTR || 0
882 # define PRIuPTR "l" "u"
885 #if !defined PRIxPTR || 0
888 # define PRIxPTR "l" "x"
891 #if !defined PRIXPTR || 0
894 # define PRIXPTR "l" "X"
898 #if !defined SCNd8 || 0
904 #if !defined SCNi8 || 0
910 #if !defined SCNo8 || 0
916 #if !defined SCNu8 || 0
922 #if !defined SCNx8 || 0
928 #if !defined SCNd16 || 0
934 #if !defined SCNi16 || 0
940 #if !defined SCNo16 || 0
946 #if !defined SCNu16 || 0
952 #if !defined SCNx16 || 0
958 #if !defined SCNd32 || 0
964 #if !defined SCNi32 || 0
970 #if !defined SCNo32 || 0
976 #if !defined SCNu32 || 0
982 #if !defined SCNx32 || 0
989 # if (0 ? defined _LP64 : 1)
990 # define _SCN64_PREFIX "l"
991 # elif defined _MSC_VER || defined __MINGW32__
992 # define _SCN64_PREFIX "I64"
993 # elif 1 && LONG_MAX >> 30 == 1
994 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
996 # if !defined SCNd64 || 0
998 # define SCNd64 _SCN64_PREFIX "d"
1000 # if !defined SCNi64 || 0
1002 # define SCNi64 _SCN64_PREFIX "i"
1006 # if (0 ? defined _LP64 : 1)
1007 # define _SCNu64_PREFIX "l"
1008 # elif defined _MSC_VER || defined __MINGW32__
1009 # define _SCNu64_PREFIX "I64"
1010 # elif 1 && ULONG_MAX >> 31 == 1
1011 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
1013 # if !defined SCNo64 || 0
1015 # define SCNo64 _SCNu64_PREFIX "o"
1017 # if !defined SCNu64 || 0
1019 # define SCNu64 _SCNu64_PREFIX "u"
1021 # if !defined SCNx64 || 0
1023 # define SCNx64 _SCNu64_PREFIX "x"
1027 #if !defined SCNdLEAST8 || 0
1029 # define SCNdLEAST8 "hhd"
1031 #if !defined SCNiLEAST8 || 0
1033 # define SCNiLEAST8 "hhi"
1035 #if !defined SCNoLEAST8 || 0
1037 # define SCNoLEAST8 "hho"
1039 #if !defined SCNuLEAST8 || 0
1041 # define SCNuLEAST8 "hhu"
1043 #if !defined SCNxLEAST8 || 0
1045 # define SCNxLEAST8 "hhx"
1047 #if !defined SCNdLEAST16 || 0
1049 # define SCNdLEAST16 "hd"
1051 #if !defined SCNiLEAST16 || 0
1053 # define SCNiLEAST16 "hi"
1055 #if !defined SCNoLEAST16 || 0
1057 # define SCNoLEAST16 "ho"
1059 #if !defined SCNuLEAST16 || 0
1061 # define SCNuLEAST16 "hu"
1063 #if !defined SCNxLEAST16 || 0
1065 # define SCNxLEAST16 "hx"
1067 #if !defined SCNdLEAST32 || 0
1069 # define SCNdLEAST32 "d"
1071 #if !defined SCNiLEAST32 || 0
1073 # define SCNiLEAST32 "i"
1075 #if !defined SCNoLEAST32 || 0
1077 # define SCNoLEAST32 "o"
1079 #if !defined SCNuLEAST32 || 0
1081 # define SCNuLEAST32 "u"
1083 #if !defined SCNxLEAST32 || 0
1085 # define SCNxLEAST32 "x"
1088 # if !defined SCNdLEAST64 || 0
1090 # define SCNdLEAST64 SCNd64
1092 # if !defined SCNiLEAST64 || 0
1094 # define SCNiLEAST64 SCNi64
1098 # if !defined SCNoLEAST64 || 0
1100 # define SCNoLEAST64 SCNo64
1102 # if !defined SCNuLEAST64 || 0
1104 # define SCNuLEAST64 SCNu64
1106 # if !defined SCNxLEAST64 || 0
1108 # define SCNxLEAST64 SCNx64
1112 #if !defined SCNdFAST8 || 0
1114 # if INT_FAST8_MAX > INT32_MAX
1115 # define SCNdFAST8 SCNd64
1116 # elif INT_FAST8_MAX == 0x7fff
1117 # define SCNdFAST8 "hd"
1118 # elif INT_FAST8_MAX == 0x7f
1119 # define SCNdFAST8 "hhd"
1121 # define SCNdFAST8 "d"
1124 #if !defined SCNiFAST8 || 0
1126 # if INT_FAST8_MAX > INT32_MAX
1127 # define SCNiFAST8 SCNi64
1128 # elif INT_FAST8_MAX == 0x7fff
1129 # define SCNiFAST8 "hi"
1130 # elif INT_FAST8_MAX == 0x7f
1131 # define SCNiFAST8 "hhi"
1133 # define SCNiFAST8 "i"
1136 #if !defined SCNoFAST8 || 0
1138 # if UINT_FAST8_MAX > UINT32_MAX
1139 # define SCNoFAST8 SCNo64
1140 # elif UINT_FAST8_MAX == 0xffff
1141 # define SCNoFAST8 "ho"
1142 # elif UINT_FAST8_MAX == 0xff
1143 # define SCNoFAST8 "hho"
1145 # define SCNoFAST8 "o"
1148 #if !defined SCNuFAST8 || 0
1150 # if UINT_FAST8_MAX > UINT32_MAX
1151 # define SCNuFAST8 SCNu64
1152 # elif UINT_FAST8_MAX == 0xffff
1153 # define SCNuFAST8 "hu"
1154 # elif UINT_FAST8_MAX == 0xff
1155 # define SCNuFAST8 "hhu"
1157 # define SCNuFAST8 "u"
1160 #if !defined SCNxFAST8 || 0
1162 # if UINT_FAST8_MAX > UINT32_MAX
1163 # define SCNxFAST8 SCNx64
1164 # elif UINT_FAST8_MAX == 0xffff
1165 # define SCNxFAST8 "hx"
1166 # elif UINT_FAST8_MAX == 0xff
1167 # define SCNxFAST8 "hhx"
1169 # define SCNxFAST8 "x"
1172 #if !defined SCNdFAST16 || 0
1174 # if INT_FAST16_MAX > INT32_MAX
1175 # define SCNdFAST16 SCNd64
1176 # elif INT_FAST16_MAX == 0x7fff
1177 # define SCNdFAST16 "hd"
1179 # define SCNdFAST16 "d"
1182 #if !defined SCNiFAST16 || 0
1184 # if INT_FAST16_MAX > INT32_MAX
1185 # define SCNiFAST16 SCNi64
1186 # elif INT_FAST16_MAX == 0x7fff
1187 # define SCNiFAST16 "hi"
1189 # define SCNiFAST16 "i"
1192 #if !defined SCNoFAST16 || 0
1194 # if UINT_FAST16_MAX > UINT32_MAX
1195 # define SCNoFAST16 SCNo64
1196 # elif UINT_FAST16_MAX == 0xffff
1197 # define SCNoFAST16 "ho"
1199 # define SCNoFAST16 "o"
1202 #if !defined SCNuFAST16 || 0
1204 # if UINT_FAST16_MAX > UINT32_MAX
1205 # define SCNuFAST16 SCNu64
1206 # elif UINT_FAST16_MAX == 0xffff
1207 # define SCNuFAST16 "hu"
1209 # define SCNuFAST16 "u"
1212 #if !defined SCNxFAST16 || 0
1214 # if UINT_FAST16_MAX > UINT32_MAX
1215 # define SCNxFAST16 SCNx64
1216 # elif UINT_FAST16_MAX == 0xffff
1217 # define SCNxFAST16 "hx"
1219 # define SCNxFAST16 "x"
1222 #if !defined SCNdFAST32 || 0
1224 # if INT_FAST32_MAX > INT32_MAX
1225 # define SCNdFAST32 SCNd64
1227 # define SCNdFAST32 "d"
1230 #if !defined SCNiFAST32 || 0
1232 # if INT_FAST32_MAX > INT32_MAX
1233 # define SCNiFAST32 SCNi64
1235 # define SCNiFAST32 "i"
1238 #if !defined SCNoFAST32 || 0
1240 # if UINT_FAST32_MAX > UINT32_MAX
1241 # define SCNoFAST32 SCNo64
1243 # define SCNoFAST32 "o"
1246 #if !defined SCNuFAST32 || 0
1248 # if UINT_FAST32_MAX > UINT32_MAX
1249 # define SCNuFAST32 SCNu64
1251 # define SCNuFAST32 "u"
1254 #if !defined SCNxFAST32 || 0
1256 # if UINT_FAST32_MAX > UINT32_MAX
1257 # define SCNxFAST32 SCNx64
1259 # define SCNxFAST32 "x"
1263 # if !defined SCNdFAST64 || 0
1265 # define SCNdFAST64 SCNd64
1267 # if !defined SCNiFAST64 || 0
1269 # define SCNiFAST64 SCNi64
1273 # if !defined SCNoFAST64 || 0
1275 # define SCNoFAST64 SCNo64
1277 # if !defined SCNuFAST64 || 0
1279 # define SCNuFAST64 SCNu64
1281 # if !defined SCNxFAST64 || 0
1283 # define SCNxFAST64 SCNx64
1287 #if !defined SCNdMAX || 0
1290 # define SCNdMAX SCNd64
1292 # define SCNdMAX "ld"
1295 #if !defined SCNiMAX || 0
1298 # define SCNiMAX SCNi64
1300 # define SCNiMAX "li"
1303 #if !defined SCNoMAX || 0
1306 # define SCNoMAX SCNo64
1308 # define SCNoMAX "lo"
1311 #if !defined SCNuMAX || 0
1314 # define SCNuMAX SCNu64
1316 # define SCNuMAX "lu"
1319 #if !defined SCNxMAX || 0
1322 # define SCNxMAX SCNx64
1324 # define SCNxMAX "lx"
1328 #if !defined SCNdPTR || 0
1331 # define SCNdPTR "l" "d"
1334 #if !defined SCNiPTR || 0
1337 # define SCNiPTR "l" "i"
1340 #if !defined SCNoPTR || 0
1343 # define SCNoPTR "l" "o"
1346 #if !defined SCNuPTR || 0
1349 # define SCNuPTR "l" "u"
1352 #if !defined SCNxPTR || 0
1355 # define SCNxPTR "l" "x"
1359 /* 7.8.2 Functions for greatest-width integer types */
1367 extern intmax_t imaxabs (intmax_t);
1369 #elif defined GNULIB_POSIXCHECK
1371 # if HAVE_RAW_DECL_IMAXABS
1372 _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
1373 "use gnulib module imaxabs for portability");
1379 # if !GNULIB_defined_imaxdiv_t
1380 typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
1381 # define GNULIB_defined_imaxdiv_t 1
1383 extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
1385 #elif defined GNULIB_POSIXCHECK
1387 # if HAVE_RAW_DECL_IMAXDIV
1388 _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
1389 "use gnulib module imaxdiv for portability");
1395 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1397 # define strtoimax rpl_strtoimax
1399 _GL_FUNCDECL_RPL (strtoimax, intmax_t,
1400 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1401 _GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
1405 _GL_FUNCDECL_SYS (strtoimax, intmax_t,
1406 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1408 _GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
1410 _GL_CXXALIASWARN (strtoimax);
1411 #elif defined GNULIB_POSIXCHECK
1413 # if HAVE_RAW_DECL_STRTOIMAX
1414 _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
1415 "use gnulib module strtoimax for portability");
1421 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1423 # define strtoumax rpl_strtoumax
1425 _GL_FUNCDECL_RPL (strtoumax, uintmax_t,
1426 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1427 _GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
1431 _GL_FUNCDECL_SYS (strtoumax, uintmax_t,
1432 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1434 _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
1436 _GL_CXXALIASWARN (strtoumax);
1437 #elif defined GNULIB_POSIXCHECK
1439 # if HAVE_RAW_DECL_STRTOUMAX
1440 _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
1441 "use gnulib module strtoumax for portability");
1445 /* Don't bother defining or declaring wcstoimax and wcstoumax, since
1446 wide-character functions like this are hardly ever useful. */
1452 #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */