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