2N/A/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
2N/A Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
2N/A This file is part of gnulib.
2N/A
2N/A This program is free software; you can redistribute it and/or modify
2N/A it under the terms of the GNU General Public License as published by
2N/A the Free Software Foundation; either version 3, or (at your option)
2N/A any later version.
2N/A
2N/A This program is distributed in the hope that it will be useful,
2N/A but WITHOUT ANY WARRANTY; without even the implied warranty of
2N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2N/A GNU General Public License for more details.
2N/A
2N/A You should have received a copy of the GNU General Public License
2N/A along with this program; if not, write to the Free Software Foundation,
2N/A Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
2N/A
2N/A/*
2N/A * ISO C 99 <stdint.h> for platforms that lack it.
2N/A * <http://www.opengroup.org/susv3xbd/stdint.h.html>
2N/A */
2N/A
2N/A#ifndef _GL_STDINT_H
2N/A
2N/A#if __GNUC__ >= 3
2N/A@PRAGMA_SYSTEM_HEADER@
2N/A#endif
2N/A
2N/A/* When including a system file that in turn includes <inttypes.h>,
2N/A use the system <inttypes.h>, not our substitute. This avoids
2N/A problems with (for example) VMS, whose <sys/bitypes.h> includes
2N/A <inttypes.h>. */
2N/A#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
2N/A
2N/A/* Get those types that are already defined in other system include
2N/A files, so that we can "#define int8_t signed char" below without
2N/A worrying about a later system include file containing a "typedef
2N/A signed char int8_t;" that will get messed up by our macro. Our
2N/A macros should all be consistent with the system versions, except
2N/A for the "fast" types and macros, which we recommend against using
2N/A in public interfaces due to compiler differences. */
2N/A
2N/A#if @HAVE_STDINT_H@
2N/A# if defined __sgi && ! defined __c99
2N/A /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
2N/A with "This header file is to be used only for c99 mode compilations"
2N/A diagnostics. */
2N/A# define __STDINT_H__
2N/A# endif
2N/A /* Other systems may have an incomplete or buggy <stdint.h>.
2N/A Include it before <inttypes.h>, since any "#include <stdint.h>"
2N/A in <inttypes.h> would reinclude us, skipping our contents because
2N/A _GL_STDINT_H is defined.
2N/A The include_next requires a split double-inclusion guard. */
2N/A# @INCLUDE_NEXT@ @NEXT_STDINT_H@
2N/A#endif
2N/A
2N/A#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
2N/A#define _GL_STDINT_H
2N/A
2N/A/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
2N/A IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
2N/A AIX 5.2 <sys/types.h> isn't needed and causes troubles.
2N/A MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
2N/A relies on the system <stdint.h> definitions, so include
2N/A <sys/types.h> after @NEXT_STDINT_H@. */
2N/A#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
2N/A# include <sys/types.h>
2N/A#endif
2N/A
2N/A/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
2N/A#include <limits.h>
2N/A
2N/A#if @HAVE_INTTYPES_H@
2N/A /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
2N/A int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
2N/A <inttypes.h> also defines intptr_t and uintptr_t. */
2N/A# include <inttypes.h>
2N/A#elif @HAVE_SYS_INTTYPES_H@
2N/A /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
2N/A the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
2N/A# include <sys/inttypes.h>
2N/A#endif
2N/A
2N/A#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
2N/A /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
2N/A int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
2N/A included by <sys/types.h>. */
2N/A# include <sys/bitypes.h>
2N/A#endif
2N/A
2N/A#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
2N/A
2N/A/* Minimum and maximum values for a integer type under the usual assumption.
2N/A Return an unspecified value if BITS == 0, adding a check to pacify
2N/A picky compilers. */
2N/A
2N/A#define _STDINT_MIN(signed, bits, zero) \
2N/A ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
2N/A
2N/A#define _STDINT_MAX(signed, bits, zero) \
2N/A ((signed) \
2N/A ? ~ _STDINT_MIN (signed, bits, zero) \
2N/A : /* The expression for the unsigned case. The subtraction of (signed) \
2N/A is a nop in the unsigned case and avoids "signed integer overflow" \
2N/A warnings in the signed case. */ \
2N/A ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
2N/A
2N/A/* 7.18.1.1. Exact-width integer types */
2N/A
2N/A/* Here we assume a standard architecture where the hardware integer
2N/A types have 8, 16, 32, optionally 64 bits. */
2N/A
2N/A#undef int8_t
2N/A#undef uint8_t
2N/Atypedef signed char gl_int8_t;
2N/Atypedef unsigned char gl_uint8_t;
2N/A#define int8_t gl_int8_t
2N/A#define uint8_t gl_uint8_t
2N/A
2N/A#undef int16_t
2N/A#undef uint16_t
2N/Atypedef short int gl_int16_t;
2N/Atypedef unsigned short int gl_uint16_t;
2N/A#define int16_t gl_int16_t
2N/A#define uint16_t gl_uint16_t
2N/A
2N/A#undef int32_t
2N/A#undef uint32_t
2N/Atypedef int gl_int32_t;
2N/Atypedef unsigned int gl_uint32_t;
2N/A#define int32_t gl_int32_t
2N/A#define uint32_t gl_uint32_t
2N/A
2N/A/* Do not undefine int64_t if gnulib is not being used with 64-bit
2N/A types, since otherwise it breaks platforms like Tandem/NSK. */
2N/A#if LONG_MAX >> 31 >> 31 == 1
2N/A# undef int64_t
2N/Atypedef long int gl_int64_t;
2N/A# define int64_t gl_int64_t
2N/A# define GL_INT64_T
2N/A#elif defined _MSC_VER
2N/A# undef int64_t
2N/Atypedef __int64 gl_int64_t;
2N/A# define int64_t gl_int64_t
2N/A# define GL_INT64_T
2N/A#elif @HAVE_LONG_LONG_INT@
2N/A# undef int64_t
2N/Atypedef long long int gl_int64_t;
2N/A# define int64_t gl_int64_t
2N/A# define GL_INT64_T
2N/A#endif
2N/A
2N/A#if ULONG_MAX >> 31 >> 31 >> 1 == 1
2N/A# undef uint64_t
2N/Atypedef unsigned long int gl_uint64_t;
2N/A# define uint64_t gl_uint64_t
2N/A# define GL_UINT64_T
2N/A#elif defined _MSC_VER
2N/A# undef uint64_t
2N/Atypedef unsigned __int64 gl_uint64_t;
2N/A# define uint64_t gl_uint64_t
2N/A# define GL_UINT64_T
2N/A#elif @HAVE_UNSIGNED_LONG_LONG_INT@
2N/A# undef uint64_t
2N/Atypedef unsigned long long int gl_uint64_t;
2N/A# define uint64_t gl_uint64_t
2N/A# define GL_UINT64_T
2N/A#endif
2N/A
2N/A/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
2N/A#define _UINT8_T
2N/A#define _UINT32_T
2N/A#define _UINT64_T
2N/A
2N/A
2N/A/* 7.18.1.2. Minimum-width integer types */
2N/A
2N/A/* Here we assume a standard architecture where the hardware integer
2N/A types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
2N/A are the same as the corresponding N_t types. */
2N/A
2N/A#undef int_least8_t
2N/A#undef uint_least8_t
2N/A#undef int_least16_t
2N/A#undef uint_least16_t
2N/A#undef int_least32_t
2N/A#undef uint_least32_t
2N/A#undef int_least64_t
2N/A#undef uint_least64_t
2N/A#define int_least8_t int8_t
2N/A#define uint_least8_t uint8_t
2N/A#define int_least16_t int16_t
2N/A#define uint_least16_t uint16_t
2N/A#define int_least32_t int32_t
2N/A#define uint_least32_t uint32_t
2N/A#ifdef GL_INT64_T
2N/A# define int_least64_t int64_t
2N/A#endif
2N/A#ifdef GL_UINT64_T
2N/A# define uint_least64_t uint64_t
2N/A#endif
2N/A
2N/A/* 7.18.1.3. Fastest minimum-width integer types */
2N/A
2N/A/* Note: Other <stdint.h> substitutes may define these types differently.
2N/A It is not recommended to use these types in public header files. */
2N/A
2N/A/* Here we assume a standard architecture where the hardware integer
2N/A types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
2N/A are taken from the same list of types. Assume that 'long int'
2N/A is fast enough for all narrower integers. */
2N/A
2N/A#undef int_fast8_t
2N/A#undef uint_fast8_t
2N/A#undef int_fast16_t
2N/A#undef uint_fast16_t
2N/A#undef int_fast32_t
2N/A#undef uint_fast32_t
2N/A#undef int_fast64_t
2N/A#undef uint_fast64_t
2N/Atypedef long int gl_int_fast8_t;
2N/Atypedef unsigned long int gl_uint_fast8_t;
2N/Atypedef long int gl_int_fast16_t;
2N/Atypedef unsigned long int gl_uint_fast16_t;
2N/Atypedef long int gl_int_fast32_t;
2N/Atypedef unsigned long int gl_uint_fast32_t;
2N/A#define int_fast8_t gl_int_fast8_t
2N/A#define uint_fast8_t gl_uint_fast8_t
2N/A#define int_fast16_t gl_int_fast16_t
2N/A#define uint_fast16_t gl_uint_fast16_t
2N/A#define int_fast32_t gl_int_fast32_t
2N/A#define uint_fast32_t gl_uint_fast32_t
2N/A#ifdef GL_INT64_T
2N/A# define int_fast64_t int64_t
2N/A#endif
2N/A#ifdef GL_UINT64_T
2N/A# define uint_fast64_t uint64_t
2N/A#endif
2N/A
2N/A/* 7.18.1.4. Integer types capable of holding object pointers */
2N/A
2N/A#undef intptr_t
2N/A#undef uintptr_t
2N/Atypedef long int gl_intptr_t;
2N/Atypedef unsigned long int gl_uintptr_t;
2N/A#define intptr_t gl_intptr_t
2N/A#define uintptr_t gl_uintptr_t
2N/A
2N/A/* 7.18.1.5. Greatest-width integer types */
2N/A
2N/A/* Note: These types are compiler dependent. It may be unwise to use them in
2N/A public header files. */
2N/A
2N/A#undef intmax_t
2N/A#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
2N/Atypedef long long int gl_intmax_t;
2N/A# define intmax_t gl_intmax_t
2N/A#elif defined GL_INT64_T
2N/A# define intmax_t int64_t
2N/A#else
2N/Atypedef long int gl_intmax_t;
2N/A# define intmax_t gl_intmax_t
2N/A#endif
2N/A
2N/A#undef uintmax_t
2N/A#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
2N/Atypedef unsigned long long int gl_uintmax_t;
2N/A# define uintmax_t gl_uintmax_t
2N/A#elif defined GL_UINT64_T
2N/A# define uintmax_t uint64_t
2N/A#else
2N/Atypedef unsigned long int gl_uintmax_t;
2N/A# define uintmax_t gl_uintmax_t
2N/A#endif
2N/A
2N/A/* Verify that intmax_t and uintmax_t have the same size. Too much code
2N/A breaks if this is not the case. If this check fails, the reason is likely
2N/A to be found in the autoconf macros. */
2N/Atypedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
2N/A
2N/A/* 7.18.2. Limits of specified-width integer types */
2N/A
2N/A#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
2N/A
2N/A/* 7.18.2.1. Limits of exact-width integer types */
2N/A
2N/A/* Here we assume a standard architecture where the hardware integer
2N/A types have 8, 16, 32, optionally 64 bits. */
2N/A
2N/A#undef INT8_MIN
2N/A#undef INT8_MAX
2N/A#undef UINT8_MAX
2N/A#define INT8_MIN (~ INT8_MAX)
2N/A#define INT8_MAX 127
2N/A#define UINT8_MAX 255
2N/A
2N/A#undef INT16_MIN
2N/A#undef INT16_MAX
2N/A#undef UINT16_MAX
2N/A#define INT16_MIN (~ INT16_MAX)
2N/A#define INT16_MAX 32767
2N/A#define UINT16_MAX 65535
2N/A
2N/A#undef INT32_MIN
2N/A#undef INT32_MAX
2N/A#undef UINT32_MAX
2N/A#define INT32_MIN (~ INT32_MAX)
2N/A#define INT32_MAX 2147483647
2N/A#define UINT32_MAX 4294967295U
2N/A
2N/A#undef INT64_MIN
2N/A#undef INT64_MAX
2N/A#ifdef GL_INT64_T
2N/A/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
2N/A evaluates the latter incorrectly in preprocessor expressions. */
2N/A# define INT64_MIN (- INTMAX_C (1) << 63)
2N/A# define INT64_MAX INTMAX_C (9223372036854775807)
2N/A#endif
2N/A
2N/A#undef UINT64_MAX
2N/A#ifdef GL_UINT64_T
2N/A# define UINT64_MAX UINTMAX_C (18446744073709551615)
2N/A#endif
2N/A
2N/A/* 7.18.2.2. Limits of minimum-width integer types */
2N/A
2N/A/* Here we assume a standard architecture where the hardware integer
2N/A types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
2N/A are the same as the corresponding N_t types. */
2N/A
2N/A#undef INT_LEAST8_MIN
2N/A#undef INT_LEAST8_MAX
2N/A#undef UINT_LEAST8_MAX
2N/A#define INT_LEAST8_MIN INT8_MIN
2N/A#define INT_LEAST8_MAX INT8_MAX
2N/A#define UINT_LEAST8_MAX UINT8_MAX
2N/A
2N/A#undef INT_LEAST16_MIN
2N/A#undef INT_LEAST16_MAX
2N/A#undef UINT_LEAST16_MAX
2N/A#define INT_LEAST16_MIN INT16_MIN
2N/A#define INT_LEAST16_MAX INT16_MAX
2N/A#define UINT_LEAST16_MAX UINT16_MAX
2N/A
2N/A#undef INT_LEAST32_MIN
2N/A#undef INT_LEAST32_MAX
2N/A#undef UINT_LEAST32_MAX
2N/A#define INT_LEAST32_MIN INT32_MIN
2N/A#define INT_LEAST32_MAX INT32_MAX
2N/A#define UINT_LEAST32_MAX UINT32_MAX
2N/A
2N/A#undef INT_LEAST64_MIN
2N/A#undef INT_LEAST64_MAX
2N/A#ifdef GL_INT64_T
2N/A# define INT_LEAST64_MIN INT64_MIN
2N/A# define INT_LEAST64_MAX INT64_MAX
2N/A#endif
2N/A
2N/A#undef UINT_LEAST64_MAX
2N/A#ifdef GL_UINT64_T
2N/A# define UINT_LEAST64_MAX UINT64_MAX
2N/A#endif
2N/A
2N/A/* 7.18.2.3. Limits of fastest minimum-width integer types */
2N/A
2N/A/* Here we assume a standard architecture where the hardware integer
2N/A types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
2N/A are taken from the same list of types. */
2N/A
2N/A#undef INT_FAST8_MIN
2N/A#undef INT_FAST8_MAX
2N/A#undef UINT_FAST8_MAX
2N/A#define INT_FAST8_MIN LONG_MIN
2N/A#define INT_FAST8_MAX LONG_MAX
2N/A#define UINT_FAST8_MAX ULONG_MAX
2N/A
2N/A#undef INT_FAST16_MIN
2N/A#undef INT_FAST16_MAX
2N/A#undef UINT_FAST16_MAX
2N/A#define INT_FAST16_MIN LONG_MIN
2N/A#define INT_FAST16_MAX LONG_MAX
2N/A#define UINT_FAST16_MAX ULONG_MAX
2N/A
2N/A#undef INT_FAST32_MIN
2N/A#undef INT_FAST32_MAX
2N/A#undef UINT_FAST32_MAX
2N/A#define INT_FAST32_MIN LONG_MIN
2N/A#define INT_FAST32_MAX LONG_MAX
2N/A#define UINT_FAST32_MAX ULONG_MAX
2N/A
2N/A#undef INT_FAST64_MIN
2N/A#undef INT_FAST64_MAX
2N/A#ifdef GL_INT64_T
2N/A# define INT_FAST64_MIN INT64_MIN
2N/A# define INT_FAST64_MAX INT64_MAX
2N/A#endif
2N/A
2N/A#undef UINT_FAST64_MAX
2N/A#ifdef GL_UINT64_T
2N/A# define UINT_FAST64_MAX UINT64_MAX
2N/A#endif
2N/A
2N/A/* 7.18.2.4. Limits of integer types capable of holding object pointers */
2N/A
2N/A#undef INTPTR_MIN
2N/A#undef INTPTR_MAX
2N/A#undef UINTPTR_MAX
2N/A#define INTPTR_MIN LONG_MIN
2N/A#define INTPTR_MAX LONG_MAX
2N/A#define UINTPTR_MAX ULONG_MAX
2N/A
2N/A/* 7.18.2.5. Limits of greatest-width integer types */
2N/A
2N/A#undef INTMAX_MIN
2N/A#undef INTMAX_MAX
2N/A#ifdef INT64_MAX
2N/A# define INTMAX_MIN INT64_MIN
2N/A# define INTMAX_MAX INT64_MAX
2N/A#else
2N/A# define INTMAX_MIN INT32_MIN
2N/A# define INTMAX_MAX INT32_MAX
2N/A#endif
2N/A
2N/A#undef UINTMAX_MAX
2N/A#ifdef UINT64_MAX
2N/A# define UINTMAX_MAX UINT64_MAX
2N/A#else
2N/A# define UINTMAX_MAX UINT32_MAX
2N/A#endif
2N/A
2N/A/* 7.18.3. Limits of other integer types */
2N/A
2N/A/* ptrdiff_t limits */
2N/A#undef PTRDIFF_MIN
2N/A#undef PTRDIFF_MAX
2N/A#if @APPLE_UNIVERSAL_BUILD@
2N/A# ifdef _LP64
2N/A# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
2N/A# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
2N/A# else
2N/A# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
2N/A# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
2N/A# endif
2N/A#else
2N/A# define PTRDIFF_MIN \
2N/A _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
2N/A# define PTRDIFF_MAX \
2N/A _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
2N/A#endif
2N/A
2N/A/* sig_atomic_t limits */
2N/A#undef SIG_ATOMIC_MIN
2N/A#undef SIG_ATOMIC_MAX
2N/A#define SIG_ATOMIC_MIN \
2N/A _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
2N/A 0@SIG_ATOMIC_T_SUFFIX@)
2N/A#define SIG_ATOMIC_MAX \
2N/A _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
2N/A 0@SIG_ATOMIC_T_SUFFIX@)
2N/A
2N/A
2N/A/* size_t limit */
2N/A#undef SIZE_MAX
2N/A#if @APPLE_UNIVERSAL_BUILD@
2N/A# ifdef _LP64
2N/A# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
2N/A# else
2N/A# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
2N/A# endif
2N/A#else
2N/A# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
2N/A#endif
2N/A
2N/A/* wchar_t limits */
2N/A/* Get WCHAR_MIN, WCHAR_MAX.
2N/A This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
2N/A includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
2N/A <stdint.h> and assumes its types are already defined. */
2N/A#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
2N/A# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
2N/A# include <wchar.h>
2N/A# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
2N/A#endif
2N/A#undef WCHAR_MIN
2N/A#undef WCHAR_MAX
2N/A#define WCHAR_MIN \
2N/A _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
2N/A#define WCHAR_MAX \
2N/A _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
2N/A
2N/A/* wint_t limits */
2N/A#undef WINT_MIN
2N/A#undef WINT_MAX
2N/A#define WINT_MIN \
2N/A _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
2N/A#define WINT_MAX \
2N/A _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
2N/A
2N/A#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
2N/A
2N/A/* 7.18.4. Macros for integer constants */
2N/A
2N/A#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
2N/A
2N/A/* 7.18.4.1. Macros for minimum-width integer constants */
2N/A/* According to ISO C 99 Technical Corrigendum 1 */
2N/A
2N/A/* Here we assume a standard architecture where the hardware integer
2N/A types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
2N/A
2N/A#undef INT8_C
2N/A#undef UINT8_C
2N/A#define INT8_C(x) x
2N/A#define UINT8_C(x) x
2N/A
2N/A#undef INT16_C
2N/A#undef UINT16_C
2N/A#define INT16_C(x) x
2N/A#define UINT16_C(x) x
2N/A
2N/A#undef INT32_C
2N/A#undef UINT32_C
2N/A#define INT32_C(x) x
2N/A#define UINT32_C(x) x ## U
2N/A
2N/A#undef INT64_C
2N/A#undef UINT64_C
2N/A#if LONG_MAX >> 31 >> 31 == 1
2N/A# define INT64_C(x) x##L
2N/A#elif defined _MSC_VER
2N/A# define INT64_C(x) x##i64
2N/A#elif @HAVE_LONG_LONG_INT@
2N/A# define INT64_C(x) x##LL
2N/A#endif
2N/A#if ULONG_MAX >> 31 >> 31 >> 1 == 1
2N/A# define UINT64_C(x) x##UL
2N/A#elif defined _MSC_VER
2N/A# define UINT64_C(x) x##ui64
2N/A#elif @HAVE_UNSIGNED_LONG_LONG_INT@
2N/A# define UINT64_C(x) x##ULL
2N/A#endif
2N/A
2N/A/* 7.18.4.2. Macros for greatest-width integer constants */
2N/A
2N/A#undef INTMAX_C
2N/A#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
2N/A# define INTMAX_C(x) x##LL
2N/A#elif defined GL_INT64_T
2N/A# define INTMAX_C(x) INT64_C(x)
2N/A#else
2N/A# define INTMAX_C(x) x##L
2N/A#endif
2N/A
2N/A#undef UINTMAX_C
2N/A#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
2N/A# define UINTMAX_C(x) x##ULL
2N/A#elif defined GL_UINT64_T
2N/A# define UINTMAX_C(x) UINT64_C(x)
2N/A#else
2N/A# define UINTMAX_C(x) x##UL
2N/A#endif
2N/A
2N/A#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
2N/A
2N/A#endif /* _GL_STDINT_H */
2N/A#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */