1 /* This file is automatically generated. DO NOT EDIT! */ 2 /* Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp */ 3 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ 4 5 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 6 /* Copyright (C) 2001-2002, 2004-2022 Free Software Foundation, Inc. 7 Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. 8 This file is part of gnulib. 9 10 This file is free software: you can redistribute it and/or modify 11 it under the terms of the GNU Lesser General Public License as 12 published by the Free Software Foundation; either version 2.1 of the 13 License, or (at your option) any later version. 14 15 This file is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU Lesser General Public License for more details. 19 20 You should have received a copy of the GNU Lesser General Public License 21 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 22 23 /* 24 * ISO C 99 <stdint.h> for platforms that lack it. 25 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html> 26 */ 27 28 #ifndef _GL_STDINT_H 29 30 #if __GNUC__ >= 3 31 #pragma GCC system_header 32 #endif 33 34 35 /* When including a system file that in turn includes <inttypes.h>, 36 use the system <inttypes.h>, not our substitute. This avoids 37 problems with (for example) VMS, whose <sys/bitypes.h> includes 38 <inttypes.h>. */ 39 #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H 40 41 /* On Android (Bionic libc), <sys/types.h> includes this file before 42 having defined 'time_t'. Therefore in this case avoid including 43 other system header files; just include the system's <stdint.h>. 44 Ideally we should test __BIONIC__ here, but it is only defined after 45 <sys/cdefs.h> has been included; hence test __ANDROID__ instead. */ 46 #if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H 47 # include_next <stdint.h> 48 #else 49 50 /* Get those types that are already defined in other system include 51 files, so that we can "#define int8_t signed char" below without 52 worrying about a later system include file containing a "typedef 53 signed char int8_t;" that will get messed up by our macro. Our 54 macros should all be consistent with the system versions, except 55 for the "fast" types and macros, which we recommend against using 56 in public interfaces due to compiler differences. */ 57 58 #if 1 59 # if defined __sgi && ! defined __c99 60 /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users 61 with "This header file is to be used only for c99 mode compilations" 62 diagnostics. */ 63 # define __STDINT_H__ 64 # endif 65 66 /* Some pre-C++11 <stdint.h> implementations need this. */ 67 # ifdef __cplusplus 68 # ifndef __STDC_CONSTANT_MACROS 69 # define __STDC_CONSTANT_MACROS 1 70 # endif 71 # ifndef __STDC_LIMIT_MACROS 72 # define __STDC_LIMIT_MACROS 1 73 # endif 74 # endif 75 76 /* Other systems may have an incomplete or buggy <stdint.h>. 77 Include it before <inttypes.h>, since any "#include <stdint.h>" 78 in <inttypes.h> would reinclude us, skipping our contents because 79 _GL_STDINT_H is defined. 80 The include_next requires a split double-inclusion guard. */ 81 # include_next <stdint.h> 82 #endif 83 84 #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H 85 #define _GL_STDINT_H 86 87 /* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, 88 LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ 89 #include <limits.h> 90 91 /* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides 92 wint_t. */ 93 #if 0 94 # undef WINT_MIN 95 # undef WINT_MAX 96 # define WINT_MIN 0x0U 97 # define WINT_MAX 0xffffffffU 98 #endif 99 100 #if ! 1 101 102 /* <sys/types.h> defines some of the stdint.h types as well, on glibc, 103 IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). 104 AIX 5.2 <sys/types.h> isn't needed and causes troubles. 105 Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but 106 relies on the system <stdint.h> definitions, so include 107 <sys/types.h> after <stdint.h>. */ 108 # if 1 && ! defined _AIX 109 # include <sys/types.h> 110 # endif 111 112 # if 1 113 /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines 114 int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. 115 <inttypes.h> also defines intptr_t and uintptr_t. */ 116 # include <inttypes.h> 117 # elif 0 118 /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and 119 the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ 120 # include <sys/inttypes.h> 121 # endif 122 123 # if 0 && ! defined __BIT_TYPES_DEFINED__ 124 /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines 125 int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is 126 included by <sys/types.h>. */ 127 # include <sys/bitypes.h> 128 # endif 129 130 # undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H 131 132 /* Minimum and maximum values for an integer type under the usual assumption. 133 Return an unspecified value if BITS == 0, adding a check to pacify 134 picky compilers. */ 135 136 /* These are separate macros, because if you try to merge these macros into 137 a single one, HP-UX cc rejects the resulting expression in constant 138 expressions. */ 139 # define _STDINT_UNSIGNED_MIN(bits, zero) \ 140 (zero) 141 # define _STDINT_SIGNED_MIN(bits, zero) \ 142 (~ _STDINT_MAX (1, bits, zero)) 143 144 # define _STDINT_MAX(signed, bits, zero) \ 145 (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) 146 147 #if !GNULIB_defined_stdint_types 148 149 /* 7.18.1.1. Exact-width integer types */ 150 151 /* Here we assume a standard architecture where the hardware integer 152 types have 8, 16, 32, optionally 64 bits. */ 153 154 # undef int8_t 155 # undef uint8_t 156 typedef signed char gl_int8_t; 157 typedef unsigned char gl_uint8_t; 158 # define int8_t gl_int8_t 159 # define uint8_t gl_uint8_t 160 161 # undef int16_t 162 # undef uint16_t 163 typedef short int gl_int16_t; 164 typedef unsigned short int gl_uint16_t; 165 # define int16_t gl_int16_t 166 # define uint16_t gl_uint16_t 167 168 # undef int32_t 169 # undef uint32_t 170 typedef int gl_int32_t; 171 typedef unsigned int gl_uint32_t; 172 # define int32_t gl_int32_t 173 # define uint32_t gl_uint32_t 174 175 /* If the system defines INT64_MAX, assume int64_t works. That way, 176 if the underlying platform defines int64_t to be a 64-bit long long 177 int, the code below won't mistakenly define it to be a 64-bit long 178 int, which would mess up C++ name mangling. We must use #ifdef 179 rather than #if, to avoid an error with HP-UX 10.20 cc. */ 180 181 # ifdef INT64_MAX 182 # define GL_INT64_T 183 # else 184 /* Do not undefine int64_t if gnulib is not being used with 64-bit 185 types, since otherwise it breaks platforms like Tandem/NSK. */ 186 # if LONG_MAX >> 31 >> 31 == 1 187 # undef int64_t 188 typedef long int gl_int64_t; 189 # define int64_t gl_int64_t 190 # define GL_INT64_T 191 # elif defined _MSC_VER 192 # undef int64_t 193 typedef __int64 gl_int64_t; 194 # define int64_t gl_int64_t 195 # define GL_INT64_T 196 # else 197 # undef int64_t 198 typedef long long int gl_int64_t; 199 # define int64_t gl_int64_t 200 # define GL_INT64_T 201 # endif 202 # endif 203 204 # ifdef UINT64_MAX 205 # define GL_UINT64_T 206 # else 207 # if ULONG_MAX >> 31 >> 31 >> 1 == 1 208 # undef uint64_t 209 typedef unsigned long int gl_uint64_t; 210 # define uint64_t gl_uint64_t 211 # define GL_UINT64_T 212 # elif defined _MSC_VER 213 # undef uint64_t 214 typedef unsigned __int64 gl_uint64_t; 215 # define uint64_t gl_uint64_t 216 # define GL_UINT64_T 217 # else 218 # undef uint64_t 219 typedef unsigned long long int gl_uint64_t; 220 # define uint64_t gl_uint64_t 221 # define GL_UINT64_T 222 # endif 223 # endif 224 225 /* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */ 226 # define _UINT8_T 227 # define _UINT32_T 228 # define _UINT64_T 229 230 231 /* 7.18.1.2. Minimum-width integer types */ 232 233 /* Here we assume a standard architecture where the hardware integer 234 types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types 235 are the same as the corresponding N_t types. */ 236 237 # undef int_least8_t 238 # undef uint_least8_t 239 # undef int_least16_t 240 # undef uint_least16_t 241 # undef int_least32_t 242 # undef uint_least32_t 243 # undef int_least64_t 244 # undef uint_least64_t 245 # define int_least8_t int8_t 246 # define uint_least8_t uint8_t 247 # define int_least16_t int16_t 248 # define uint_least16_t uint16_t 249 # define int_least32_t int32_t 250 # define uint_least32_t uint32_t 251 # ifdef GL_INT64_T 252 # define int_least64_t int64_t 253 # endif 254 # ifdef GL_UINT64_T 255 # define uint_least64_t uint64_t 256 # endif 257 258 /* 7.18.1.3. Fastest minimum-width integer types */ 259 260 /* Note: Other <stdint.h> substitutes may define these types differently. 261 It is not recommended to use these types in public header files. */ 262 263 /* Here we assume a standard architecture where the hardware integer 264 types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types 265 are taken from the same list of types. The following code normally 266 uses types consistent with glibc, as that lessens the chance of 267 incompatibility with older GNU hosts. */ 268 269 # undef int_fast8_t 270 # undef uint_fast8_t 271 # undef int_fast16_t 272 # undef uint_fast16_t 273 # undef int_fast32_t 274 # undef uint_fast32_t 275 # undef int_fast64_t 276 # undef uint_fast64_t 277 typedef signed char gl_int_fast8_t; 278 typedef unsigned char gl_uint_fast8_t; 279 280 # ifdef __sun 281 /* Define types compatible with SunOS 5.10, so that code compiled under 282 earlier SunOS versions works with code compiled under SunOS 5.10. */ 283 typedef int gl_int_fast32_t; 284 typedef unsigned int gl_uint_fast32_t; 285 # else 286 typedef long int gl_int_fast32_t; 287 typedef unsigned long int gl_uint_fast32_t; 288 # endif 289 typedef gl_int_fast32_t gl_int_fast16_t; 290 typedef gl_uint_fast32_t gl_uint_fast16_t; 291 292 # define int_fast8_t gl_int_fast8_t 293 # define uint_fast8_t gl_uint_fast8_t 294 # define int_fast16_t gl_int_fast16_t 295 # define uint_fast16_t gl_uint_fast16_t 296 # define int_fast32_t gl_int_fast32_t 297 # define uint_fast32_t gl_uint_fast32_t 298 # ifdef GL_INT64_T 299 # define int_fast64_t int64_t 300 # endif 301 # ifdef GL_UINT64_T 302 # define uint_fast64_t uint64_t 303 # endif 304 305 /* 7.18.1.4. Integer types capable of holding object pointers */ 306 307 /* kLIBC's <stdint.h> defines _INTPTR_T_DECLARED and needs its own 308 definitions of intptr_t and uintptr_t (which use int and unsigned) 309 to avoid clashes with declarations of system functions like sbrk. 310 Similarly, MinGW WSL-5.4.1 <stdint.h> needs its own intptr_t and 311 uintptr_t to avoid conflicting declarations of system functions like 312 _findclose in <io.h>. */ 313 # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ 314 || defined __MINGW32__) 315 # undef intptr_t 316 # undef uintptr_t 317 # ifdef _WIN64 318 typedef long long int gl_intptr_t; 319 typedef unsigned long long int gl_uintptr_t; 320 # else 321 typedef long int gl_intptr_t; 322 typedef unsigned long int gl_uintptr_t; 323 # endif 324 # define intptr_t gl_intptr_t 325 # define uintptr_t gl_uintptr_t 326 # endif 327 328 /* 7.18.1.5. Greatest-width integer types */ 329 330 /* Note: These types are compiler dependent. It may be unwise to use them in 331 public header files. */ 332 333 /* If the system defines INTMAX_MAX, assume that intmax_t works, and 334 similarly for UINTMAX_MAX and uintmax_t. This avoids problems with 335 assuming one type where another is used by the system. */ 336 337 # ifndef INTMAX_MAX 338 # undef INTMAX_C 339 # undef intmax_t 340 # if LONG_MAX >> 30 == 1 341 typedef long long int gl_intmax_t; 342 # define intmax_t gl_intmax_t 343 # elif defined GL_INT64_T 344 # define intmax_t int64_t 345 # else 346 typedef long int gl_intmax_t; 347 # define intmax_t gl_intmax_t 348 # endif 349 # endif 350 351 # ifndef UINTMAX_MAX 352 # undef UINTMAX_C 353 # undef uintmax_t 354 # if ULONG_MAX >> 31 == 1 355 typedef unsigned long long int gl_uintmax_t; 356 # define uintmax_t gl_uintmax_t 357 # elif defined GL_UINT64_T 358 # define uintmax_t uint64_t 359 # else 360 typedef unsigned long int gl_uintmax_t; 361 # define uintmax_t gl_uintmax_t 362 # endif 363 # endif 364 365 /* Verify that intmax_t and uintmax_t have the same size. Too much code 366 breaks if this is not the case. If this check fails, the reason is likely 367 to be found in the autoconf macros. */ 368 typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) 369 ? 1 : -1]; 370 371 # define GNULIB_defined_stdint_types 1 372 # endif /* !GNULIB_defined_stdint_types */ 373 374 /* 7.18.2. Limits of specified-width integer types */ 375 376 /* 7.18.2.1. Limits of exact-width integer types */ 377 378 /* Here we assume a standard architecture where the hardware integer 379 types have 8, 16, 32, optionally 64 bits. */ 380 381 # undef INT8_MIN 382 # undef INT8_MAX 383 # undef UINT8_MAX 384 # define INT8_MIN (~ INT8_MAX) 385 # define INT8_MAX 127 386 # define UINT8_MAX 255 387 388 # undef INT16_MIN 389 # undef INT16_MAX 390 # undef UINT16_MAX 391 # define INT16_MIN (~ INT16_MAX) 392 # define INT16_MAX 32767 393 # define UINT16_MAX 65535 394 395 # undef INT32_MIN 396 # undef INT32_MAX 397 # undef UINT32_MAX 398 # define INT32_MIN (~ INT32_MAX) 399 # define INT32_MAX 2147483647 400 # define UINT32_MAX 4294967295U 401 402 # if defined GL_INT64_T && ! defined INT64_MAX 403 /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 404 evaluates the latter incorrectly in preprocessor expressions. */ 405 # define INT64_MIN (- INTMAX_C (1) << 63) 406 # define INT64_MAX INTMAX_C (9223372036854775807) 407 # endif 408 409 # if defined GL_UINT64_T && ! defined UINT64_MAX 410 # define UINT64_MAX UINTMAX_C (18446744073709551615) 411 # endif 412 413 /* 7.18.2.2. Limits of minimum-width integer types */ 414 415 /* Here we assume a standard architecture where the hardware integer 416 types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types 417 are the same as the corresponding N_t types. */ 418 419 # undef INT_LEAST8_MIN 420 # undef INT_LEAST8_MAX 421 # undef UINT_LEAST8_MAX 422 # define INT_LEAST8_MIN INT8_MIN 423 # define INT_LEAST8_MAX INT8_MAX 424 # define UINT_LEAST8_MAX UINT8_MAX 425 426 # undef INT_LEAST16_MIN 427 # undef INT_LEAST16_MAX 428 # undef UINT_LEAST16_MAX 429 # define INT_LEAST16_MIN INT16_MIN 430 # define INT_LEAST16_MAX INT16_MAX 431 # define UINT_LEAST16_MAX UINT16_MAX 432 433 # undef INT_LEAST32_MIN 434 # undef INT_LEAST32_MAX 435 # undef UINT_LEAST32_MAX 436 # define INT_LEAST32_MIN INT32_MIN 437 # define INT_LEAST32_MAX INT32_MAX 438 # define UINT_LEAST32_MAX UINT32_MAX 439 440 # undef INT_LEAST64_MIN 441 # undef INT_LEAST64_MAX 442 # ifdef GL_INT64_T 443 # define INT_LEAST64_MIN INT64_MIN 444 # define INT_LEAST64_MAX INT64_MAX 445 # endif 446 447 # undef UINT_LEAST64_MAX 448 # ifdef GL_UINT64_T 449 # define UINT_LEAST64_MAX UINT64_MAX 450 # endif 451 452 /* 7.18.2.3. Limits of fastest minimum-width integer types */ 453 454 /* Here we assume a standard architecture where the hardware integer 455 types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types 456 are taken from the same list of types. */ 457 458 # undef INT_FAST8_MIN 459 # undef INT_FAST8_MAX 460 # undef UINT_FAST8_MAX 461 # define INT_FAST8_MIN SCHAR_MIN 462 # define INT_FAST8_MAX SCHAR_MAX 463 # define UINT_FAST8_MAX UCHAR_MAX 464 465 # undef INT_FAST16_MIN 466 # undef INT_FAST16_MAX 467 # undef UINT_FAST16_MAX 468 # define INT_FAST16_MIN INT_FAST32_MIN 469 # define INT_FAST16_MAX INT_FAST32_MAX 470 # define UINT_FAST16_MAX UINT_FAST32_MAX 471 472 # undef INT_FAST32_MIN 473 # undef INT_FAST32_MAX 474 # undef UINT_FAST32_MAX 475 # ifdef __sun 476 # define INT_FAST32_MIN INT_MIN 477 # define INT_FAST32_MAX INT_MAX 478 # define UINT_FAST32_MAX UINT_MAX 479 # else 480 # define INT_FAST32_MIN LONG_MIN 481 # define INT_FAST32_MAX LONG_MAX 482 # define UINT_FAST32_MAX ULONG_MAX 483 # endif 484 485 # undef INT_FAST64_MIN 486 # undef INT_FAST64_MAX 487 # ifdef GL_INT64_T 488 # define INT_FAST64_MIN INT64_MIN 489 # define INT_FAST64_MAX INT64_MAX 490 # endif 491 492 # undef UINT_FAST64_MAX 493 # ifdef GL_UINT64_T 494 # define UINT_FAST64_MAX UINT64_MAX 495 # endif 496 497 /* 7.18.2.4. Limits of integer types capable of holding object pointers */ 498 499 # undef INTPTR_MIN 500 # undef INTPTR_MAX 501 # undef UINTPTR_MAX 502 # ifdef _WIN64 503 # define INTPTR_MIN LLONG_MIN 504 # define INTPTR_MAX LLONG_MAX 505 # define UINTPTR_MAX ULLONG_MAX 506 # else 507 # define INTPTR_MIN LONG_MIN 508 # define INTPTR_MAX LONG_MAX 509 # define UINTPTR_MAX ULONG_MAX 510 # endif 511 512 /* 7.18.2.5. Limits of greatest-width integer types */ 513 514 # ifndef INTMAX_MAX 515 # undef INTMAX_MIN 516 # ifdef INT64_MAX 517 # define INTMAX_MIN INT64_MIN 518 # define INTMAX_MAX INT64_MAX 519 # else 520 # define INTMAX_MIN INT32_MIN 521 # define INTMAX_MAX INT32_MAX 522 # endif 523 # endif 524 525 # ifndef UINTMAX_MAX 526 # ifdef UINT64_MAX 527 # define UINTMAX_MAX UINT64_MAX 528 # else 529 # define UINTMAX_MAX UINT32_MAX 530 # endif 531 # endif 532 533 /* 7.18.3. Limits of other integer types */ 534 535 /* ptrdiff_t limits */ 536 # undef PTRDIFF_MIN 537 # undef PTRDIFF_MAX 538 # if 0 539 # ifdef _LP64 540 # define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) 541 # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) 542 # else 543 # define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) 544 # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) 545 # endif 546 # else 547 # define PTRDIFF_MIN \ 548 _STDINT_SIGNED_MIN (, 0) 549 # define PTRDIFF_MAX \ 550 _STDINT_MAX (1, , 0) 551 # endif 552 553 /* sig_atomic_t limits */ 554 # undef SIG_ATOMIC_MIN 555 # undef SIG_ATOMIC_MAX 556 # if 557 # define SIG_ATOMIC_MIN \ 558 _STDINT_SIGNED_MIN (, 0) 559 # else 560 # define SIG_ATOMIC_MIN \ 561 _STDINT_UNSIGNED_MIN (, 0) 562 # endif 563 # define SIG_ATOMIC_MAX \ 564 _STDINT_MAX (, , \ 565 0) 566 567 568 /* size_t limit */ 569 # undef SIZE_MAX 570 # if 0 571 # ifdef _LP64 572 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) 573 # else 574 # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) 575 # endif 576 # else 577 # define SIZE_MAX _STDINT_MAX (0, , 0) 578 # endif 579 580 /* wchar_t limits */ 581 /* Get WCHAR_MIN, WCHAR_MAX. 582 This include is not on the top, above, because on OSF/1 4.0 we have a 583 sequence of nested includes 584 <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes 585 <stdint.h> and assumes its types are already defined. */ 586 # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) 587 # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H 588 # include <wchar.h> 589 # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H 590 # endif 591 # undef WCHAR_MIN 592 # undef WCHAR_MAX 593 # if 594 # define WCHAR_MIN \ 595 _STDINT_SIGNED_MIN (, 0) 596 # else 597 # define WCHAR_MIN \ 598 _STDINT_UNSIGNED_MIN (, 0) 599 # endif 600 # define WCHAR_MAX \ 601 _STDINT_MAX (, , 0) 602 603 /* wint_t limits */ 604 /* If gnulib's <wchar.h> or <wctype.h> overrides wint_t, is not 605 accurate, therefore use the definitions from above. */ 606 # if !0 607 # undef WINT_MIN 608 # undef WINT_MAX 609 # if 610 # define WINT_MIN \ 611 _STDINT_SIGNED_MIN (, 0) 612 # else 613 # define WINT_MIN \ 614 _STDINT_UNSIGNED_MIN (, 0) 615 # endif 616 # define WINT_MAX \ 617 _STDINT_MAX (, , 0) 618 # endif 619 620 /* 7.18.4. Macros for integer constants */ 621 622 /* 7.18.4.1. Macros for minimum-width integer constants */ 623 /* According to ISO C 99 Technical Corrigendum 1 */ 624 625 /* Here we assume a standard architecture where the hardware integer 626 types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ 627 628 # undef INT8_C 629 # undef UINT8_C 630 # define INT8_C(x) x 631 # define UINT8_C(x) x 632 633 # undef INT16_C 634 # undef UINT16_C 635 # define INT16_C(x) x 636 # define UINT16_C(x) x 637 638 # undef INT32_C 639 # undef UINT32_C 640 # define INT32_C(x) x 641 # define UINT32_C(x) x ## U 642 643 # undef INT64_C 644 # undef UINT64_C 645 # if LONG_MAX >> 31 >> 31 == 1 646 # define INT64_C(x) x##L 647 # elif defined _MSC_VER 648 # define INT64_C(x) x##i64 649 # else 650 # define INT64_C(x) x##LL 651 # endif 652 # if ULONG_MAX >> 31 >> 31 >> 1 == 1 653 # define UINT64_C(x) x##UL 654 # elif defined _MSC_VER 655 # define UINT64_C(x) x##ui64 656 # else 657 # define UINT64_C(x) x##ULL 658 # endif 659 660 /* 7.18.4.2. Macros for greatest-width integer constants */ 661 662 # ifndef INTMAX_C 663 # if LONG_MAX >> 30 == 1 664 # define INTMAX_C(x) x##LL 665 # elif defined GL_INT64_T 666 # define INTMAX_C(x) INT64_C(x) 667 # else 668 # define INTMAX_C(x) x##L 669 # endif 670 # endif 671 672 # ifndef UINTMAX_C 673 # if ULONG_MAX >> 31 == 1 674 # define UINTMAX_C(x) x##ULL 675 # elif defined GL_UINT64_T 676 # define UINTMAX_C(x) UINT64_C(x) 677 # else 678 # define UINTMAX_C(x) x##UL 679 # endif 680 # endif 681 682 #endif /* !1 */ 683 684 /* Macros specified by ISO/IEC TS 18661-1:2014. */ 685 686 #if (!defined UINTMAX_WIDTH \ 687 && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) 688 # ifdef INT8_MAX 689 # define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) 690 # endif 691 # ifdef UINT8_MAX 692 # define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) 693 # endif 694 # ifdef INT16_MAX 695 # define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) 696 # endif 697 # ifdef UINT16_MAX 698 # define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) 699 # endif 700 # ifdef INT32_MAX 701 # define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) 702 # endif 703 # ifdef UINT32_MAX 704 # define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) 705 # endif 706 # ifdef INT64_MAX 707 # define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) 708 # endif 709 # ifdef UINT64_MAX 710 # define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) 711 # endif 712 # define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) 713 # define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) 714 # define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) 715 # define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) 716 # define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) 717 # define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) 718 # define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) 719 # define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) 720 # define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) 721 # define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) 722 # define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) 723 # define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) 724 # define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) 725 # define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) 726 # define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) 727 # define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) 728 # define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) 729 # define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) 730 # define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) 731 # define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) 732 # define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) 733 # define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) 734 # define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) 735 # ifdef WINT_MAX 736 # define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) 737 # endif 738 # ifdef SIG_ATOMIC_MAX 739 # define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) 740 # endif 741 #endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ 742 743 #endif /* _GL_STDINT_H */ 744 #endif /* !(defined __ANDROID__ && ...) */ 745 #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ 746