#ifndef _GL_STDINT_H
#define _GL_STDINT_H
#if @HAVE_STDINT_H@
# if defined __sgi && ! defined __c99
# define __STDINT_H__
# endif
# include @ABSOLUTE_STDINT_H@
#endif
#if @HAVE_SYS_TYPES_H@
# include <sys/types.h>
#endif
#include <limits.h>
#if @HAVE_INTTYPES_H@
# include <inttypes.h>
#elif @HAVE_SYS_INTTYPES_H@
# include <sys/inttypes.h>
#endif
#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
# include <sys/bitypes.h>
#endif
#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
# include <stdio.h>
# include <time.h>
# include <wchar.h>
# endif
#endif
#define _STDINT_MIN(signed, bits, zero) \
((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
#define _STDINT_MAX(signed, bits, zero) \
((signed) \
? ~ _STDINT_MIN (signed, bits, zero) \
: ((((zero) + 1) << ((bits) ? (bits) - 1 : 0)) - 1) * 2 + 1)
#undef int8_t
#undef uint8_t
#define int8_t signed char
#define uint8_t unsigned char
#undef int16_t
#undef uint16_t
#define int16_t short int
#define uint16_t unsigned short int
#undef int32_t
#undef uint32_t
#define int32_t int
#define uint32_t unsigned int
#undef int64_t
#undef uint64_t
#if LONG_MAX >> 31 >> 31 == 1
# define int64_t long int
# define uint64_t unsigned long int
#elif defined _MSC_VER
# define int64_t __int64
# define uint64_t unsigned __int64
#elif @HAVE_LONG_LONG_INT@
# define int64_t long long int
# define uint64_t unsigned long long int
#endif
#define _UINT8_T
#define _UINT32_T
#define _UINT64_T
#undef int_least8_t
#undef uint_least8_t
#undef int_least16_t
#undef uint_least16_t
#undef int_least32_t
#undef uint_least32_t
#undef int_least64_t
#undef uint_least64_t
#define int_least8_t int8_t
#define uint_least8_t uint8_t
#define int_least16_t int16_t
#define uint_least16_t uint16_t
#define int_least32_t int32_t
#define uint_least32_t uint32_t
#ifdef int64_t
# define int_least64_t int64_t
# define uint_least64_t uint64_t
#endif
#undef int_fast8_t
#undef uint_fast8_t
#undef int_fast16_t
#undef uint_fast16_t
#undef int_fast32_t
#undef uint_fast32_t
#undef int_fast64_t
#undef uint_fast64_t
#define int_fast8_t long int
#define uint_fast8_t unsigned int_fast8_t
#define int_fast16_t long int
#define uint_fast16_t unsigned int_fast16_t
#define int_fast32_t long int
#define uint_fast32_t unsigned int_fast32_t
#ifdef int64_t
# define int_fast64_t int64_t
# define uint_fast64_t uint64_t
#endif
#undef intptr_t
#undef uintptr_t
#define intptr_t long int
#define uintptr_t unsigned long int
#undef intmax_t
#undef uintmax_t
#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
# define intmax_t long long int
# define uintmax_t unsigned long long int
#elif defined int64_t
# define intmax_t int64_t
# define uintmax_t uint64_t
#else
# define intmax_t long int
# define uintmax_t unsigned long int
#endif
#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
#undef INT8_MIN
#undef INT8_MAX
#undef UINT8_MAX
#define INT8_MIN (~ INT8_MAX)
#define INT8_MAX 127
#define UINT8_MAX 255
#undef INT16_MIN
#undef INT16_MAX
#undef UINT16_MAX
#define INT16_MIN (~ INT16_MAX)
#define INT16_MAX 32767
#define UINT16_MAX 65535
#undef INT32_MIN
#undef INT32_MAX
#undef UINT32_MAX
#define INT32_MIN (~ INT32_MAX)
#define INT32_MAX 2147483647
#define UINT32_MAX 4294967295U
#undef INT64_MIN
#undef INT64_MAX
#undef UINT64_MAX
#ifdef int64_t
# define INT64_MIN (~ INT64_MAX)
# define INT64_MAX INTMAX_C (9223372036854775807)
# define UINT64_MAX UINTMAX_C (18446744073709551615)
#endif
#undef INT_LEAST8_MIN
#undef INT_LEAST8_MAX
#undef UINT_LEAST8_MAX
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#undef INT_LEAST16_MIN
#undef INT_LEAST16_MAX
#undef UINT_LEAST16_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#undef INT_LEAST32_MIN
#undef INT_LEAST32_MAX
#undef UINT_LEAST32_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#undef INT_LEAST64_MIN
#undef INT_LEAST64_MAX
#undef UINT_LEAST64_MAX
#ifdef int64_t
# define INT_LEAST64_MIN INT64_MIN
# define INT_LEAST64_MAX INT64_MAX
# define UINT_LEAST64_MAX UINT64_MAX
#endif
#undef INT_FAST8_MIN
#undef INT_FAST8_MAX
#undef UINT_FAST8_MAX
#define INT_FAST8_MIN LONG_MIN
#define INT_FAST8_MAX LONG_MAX
#define UINT_FAST8_MAX ULONG_MAX
#undef INT_FAST16_MIN
#undef INT_FAST16_MAX
#undef UINT_FAST16_MAX
#define INT_FAST16_MIN LONG_MIN
#define INT_FAST16_MAX LONG_MAX
#define UINT_FAST16_MAX ULONG_MAX
#undef INT_FAST32_MIN
#undef INT_FAST32_MAX
#undef UINT_FAST32_MAX
#define INT_FAST32_MIN LONG_MIN
#define INT_FAST32_MAX LONG_MAX
#define UINT_FAST32_MAX ULONG_MAX
#undef INT_FAST64_MIN
#undef INT_FAST64_MAX
#undef UINT_FAST64_MAX
#ifdef int64_t
# define INT_FAST64_MIN INT64_MIN
# define INT_FAST64_MAX INT64_MAX
# define UINT_FAST64_MAX UINT64_MAX
#endif
#undef INTPTR_MIN
#undef INTPTR_MAX
#undef UINTPTR_MAX
#define INTPTR_MIN LONG_MIN
#define INTPTR_MAX LONG_MAX
#define UINTPTR_MAX ULONG_MAX
#undef INTMAX_MIN
#undef INTMAX_MAX
#undef UINTMAX_MAX
#define INTMAX_MIN (~ INTMAX_MAX)
#ifdef INT64_MAX
# define INTMAX_MAX INT64_MAX
# define UINTMAX_MAX UINT64_MAX
#else
# define INTMAX_MAX INT32_MAX
# define UINTMAX_MAX UINT32_MAX
#endif
#undef PTRDIFF_MIN
#undef PTRDIFF_MAX
#define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
#define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
#undef SIG_ATOMIC_MIN
#undef SIG_ATOMIC_MAX
#define SIG_ATOMIC_MIN \
_STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
#define SIG_ATOMIC_MAX \
_STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
#undef SIZE_MAX
#define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
#undef WCHAR_MIN
#undef WCHAR_MAX
#define WCHAR_MIN \
_STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
#define WCHAR_MAX \
_STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
#undef WINT_MIN
#undef WINT_MAX
#define WINT_MIN \
_STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
#define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
#endif
#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
#undef INT8_C
#undef UINT8_C
#define INT8_C(x) x
#define UINT8_C(x) x
#undef INT16_C
#undef UINT16_C
#define INT16_C(x) x
#define UINT16_C(x) x
#undef INT32_C
#undef UINT32_C
#define INT32_C(x) x
#define UINT32_C(x) x ## U
#undef INT64_C
#undef UINT64_C
#if LONG_MAX >> 31 >> 31 == 1
# define INT64_C(x) x##L
# define UINT64_C(x) x##UL
#elif defined _MSC_VER
# define INT64_C(x) x##i64
# define UINT64_C(x) x##ui64
#elif @HAVE_LONG_LONG_INT@
# define INT64_C(x) x##LL
# define UINT64_C(x) x##ULL
#endif
#undef INTMAX_C
#undef UINTMAX_C
#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
# define INTMAX_C(x) x##LL
# define UINTMAX_C(x) x##ULL
#elif defined int64_t
# define INTMAX_C(x) INT64_C(x)
# define UINTMAX_C(x) UINT64_C(x)
#else
# define INTMAX_C(x) x##L
# define UINTMAX_C(x) x##UL
#endif
#endif
#endif