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