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