Last commit was missing updated source file.
[emacs.git] / lib / inttypes.in.h
blob7abf39403f01670f61346ca31f15f64d238c5000
1 /* Copyright (C) 2006-2011 Free Software Foundation, Inc.
2 Written by Paul Eggert, Bruno Haible, Derek Price.
3 This file is part of gnulib.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 * ISO C 99 <inttypes.h> for platforms that lack it.
20 * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
23 #if __GNUC__ >= 3
24 @PRAGMA_SYSTEM_HEADER@
25 #endif
26 @PRAGMA_COLUMNS@
28 /* Include the original <inttypes.h> if it exists, and if this file
29 has not been included yet or if this file includes gnulib stdint.h
30 which in turn includes this file.
31 The include_next requires a split double-inclusion guard. */
32 #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
33 # if @HAVE_INTTYPES_H@
34 # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
35 # endif
36 #endif
38 #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
39 #define INTTYPES_H
41 /* Include <stdint.h> or the gnulib replacement.
42 But avoid namespace pollution on glibc systems. */
43 #ifndef __GLIBC__
44 # include <stdint.h>
45 #endif
46 /* Get CHAR_BIT. */
47 #include <limits.h>
49 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
50 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
51 #endif
53 /* The definition of _GL_ARG_NONNULL is copied here. */
55 /* The definition of _GL_WARN_ON_USE is copied here. */
57 /* 7.8.1 Macros for format specifiers */
59 #if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
61 # if defined _TNS_R_TARGET
62 /* Tandem NonStop R series and compatible platforms released before
63 July 2005 support %Ld but not %lld. */
64 # define _LONG_LONG_FORMAT_PREFIX "L"
65 # else
66 # define _LONG_LONG_FORMAT_PREFIX "ll"
67 # endif
69 # if !defined PRId8 || @PRI_MACROS_BROKEN@
70 # undef PRId8
71 # ifdef INT8_MAX
72 # define PRId8 "d"
73 # endif
74 # endif
75 # if !defined PRIi8 || @PRI_MACROS_BROKEN@
76 # undef PRIi8
77 # ifdef INT8_MAX
78 # define PRIi8 "i"
79 # endif
80 # endif
81 # if !defined PRIo8 || @PRI_MACROS_BROKEN@
82 # undef PRIo8
83 # ifdef UINT8_MAX
84 # define PRIo8 "o"
85 # endif
86 # endif
87 # if !defined PRIu8 || @PRI_MACROS_BROKEN@
88 # undef PRIu8
89 # ifdef UINT8_MAX
90 # define PRIu8 "u"
91 # endif
92 # endif
93 # if !defined PRIx8 || @PRI_MACROS_BROKEN@
94 # undef PRIx8
95 # ifdef UINT8_MAX
96 # define PRIx8 "x"
97 # endif
98 # endif
99 # if !defined PRIX8 || @PRI_MACROS_BROKEN@
100 # undef PRIX8
101 # ifdef UINT8_MAX
102 # define PRIX8 "X"
103 # endif
104 # endif
105 # if !defined PRId16 || @PRI_MACROS_BROKEN@
106 # undef PRId16
107 # ifdef INT16_MAX
108 # define PRId16 "d"
109 # endif
110 # endif
111 # if !defined PRIi16 || @PRI_MACROS_BROKEN@
112 # undef PRIi16
113 # ifdef INT16_MAX
114 # define PRIi16 "i"
115 # endif
116 # endif
117 # if !defined PRIo16 || @PRI_MACROS_BROKEN@
118 # undef PRIo16
119 # ifdef UINT16_MAX
120 # define PRIo16 "o"
121 # endif
122 # endif
123 # if !defined PRIu16 || @PRI_MACROS_BROKEN@
124 # undef PRIu16
125 # ifdef UINT16_MAX
126 # define PRIu16 "u"
127 # endif
128 # endif
129 # if !defined PRIx16 || @PRI_MACROS_BROKEN@
130 # undef PRIx16
131 # ifdef UINT16_MAX
132 # define PRIx16 "x"
133 # endif
134 # endif
135 # if !defined PRIX16 || @PRI_MACROS_BROKEN@
136 # undef PRIX16
137 # ifdef UINT16_MAX
138 # define PRIX16 "X"
139 # endif
140 # endif
141 # if !defined PRId32 || @PRI_MACROS_BROKEN@
142 # undef PRId32
143 # ifdef INT32_MAX
144 # define PRId32 "d"
145 # endif
146 # endif
147 # if !defined PRIi32 || @PRI_MACROS_BROKEN@
148 # undef PRIi32
149 # ifdef INT32_MAX
150 # define PRIi32 "i"
151 # endif
152 # endif
153 # if !defined PRIo32 || @PRI_MACROS_BROKEN@
154 # undef PRIo32
155 # ifdef UINT32_MAX
156 # define PRIo32 "o"
157 # endif
158 # endif
159 # if !defined PRIu32 || @PRI_MACROS_BROKEN@
160 # undef PRIu32
161 # ifdef UINT32_MAX
162 # define PRIu32 "u"
163 # endif
164 # endif
165 # if !defined PRIx32 || @PRI_MACROS_BROKEN@
166 # undef PRIx32
167 # ifdef UINT32_MAX
168 # define PRIx32 "x"
169 # endif
170 # endif
171 # if !defined PRIX32 || @PRI_MACROS_BROKEN@
172 # undef PRIX32
173 # ifdef UINT32_MAX
174 # define PRIX32 "X"
175 # endif
176 # endif
177 # ifdef INT64_MAX
178 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
179 # define _PRI64_PREFIX "l"
180 # elif defined _MSC_VER || defined __MINGW32__
181 # define _PRI64_PREFIX "I64"
182 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
183 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
184 # endif
185 # if !defined PRId64 || @PRI_MACROS_BROKEN@
186 # undef PRId64
187 # define PRId64 _PRI64_PREFIX "d"
188 # endif
189 # if !defined PRIi64 || @PRI_MACROS_BROKEN@
190 # undef PRIi64
191 # define PRIi64 _PRI64_PREFIX "i"
192 # endif
193 # endif
194 # ifdef UINT64_MAX
195 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
196 # define _PRIu64_PREFIX "l"
197 # elif defined _MSC_VER || defined __MINGW32__
198 # define _PRIu64_PREFIX "I64"
199 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
200 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
201 # endif
202 # if !defined PRIo64 || @PRI_MACROS_BROKEN@
203 # undef PRIo64
204 # define PRIo64 _PRIu64_PREFIX "o"
205 # endif
206 # if !defined PRIu64 || @PRI_MACROS_BROKEN@
207 # undef PRIu64
208 # define PRIu64 _PRIu64_PREFIX "u"
209 # endif
210 # if !defined PRIx64 || @PRI_MACROS_BROKEN@
211 # undef PRIx64
212 # define PRIx64 _PRIu64_PREFIX "x"
213 # endif
214 # if !defined PRIX64 || @PRI_MACROS_BROKEN@
215 # undef PRIX64
216 # define PRIX64 _PRIu64_PREFIX "X"
217 # endif
218 # endif
220 # if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
221 # undef PRIdLEAST8
222 # define PRIdLEAST8 "d"
223 # endif
224 # if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
225 # undef PRIiLEAST8
226 # define PRIiLEAST8 "i"
227 # endif
228 # if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
229 # undef PRIoLEAST8
230 # define PRIoLEAST8 "o"
231 # endif
232 # if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
233 # undef PRIuLEAST8
234 # define PRIuLEAST8 "u"
235 # endif
236 # if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
237 # undef PRIxLEAST8
238 # define PRIxLEAST8 "x"
239 # endif
240 # if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
241 # undef PRIXLEAST8
242 # define PRIXLEAST8 "X"
243 # endif
244 # if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
245 # undef PRIdLEAST16
246 # define PRIdLEAST16 "d"
247 # endif
248 # if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
249 # undef PRIiLEAST16
250 # define PRIiLEAST16 "i"
251 # endif
252 # if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
253 # undef PRIoLEAST16
254 # define PRIoLEAST16 "o"
255 # endif
256 # if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
257 # undef PRIuLEAST16
258 # define PRIuLEAST16 "u"
259 # endif
260 # if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
261 # undef PRIxLEAST16
262 # define PRIxLEAST16 "x"
263 # endif
264 # if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
265 # undef PRIXLEAST16
266 # define PRIXLEAST16 "X"
267 # endif
268 # if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
269 # undef PRIdLEAST32
270 # define PRIdLEAST32 "d"
271 # endif
272 # if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
273 # undef PRIiLEAST32
274 # define PRIiLEAST32 "i"
275 # endif
276 # if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
277 # undef PRIoLEAST32
278 # define PRIoLEAST32 "o"
279 # endif
280 # if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
281 # undef PRIuLEAST32
282 # define PRIuLEAST32 "u"
283 # endif
284 # if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
285 # undef PRIxLEAST32
286 # define PRIxLEAST32 "x"
287 # endif
288 # if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
289 # undef PRIXLEAST32
290 # define PRIXLEAST32 "X"
291 # endif
292 # ifdef INT64_MAX
293 # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
294 # undef PRIdLEAST64
295 # define PRIdLEAST64 PRId64
296 # endif
297 # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
298 # undef PRIiLEAST64
299 # define PRIiLEAST64 PRIi64
300 # endif
301 # endif
302 # ifdef UINT64_MAX
303 # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
304 # undef PRIoLEAST64
305 # define PRIoLEAST64 PRIo64
306 # endif
307 # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
308 # undef PRIuLEAST64
309 # define PRIuLEAST64 PRIu64
310 # endif
311 # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
312 # undef PRIxLEAST64
313 # define PRIxLEAST64 PRIx64
314 # endif
315 # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
316 # undef PRIXLEAST64
317 # define PRIXLEAST64 PRIX64
318 # endif
319 # endif
321 # if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
322 # undef PRIdFAST8
323 # if INT_FAST8_MAX > INT32_MAX
324 # define PRIdFAST8 PRId64
325 # else
326 # define PRIdFAST8 "d"
327 # endif
328 # endif
329 # if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
330 # undef PRIiFAST8
331 # if INT_FAST8_MAX > INT32_MAX
332 # define PRIiFAST8 PRIi64
333 # else
334 # define PRIiFAST8 "i"
335 # endif
336 # endif
337 # if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
338 # undef PRIoFAST8
339 # if UINT_FAST8_MAX > UINT32_MAX
340 # define PRIoFAST8 PRIo64
341 # else
342 # define PRIoFAST8 "o"
343 # endif
344 # endif
345 # if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
346 # undef PRIuFAST8
347 # if UINT_FAST8_MAX > UINT32_MAX
348 # define PRIuFAST8 PRIu64
349 # else
350 # define PRIuFAST8 "u"
351 # endif
352 # endif
353 # if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
354 # undef PRIxFAST8
355 # if UINT_FAST8_MAX > UINT32_MAX
356 # define PRIxFAST8 PRIx64
357 # else
358 # define PRIxFAST8 "x"
359 # endif
360 # endif
361 # if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
362 # undef PRIXFAST8
363 # if UINT_FAST8_MAX > UINT32_MAX
364 # define PRIXFAST8 PRIX64
365 # else
366 # define PRIXFAST8 "X"
367 # endif
368 # endif
369 # if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
370 # undef PRIdFAST16
371 # if INT_FAST16_MAX > INT32_MAX
372 # define PRIdFAST16 PRId64
373 # else
374 # define PRIdFAST16 "d"
375 # endif
376 # endif
377 # if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
378 # undef PRIiFAST16
379 # if INT_FAST16_MAX > INT32_MAX
380 # define PRIiFAST16 PRIi64
381 # else
382 # define PRIiFAST16 "i"
383 # endif
384 # endif
385 # if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
386 # undef PRIoFAST16
387 # if UINT_FAST16_MAX > UINT32_MAX
388 # define PRIoFAST16 PRIo64
389 # else
390 # define PRIoFAST16 "o"
391 # endif
392 # endif
393 # if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
394 # undef PRIuFAST16
395 # if UINT_FAST16_MAX > UINT32_MAX
396 # define PRIuFAST16 PRIu64
397 # else
398 # define PRIuFAST16 "u"
399 # endif
400 # endif
401 # if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
402 # undef PRIxFAST16
403 # if UINT_FAST16_MAX > UINT32_MAX
404 # define PRIxFAST16 PRIx64
405 # else
406 # define PRIxFAST16 "x"
407 # endif
408 # endif
409 # if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
410 # undef PRIXFAST16
411 # if UINT_FAST16_MAX > UINT32_MAX
412 # define PRIXFAST16 PRIX64
413 # else
414 # define PRIXFAST16 "X"
415 # endif
416 # endif
417 # if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
418 # undef PRIdFAST32
419 # if INT_FAST32_MAX > INT32_MAX
420 # define PRIdFAST32 PRId64
421 # else
422 # define PRIdFAST32 "d"
423 # endif
424 # endif
425 # if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
426 # undef PRIiFAST32
427 # if INT_FAST32_MAX > INT32_MAX
428 # define PRIiFAST32 PRIi64
429 # else
430 # define PRIiFAST32 "i"
431 # endif
432 # endif
433 # if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
434 # undef PRIoFAST32
435 # if UINT_FAST32_MAX > UINT32_MAX
436 # define PRIoFAST32 PRIo64
437 # else
438 # define PRIoFAST32 "o"
439 # endif
440 # endif
441 # if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
442 # undef PRIuFAST32
443 # if UINT_FAST32_MAX > UINT32_MAX
444 # define PRIuFAST32 PRIu64
445 # else
446 # define PRIuFAST32 "u"
447 # endif
448 # endif
449 # if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
450 # undef PRIxFAST32
451 # if UINT_FAST32_MAX > UINT32_MAX
452 # define PRIxFAST32 PRIx64
453 # else
454 # define PRIxFAST32 "x"
455 # endif
456 # endif
457 # if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
458 # undef PRIXFAST32
459 # if UINT_FAST32_MAX > UINT32_MAX
460 # define PRIXFAST32 PRIX64
461 # else
462 # define PRIXFAST32 "X"
463 # endif
464 # endif
465 # ifdef INT64_MAX
466 # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
467 # undef PRIdFAST64
468 # define PRIdFAST64 PRId64
469 # endif
470 # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
471 # undef PRIiFAST64
472 # define PRIiFAST64 PRIi64
473 # endif
474 # endif
475 # ifdef UINT64_MAX
476 # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
477 # undef PRIoFAST64
478 # define PRIoFAST64 PRIo64
479 # endif
480 # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
481 # undef PRIuFAST64
482 # define PRIuFAST64 PRIu64
483 # endif
484 # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
485 # undef PRIxFAST64
486 # define PRIxFAST64 PRIx64
487 # endif
488 # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
489 # undef PRIXFAST64
490 # define PRIXFAST64 PRIX64
491 # endif
492 # endif
494 # if !defined PRIdMAX || @PRI_MACROS_BROKEN@
495 # undef PRIdMAX
496 # if @INT32_MAX_LT_INTMAX_MAX@
497 # define PRIdMAX PRId64
498 # else
499 # define PRIdMAX "ld"
500 # endif
501 # endif
502 # if !defined PRIiMAX || @PRI_MACROS_BROKEN@
503 # undef PRIiMAX
504 # if @INT32_MAX_LT_INTMAX_MAX@
505 # define PRIiMAX PRIi64
506 # else
507 # define PRIiMAX "li"
508 # endif
509 # endif
510 # if !defined PRIoMAX || @PRI_MACROS_BROKEN@
511 # undef PRIoMAX
512 # if @UINT32_MAX_LT_UINTMAX_MAX@
513 # define PRIoMAX PRIo64
514 # else
515 # define PRIoMAX "lo"
516 # endif
517 # endif
518 # if !defined PRIuMAX || @PRI_MACROS_BROKEN@
519 # undef PRIuMAX
520 # if @UINT32_MAX_LT_UINTMAX_MAX@
521 # define PRIuMAX PRIu64
522 # else
523 # define PRIuMAX "lu"
524 # endif
525 # endif
526 # if !defined PRIxMAX || @PRI_MACROS_BROKEN@
527 # undef PRIxMAX
528 # if @UINT32_MAX_LT_UINTMAX_MAX@
529 # define PRIxMAX PRIx64
530 # else
531 # define PRIxMAX "lx"
532 # endif
533 # endif
534 # if !defined PRIXMAX || @PRI_MACROS_BROKEN@
535 # undef PRIXMAX
536 # if @UINT32_MAX_LT_UINTMAX_MAX@
537 # define PRIXMAX PRIX64
538 # else
539 # define PRIXMAX "lX"
540 # endif
541 # endif
543 # if !defined PRIdPTR || @PRI_MACROS_BROKEN@
544 # undef PRIdPTR
545 # ifdef INTPTR_MAX
546 # define PRIdPTR @PRIPTR_PREFIX@ "d"
547 # endif
548 # endif
549 # if !defined PRIiPTR || @PRI_MACROS_BROKEN@
550 # undef PRIiPTR
551 # ifdef INTPTR_MAX
552 # define PRIiPTR @PRIPTR_PREFIX@ "i"
553 # endif
554 # endif
555 # if !defined PRIoPTR || @PRI_MACROS_BROKEN@
556 # undef PRIoPTR
557 # ifdef UINTPTR_MAX
558 # define PRIoPTR @PRIPTR_PREFIX@ "o"
559 # endif
560 # endif
561 # if !defined PRIuPTR || @PRI_MACROS_BROKEN@
562 # undef PRIuPTR
563 # ifdef UINTPTR_MAX
564 # define PRIuPTR @PRIPTR_PREFIX@ "u"
565 # endif
566 # endif
567 # if !defined PRIxPTR || @PRI_MACROS_BROKEN@
568 # undef PRIxPTR
569 # ifdef UINTPTR_MAX
570 # define PRIxPTR @PRIPTR_PREFIX@ "x"
571 # endif
572 # endif
573 # if !defined PRIXPTR || @PRI_MACROS_BROKEN@
574 # undef PRIXPTR
575 # ifdef UINTPTR_MAX
576 # define PRIXPTR @PRIPTR_PREFIX@ "X"
577 # endif
578 # endif
580 # if !defined SCNd8 || @PRI_MACROS_BROKEN@
581 # undef SCNd8
582 # ifdef INT8_MAX
583 # define SCNd8 "hhd"
584 # endif
585 # endif
586 # if !defined SCNi8 || @PRI_MACROS_BROKEN@
587 # undef SCNi8
588 # ifdef INT8_MAX
589 # define SCNi8 "hhi"
590 # endif
591 # endif
592 # if !defined SCNo8 || @PRI_MACROS_BROKEN@
593 # undef SCNo8
594 # ifdef UINT8_MAX
595 # define SCNo8 "hho"
596 # endif
597 # endif
598 # if !defined SCNu8 || @PRI_MACROS_BROKEN@
599 # undef SCNu8
600 # ifdef UINT8_MAX
601 # define SCNu8 "hhu"
602 # endif
603 # endif
604 # if !defined SCNx8 || @PRI_MACROS_BROKEN@
605 # undef SCNx8
606 # ifdef UINT8_MAX
607 # define SCNx8 "hhx"
608 # endif
609 # endif
610 # if !defined SCNd16 || @PRI_MACROS_BROKEN@
611 # undef SCNd16
612 # ifdef INT16_MAX
613 # define SCNd16 "hd"
614 # endif
615 # endif
616 # if !defined SCNi16 || @PRI_MACROS_BROKEN@
617 # undef SCNi16
618 # ifdef INT16_MAX
619 # define SCNi16 "hi"
620 # endif
621 # endif
622 # if !defined SCNo16 || @PRI_MACROS_BROKEN@
623 # undef SCNo16
624 # ifdef UINT16_MAX
625 # define SCNo16 "ho"
626 # endif
627 # endif
628 # if !defined SCNu16 || @PRI_MACROS_BROKEN@
629 # undef SCNu16
630 # ifdef UINT16_MAX
631 # define SCNu16 "hu"
632 # endif
633 # endif
634 # if !defined SCNx16 || @PRI_MACROS_BROKEN@
635 # undef SCNx16
636 # ifdef UINT16_MAX
637 # define SCNx16 "hx"
638 # endif
639 # endif
640 # if !defined SCNd32 || @PRI_MACROS_BROKEN@
641 # undef SCNd32
642 # ifdef INT32_MAX
643 # define SCNd32 "d"
644 # endif
645 # endif
646 # if !defined SCNi32 || @PRI_MACROS_BROKEN@
647 # undef SCNi32
648 # ifdef INT32_MAX
649 # define SCNi32 "i"
650 # endif
651 # endif
652 # if !defined SCNo32 || @PRI_MACROS_BROKEN@
653 # undef SCNo32
654 # ifdef UINT32_MAX
655 # define SCNo32 "o"
656 # endif
657 # endif
658 # if !defined SCNu32 || @PRI_MACROS_BROKEN@
659 # undef SCNu32
660 # ifdef UINT32_MAX
661 # define SCNu32 "u"
662 # endif
663 # endif
664 # if !defined SCNx32 || @PRI_MACROS_BROKEN@
665 # undef SCNx32
666 # ifdef UINT32_MAX
667 # define SCNx32 "x"
668 # endif
669 # endif
670 # ifdef INT64_MAX
671 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
672 # define _SCN64_PREFIX "l"
673 # elif defined _MSC_VER || defined __MINGW32__
674 # define _SCN64_PREFIX "I64"
675 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
676 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
677 # endif
678 # if !defined SCNd64 || @PRI_MACROS_BROKEN@
679 # undef SCNd64
680 # define SCNd64 _SCN64_PREFIX "d"
681 # endif
682 # if !defined SCNi64 || @PRI_MACROS_BROKEN@
683 # undef SCNi64
684 # define SCNi64 _SCN64_PREFIX "i"
685 # endif
686 # endif
687 # ifdef UINT64_MAX
688 # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
689 # define _SCNu64_PREFIX "l"
690 # elif defined _MSC_VER || defined __MINGW32__
691 # define _SCNu64_PREFIX "I64"
692 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
693 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
694 # endif
695 # if !defined SCNo64 || @PRI_MACROS_BROKEN@
696 # undef SCNo64
697 # define SCNo64 _SCNu64_PREFIX "o"
698 # endif
699 # if !defined SCNu64 || @PRI_MACROS_BROKEN@
700 # undef SCNu64
701 # define SCNu64 _SCNu64_PREFIX "u"
702 # endif
703 # if !defined SCNx64 || @PRI_MACROS_BROKEN@
704 # undef SCNx64
705 # define SCNx64 _SCNu64_PREFIX "x"
706 # endif
707 # endif
709 # if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
710 # undef SCNdLEAST8
711 # define SCNdLEAST8 "hhd"
712 # endif
713 # if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
714 # undef SCNiLEAST8
715 # define SCNiLEAST8 "hhi"
716 # endif
717 # if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
718 # undef SCNoLEAST8
719 # define SCNoLEAST8 "hho"
720 # endif
721 # if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
722 # undef SCNuLEAST8
723 # define SCNuLEAST8 "hhu"
724 # endif
725 # if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
726 # undef SCNxLEAST8
727 # define SCNxLEAST8 "hhx"
728 # endif
729 # if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
730 # undef SCNdLEAST16
731 # define SCNdLEAST16 "hd"
732 # endif
733 # if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
734 # undef SCNiLEAST16
735 # define SCNiLEAST16 "hi"
736 # endif
737 # if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
738 # undef SCNoLEAST16
739 # define SCNoLEAST16 "ho"
740 # endif
741 # if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
742 # undef SCNuLEAST16
743 # define SCNuLEAST16 "hu"
744 # endif
745 # if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
746 # undef SCNxLEAST16
747 # define SCNxLEAST16 "hx"
748 # endif
749 # if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
750 # undef SCNdLEAST32
751 # define SCNdLEAST32 "d"
752 # endif
753 # if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
754 # undef SCNiLEAST32
755 # define SCNiLEAST32 "i"
756 # endif
757 # if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
758 # undef SCNoLEAST32
759 # define SCNoLEAST32 "o"
760 # endif
761 # if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
762 # undef SCNuLEAST32
763 # define SCNuLEAST32 "u"
764 # endif
765 # if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
766 # undef SCNxLEAST32
767 # define SCNxLEAST32 "x"
768 # endif
769 # ifdef INT64_MAX
770 # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
771 # undef SCNdLEAST64
772 # define SCNdLEAST64 SCNd64
773 # endif
774 # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
775 # undef SCNiLEAST64
776 # define SCNiLEAST64 SCNi64
777 # endif
778 # endif
779 # ifdef UINT64_MAX
780 # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
781 # undef SCNoLEAST64
782 # define SCNoLEAST64 SCNo64
783 # endif
784 # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
785 # undef SCNuLEAST64
786 # define SCNuLEAST64 SCNu64
787 # endif
788 # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
789 # undef SCNxLEAST64
790 # define SCNxLEAST64 SCNx64
791 # endif
792 # endif
794 # if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
795 # undef SCNdFAST8
796 # if INT_FAST8_MAX > INT32_MAX
797 # define SCNdFAST8 SCNd64
798 # elif INT_FAST8_MAX == 0x7fff
799 # define SCNdFAST8 "hd"
800 # elif INT_FAST8_MAX == 0x7f
801 # define SCNdFAST8 "hhd"
802 # else
803 # define SCNdFAST8 "d"
804 # endif
805 # endif
806 # if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
807 # undef SCNiFAST8
808 # if INT_FAST8_MAX > INT32_MAX
809 # define SCNiFAST8 SCNi64
810 # elif INT_FAST8_MAX == 0x7fff
811 # define SCNiFAST8 "hi"
812 # elif INT_FAST8_MAX == 0x7f
813 # define SCNiFAST8 "hhi"
814 # else
815 # define SCNiFAST8 "i"
816 # endif
817 # endif
818 # if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
819 # undef SCNoFAST8
820 # if UINT_FAST8_MAX > UINT32_MAX
821 # define SCNoFAST8 SCNo64
822 # elif UINT_FAST8_MAX == 0xffff
823 # define SCNoFAST8 "ho"
824 # elif UINT_FAST8_MAX == 0xff
825 # define SCNoFAST8 "hho"
826 # else
827 # define SCNoFAST8 "o"
828 # endif
829 # endif
830 # if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
831 # undef SCNuFAST8
832 # if UINT_FAST8_MAX > UINT32_MAX
833 # define SCNuFAST8 SCNu64
834 # elif UINT_FAST8_MAX == 0xffff
835 # define SCNuFAST8 "hu"
836 # elif UINT_FAST8_MAX == 0xff
837 # define SCNuFAST8 "hhu"
838 # else
839 # define SCNuFAST8 "u"
840 # endif
841 # endif
842 # if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
843 # undef SCNxFAST8
844 # if UINT_FAST8_MAX > UINT32_MAX
845 # define SCNxFAST8 SCNx64
846 # elif UINT_FAST8_MAX == 0xffff
847 # define SCNxFAST8 "hx"
848 # elif UINT_FAST8_MAX == 0xff
849 # define SCNxFAST8 "hhx"
850 # else
851 # define SCNxFAST8 "x"
852 # endif
853 # endif
854 # if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
855 # undef SCNdFAST16
856 # if INT_FAST16_MAX > INT32_MAX
857 # define SCNdFAST16 SCNd64
858 # elif INT_FAST16_MAX == 0x7fff
859 # define SCNdFAST16 "hd"
860 # else
861 # define SCNdFAST16 "d"
862 # endif
863 # endif
864 # if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
865 # undef SCNiFAST16
866 # if INT_FAST16_MAX > INT32_MAX
867 # define SCNiFAST16 SCNi64
868 # elif INT_FAST16_MAX == 0x7fff
869 # define SCNiFAST16 "hi"
870 # else
871 # define SCNiFAST16 "i"
872 # endif
873 # endif
874 # if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
875 # undef SCNoFAST16
876 # if UINT_FAST16_MAX > UINT32_MAX
877 # define SCNoFAST16 SCNo64
878 # elif UINT_FAST16_MAX == 0xffff
879 # define SCNoFAST16 "ho"
880 # else
881 # define SCNoFAST16 "o"
882 # endif
883 # endif
884 # if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
885 # undef SCNuFAST16
886 # if UINT_FAST16_MAX > UINT32_MAX
887 # define SCNuFAST16 SCNu64
888 # elif UINT_FAST16_MAX == 0xffff
889 # define SCNuFAST16 "hu"
890 # else
891 # define SCNuFAST16 "u"
892 # endif
893 # endif
894 # if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
895 # undef SCNxFAST16
896 # if UINT_FAST16_MAX > UINT32_MAX
897 # define SCNxFAST16 SCNx64
898 # elif UINT_FAST16_MAX == 0xffff
899 # define SCNxFAST16 "hx"
900 # else
901 # define SCNxFAST16 "x"
902 # endif
903 # endif
904 # if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
905 # undef SCNdFAST32
906 # if INT_FAST32_MAX > INT32_MAX
907 # define SCNdFAST32 SCNd64
908 # else
909 # define SCNdFAST32 "d"
910 # endif
911 # endif
912 # if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
913 # undef SCNiFAST32
914 # if INT_FAST32_MAX > INT32_MAX
915 # define SCNiFAST32 SCNi64
916 # else
917 # define SCNiFAST32 "i"
918 # endif
919 # endif
920 # if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
921 # undef SCNoFAST32
922 # if UINT_FAST32_MAX > UINT32_MAX
923 # define SCNoFAST32 SCNo64
924 # else
925 # define SCNoFAST32 "o"
926 # endif
927 # endif
928 # if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
929 # undef SCNuFAST32
930 # if UINT_FAST32_MAX > UINT32_MAX
931 # define SCNuFAST32 SCNu64
932 # else
933 # define SCNuFAST32 "u"
934 # endif
935 # endif
936 # if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
937 # undef SCNxFAST32
938 # if UINT_FAST32_MAX > UINT32_MAX
939 # define SCNxFAST32 SCNx64
940 # else
941 # define SCNxFAST32 "x"
942 # endif
943 # endif
944 # ifdef INT64_MAX
945 # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
946 # undef SCNdFAST64
947 # define SCNdFAST64 SCNd64
948 # endif
949 # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
950 # undef SCNiFAST64
951 # define SCNiFAST64 SCNi64
952 # endif
953 # endif
954 # ifdef UINT64_MAX
955 # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
956 # undef SCNoFAST64
957 # define SCNoFAST64 SCNo64
958 # endif
959 # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
960 # undef SCNuFAST64
961 # define SCNuFAST64 SCNu64
962 # endif
963 # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
964 # undef SCNxFAST64
965 # define SCNxFAST64 SCNx64
966 # endif
967 # endif
969 # if !defined SCNdMAX || @PRI_MACROS_BROKEN@
970 # undef SCNdMAX
971 # if @INT32_MAX_LT_INTMAX_MAX@
972 # define SCNdMAX SCNd64
973 # else
974 # define SCNdMAX "ld"
975 # endif
976 # endif
977 # if !defined SCNiMAX || @PRI_MACROS_BROKEN@
978 # undef SCNiMAX
979 # if @INT32_MAX_LT_INTMAX_MAX@
980 # define SCNiMAX SCNi64
981 # else
982 # define SCNiMAX "li"
983 # endif
984 # endif
985 # if !defined SCNoMAX || @PRI_MACROS_BROKEN@
986 # undef SCNoMAX
987 # if @UINT32_MAX_LT_UINTMAX_MAX@
988 # define SCNoMAX SCNo64
989 # else
990 # define SCNoMAX "lo"
991 # endif
992 # endif
993 # if !defined SCNuMAX || @PRI_MACROS_BROKEN@
994 # undef SCNuMAX
995 # if @UINT32_MAX_LT_UINTMAX_MAX@
996 # define SCNuMAX SCNu64
997 # else
998 # define SCNuMAX "lu"
999 # endif
1000 # endif
1001 # if !defined SCNxMAX || @PRI_MACROS_BROKEN@
1002 # undef SCNxMAX
1003 # if @UINT32_MAX_LT_UINTMAX_MAX@
1004 # define SCNxMAX SCNx64
1005 # else
1006 # define SCNxMAX "lx"
1007 # endif
1008 # endif
1010 # if !defined SCNdPTR || @PRI_MACROS_BROKEN@
1011 # undef SCNdPTR
1012 # ifdef INTPTR_MAX
1013 # define SCNdPTR @PRIPTR_PREFIX@ "d"
1014 # endif
1015 # endif
1016 # if !defined SCNiPTR || @PRI_MACROS_BROKEN@
1017 # undef SCNiPTR
1018 # ifdef INTPTR_MAX
1019 # define SCNiPTR @PRIPTR_PREFIX@ "i"
1020 # endif
1021 # endif
1022 # if !defined SCNoPTR || @PRI_MACROS_BROKEN@
1023 # undef SCNoPTR
1024 # ifdef UINTPTR_MAX
1025 # define SCNoPTR @PRIPTR_PREFIX@ "o"
1026 # endif
1027 # endif
1028 # if !defined SCNuPTR || @PRI_MACROS_BROKEN@
1029 # undef SCNuPTR
1030 # ifdef UINTPTR_MAX
1031 # define SCNuPTR @PRIPTR_PREFIX@ "u"
1032 # endif
1033 # endif
1034 # if !defined SCNxPTR || @PRI_MACROS_BROKEN@
1035 # undef SCNxPTR
1036 # ifdef UINTPTR_MAX
1037 # define SCNxPTR @PRIPTR_PREFIX@ "x"
1038 # endif
1039 # endif
1041 #endif
1043 /* 7.8.2 Functions for greatest-width integer types */
1045 #ifdef __cplusplus
1046 extern "C" {
1047 #endif
1049 #if @GNULIB_IMAXABS@
1050 # if !@HAVE_DECL_IMAXABS@
1051 extern intmax_t imaxabs (intmax_t);
1052 # endif
1053 #elif defined GNULIB_POSIXCHECK
1054 # undef imaxabs
1055 # if HAVE_RAW_DECL_IMAXABS
1056 _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
1057 "use gnulib module imaxabs for portability");
1058 # endif
1059 #endif
1061 #if @GNULIB_IMAXDIV@
1062 # if !@HAVE_DECL_IMAXDIV@
1063 # if !GNULIB_defined_imaxdiv_t
1064 typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
1065 # define GNULIB_defined_imaxdiv_t 1
1066 # endif
1067 extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
1068 # endif
1069 #elif defined GNULIB_POSIXCHECK
1070 # undef imaxdiv
1071 # if HAVE_RAW_DECL_IMAXDIV
1072 _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
1073 "use gnulib module imaxdiv for portability");
1074 # endif
1075 #endif
1077 #if @GNULIB_STRTOIMAX@
1078 # if !@HAVE_DECL_STRTOIMAX@
1079 # undef strtoimax
1080 extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1081 # endif
1082 #elif defined GNULIB_POSIXCHECK
1083 # undef strtoimax
1084 # if HAVE_RAW_DECL_STRTOIMAX
1085 _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
1086 "use gnulib module strtoimax for portability");
1087 # endif
1088 #endif
1090 #if @GNULIB_STRTOUMAX@
1091 # if !@HAVE_DECL_STRTOUMAX@
1092 # undef strtoumax
1093 extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1094 # endif
1095 #elif defined GNULIB_POSIXCHECK
1096 # undef strtoumax
1097 # if HAVE_RAW_DECL_STRTOUMAX
1098 _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
1099 "use gnulib module strtoumax for portability");
1100 # endif
1101 #endif
1103 /* Don't bother defining or declaring wcstoimax and wcstoumax, since
1104 wide-character functions like this are hardly ever useful. */
1106 #ifdef __cplusplus
1108 #endif
1110 #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */