GDBserver

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