2007-07-05 20:43:16 +02:00
|
|
|
/* DO NOT EDIT THIS FILE.
|
|
|
|
|
|
|
|
It has been auto-edited by fixincludes from:
|
|
|
|
|
|
|
|
"fixinc/tests/inc/stdint.h"
|
|
|
|
|
|
|
|
This had to be done to correct non-standard usages in the
|
|
|
|
original, manufacturer supplied header file. */
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-17 17:22:04 +02:00
|
|
|
#if defined( AIX_STDINT_1_CHECK )
|
2009-08-28 19:53:46 +02:00
|
|
|
#define UINT8_MAX (255)
|
|
|
|
#define UINT16_MAX (65535)
|
2009-08-17 17:22:04 +02:00
|
|
|
#endif /* AIX_STDINT_1_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( AIX_STDINT_2_CHECK )
|
2009-08-28 19:53:46 +02:00
|
|
|
#define INTPTR_MIN (-INTPTR_MAX-1)
|
|
|
|
#define INTPTR_MAX 9223372036854775807L
|
|
|
|
#define UINTPTR_MAX 18446744073709551615UL
|
2009-08-17 17:22:04 +02:00
|
|
|
#else
|
2009-08-28 19:53:46 +02:00
|
|
|
#define INTPTR_MIN (-INTPTR_MAX-1)
|
|
|
|
#define INTPTR_MAX 2147483647L
|
|
|
|
#define UINTPTR_MAX 4294967295UL
|
2009-08-17 17:22:04 +02:00
|
|
|
#endif /* AIX_STDINT_2_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( AIX_STDINT_3_CHECK )
|
2009-08-28 19:53:46 +02:00
|
|
|
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
|
|
|
|
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
2009-08-17 17:22:04 +02:00
|
|
|
#else
|
2009-08-28 19:53:46 +02:00
|
|
|
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
|
|
|
|
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
2009-08-17 17:22:04 +02:00
|
|
|
#endif /* AIX_STDINT_3_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( AIX_STDINT_4_CHECK )
|
2009-08-28 19:53:46 +02:00
|
|
|
#define SIZE_MAX __SIZE_MAX__
|
2009-08-17 17:22:04 +02:00
|
|
|
#else
|
2009-08-28 19:53:46 +02:00
|
|
|
#define SIZE_MAX __SIZE_MAX__
|
2009-08-17 17:22:04 +02:00
|
|
|
#endif /* AIX_STDINT_4_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( AIX_STDINT_5_CHECK )
|
2009-08-28 19:53:46 +02:00
|
|
|
#define UINT8_C(c) __UINT8_C(c)
|
|
|
|
#define UINT16_C(c) __UINT16_C(c)
|
2009-08-17 17:22:04 +02:00
|
|
|
#endif /* AIX_STDINT_5_CHECK */
|
|
|
|
|
|
|
|
|
2009-06-10 00:09:58 +02:00
|
|
|
#if defined( DARWIN_STDINT_1_CHECK )
|
|
|
|
#define UINT8_C(c) __UINT8_C(c)
|
|
|
|
#define UINT16_C(c) __UINT16_C(c)
|
|
|
|
#endif /* DARWIN_STDINT_1_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( DARWIN_STDINT_2_CHECK )
|
|
|
|
#if __WORDSIZE == 64
|
|
|
|
#define INTPTR_MAX 9223372036854775807L
|
|
|
|
#define INTPTR_MIN (-INTPTR_MAX-1)
|
|
|
|
#else
|
|
|
|
#define INTPTR_MAX 2147483647L
|
|
|
|
#define INTPTR_MIN (-INTPTR_MAX-1)
|
|
|
|
#endif
|
|
|
|
#endif /* DARWIN_STDINT_2_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( DARWIN_STDINT_3_CHECK )
|
|
|
|
#if __WORDSIZE == 64
|
|
|
|
#define UINTPTR_MAX 18446744073709551615UL
|
|
|
|
#else
|
|
|
|
#define UINTPTR_MAX 4294967295UL
|
|
|
|
#endif
|
|
|
|
#endif /* DARWIN_STDINT_3_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( DARWIN_STDINT_4_CHECK )
|
|
|
|
#if __WORDSIZE == 64
|
|
|
|
#define SIZE_MAX __SIZE_MAX__
|
|
|
|
#else
|
|
|
|
#define SIZE_MAX __SIZE_MAX__
|
|
|
|
#endif
|
|
|
|
#endif /* DARWIN_STDINT_4_CHECK */
|
|
|
|
|
|
|
|
|
2009-07-04 23:31:17 +02:00
|
|
|
#if defined( DARWIN_STDINT_5_CHECK )
|
|
|
|
#if __WORDSIZE == 64
|
|
|
|
#define INTMAX_MIN (-9223372036854775807L - 1)
|
|
|
|
#define INTMAX_MAX 9223372036854775807L
|
|
|
|
#define UINTMAX_MAX 18446744073709551615UL
|
|
|
|
#else
|
|
|
|
#define INTMAX_MIN (-9223372036854775807LL - 1)
|
|
|
|
#define INTMAX_MAX 9223372036854775807LL
|
|
|
|
#define UINTMAX_MAX 18446744073709551615ULL
|
|
|
|
#endif
|
|
|
|
#endif /* DARWIN_STDINT_5_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( DARWIN_STDINT_6_CHECK )
|
|
|
|
#if __WORDSIZE == 64
|
|
|
|
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
|
|
|
|
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
|
|
|
#else
|
|
|
|
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
|
|
|
|
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
|
|
|
#endif
|
|
|
|
#endif /* DARWIN_STDINT_6_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( DARWIN_STDINT_7_CHECK )
|
|
|
|
#if __WORDSIZE == 64
|
|
|
|
#define INTMAX_C(v) (v ## L)
|
|
|
|
#define UINTMAX_C(v) (v ## UL)
|
|
|
|
#else
|
|
|
|
#define INTMAX_C(v) (v ## LL)
|
|
|
|
#define UINTMAX_C(v) (v ## ULL)
|
|
|
|
#endif
|
|
|
|
#endif /* DARWIN_STDINT_7_CHECK */
|
|
|
|
|
|
|
|
|
2009-04-28 12:21:24 +02:00
|
|
|
#if defined( GLIBC_STDINT_CHECK )
|
|
|
|
/* This file is part of the GNU C Library. */
|
|
|
|
# define UINT8_C(c) c
|
|
|
|
# define UINT16_C(c) c
|
|
|
|
#endif /* GLIBC_STDINT_CHECK */
|
|
|
|
|
|
|
|
|
2009-04-28 17:17:49 +02:00
|
|
|
#if defined( HPUX_C99_INTPTR_CHECK )
|
|
|
|
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
|
|
|
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
|
|
|
|
#define INTPTR_MAX (2147483647l)
|
|
|
|
#define INTPTR_MIN (-INTPTR_MAX - 1)
|
|
|
|
#define UINTPTR_MAX (4294967295ul)
|
|
|
|
#define SIZE_MAX __SIZE_MAX__
|
|
|
|
|
|
|
|
#endif /* HPUX_C99_INTPTR_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( HPUX_C99_INTTYPES2_CHECK )
|
|
|
|
#define INT8_C(__c) (__c)
|
|
|
|
#define UINT8_C(c) __UINT8_C(c)
|
|
|
|
#define INT16_C(__c) (__c)
|
|
|
|
#define UINT16_C(c) __UINT16_C(c)
|
|
|
|
|
|
|
|
#endif /* HPUX_C99_INTTYPES2_CHECK */
|
|
|
|
|
|
|
|
|
2009-08-28 21:42:41 +02:00
|
|
|
#if defined( HPUX_STDINT_LEAST_FAST_CHECK )
|
2009-10-21 19:01:35 +02:00
|
|
|
# define UINT_FAST64_MAX __UINT64_MAX__
|
|
|
|
# define UINT_LEAST64_MAX __UINT64_MAX__
|
|
|
|
|
2009-08-28 21:42:41 +02:00
|
|
|
#endif /* HPUX_STDINT_LEAST_FAST_CHECK */
|
2009-04-28 17:17:49 +02:00
|
|
|
|
|
|
|
|
2007-07-05 20:43:16 +02:00
|
|
|
#if defined( IRIX_STDINT_C99_CHECK )
|
|
|
|
#if 0
|
|
|
|
#error This header file is to be used only for c99 mode compilations
|
|
|
|
#else
|
|
|
|
#endif /* IRIX_STDINT_C99_CHECK */
|
re PR c/448 (<stdint.h>-related issues (C99 issues))
PR c/448
fixincludes:
* inclhack.def (newlib_stdint_1, newlib_stdint_2): New fixes.
* fixincl.x: Regenerate.
* tests/base/stdint.h: Update.
gcc:
* Makefile.in (USE_GCC_STDINT): Define.
(stmp-int-hdrs): Install stdint.h if applicable.
* c-common.c (CHAR16_TYPE): Define in terms of UINT_LEAST16_TYPE
if known.
(CHAR32_TYPE): Define in terms of UINT_LEAST32_TYPE if known.
(SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE,
UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE,
INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define.
(c_common_nodes_and_builtins): Initialize
underlying_wchar_type_node. Do not initialize
signed_wchar_type_node or unsigned_wchar_type_node. Initialize
nodes for new types.
(c_stddef_cpp_builtins): Define macros for new types.
* c-common.h (CTI_SIGNED_WCHAR_TYPE, CTI_UNSIGNED_WCHAR_TYPE):
Remove.
(CTI_UNDERLYING_WCHAR_TYPE, CTI_SIG_ATOMIC_TYPE, CTI_INT8_TYPE,
CTI_INT16_TYPE, CTI_INT32_TYPE, CTI_INT64_TYPE, CTI_UINT8_TYPE,
CTI_UINT16_TYPE, CTI_UINT32_TYPE, CTI_UINT64_TYPE,
CTI_INT_LEAST8_TYPE, CTI_INT_LEAST16_TYPE, CTI_INT_LEAST32_TYPE,
CTI_INT_LEAST64_TYPE, CTI_UINT_LEAST8_TYPE, CTI_UINT_LEAST16_TYPE,
CTI_UINT_LEAST32_TYPE, CTI_UINT_LEAST64_TYPE, CTI_INT_FAST8_TYPE,
CTI_INT_FAST16_TYPE, CTI_INT_FAST32_TYPE, CTI_INT_FAST64_TYPE,
CTI_UINT_FAST8_TYPE, CTI_UINT_FAST16_TYPE, CTI_UINT_FAST32_TYPE,
CTI_UINT_FAST64_TYPE, CTI_INTPTR_TYPE, CTI_UINTPTR_TYPE): Define.
(signed_wchar_type_node, unsigned_wchar_type_node): Remove.
(underlying_wchar_type_node, sig_atomic_type_node, int8_type_node,
int16_type_node, int32_type_node, int64_type_node,
uint8_type_node, uint16_type_node, c_uint32_type_node,
c_uint64_type_node, int_least8_type_node, int_least16_type_node,
int_least32_type_node, int_least64_type_node,
uint_least8_type_node, uint_least16_type_node,
uint_least32_type_node, uint_least64_type_node,
int_fast8_type_node, int_fast16_type_node, int_fast32_type_node,
int_fast64_type_node, uint_fast8_type_node, uint_fast16_type_node,
uint_fast32_type_node, uint_fast64_type_node, intptr_type_node,
uintptr_type_node): Define.
* c-cppbuiltin.c (builtin_define_constants,
builtin_define_type_minmax): New.
(builtin_define_stdint_macros): Define more macros.
(c_cpp_builtins): Define more limit macros.
(type_suffix): New.
(builtin_define_type_max): Define in terms of
builtin_define_type_minmax. Remove is_long parameter. All
callers changed.
* config.gcc (use_gcc_stdint): Define.
(tm_file): Add glibc-stdint.h for targets using glibc or uClibc.
Add newlib-stdint.h for generic targets.
* config/glibc-stdint.h, config/newlib-stdint.h,
ginclude/stdint-gcc.h, ginclude/stdint-wrap.h: New.
* config/m32c/m32c.h (UINTPTR_TYPE): Define.
* config/score/score.h (UINTPTR_TYPE): Define.
* config/sol2.h (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE,
INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE,
UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define.
* config/spu/spu.h (STDINT_LONG32): Define.
* configure.ac (use_gcc_stdint): Substitute.
* configure: Regenerate.
* doc/cpp.texi (__SIG_ATOMIC_TYPE__, __INT8_TYPE__,
__INT16_TYPE__, __INT32_TYPE__, __INT64_TYPE__, __UINT8_TYPE__,
__UINT16_TYPE__, __UINT32_TYPE__, __UINT64_TYPE__,
__INT_LEAST8_TYPE__, __INT_LEAST16_TYPE__, __INT_LEAST32_TYPE__,
__INT_LEAST64_TYPE__, __UINT_LEAST8_TYPE__, __UINT_LEAST16_TYPE__,
__UINT_LEAST32_TYPE_, __UINT_LEAST64_TYPE__, __INT_FAST8_TYPE__,
__INT_FAST16_TYPE__, __INT_FAST32_TYPE__, __INT_FAST64_TYPE__,
__UINT_FAST8_TYPE__, __UINT_FAST16_TYPE__, __UINT_FAST32_TYPE__,
__UINT_FAST64_TYPE__, __INTPTR_TYPE__, __UINTPTR_TYPE__,
__WINT_MAX__, __SIZE_MAX__, __PTRDIFF_MAX__, __UINTMAX_MAX__,
__SIG_ATOMIC_MAX__, __INT8_MAX__, __INT16_MAX__, __INT32_MAX__,
__INT64_MAX__, __UINT8_MAX__, __UINT16_MAX__, __UINT32_MAX__,
__UINT64_MAX__, __INT_LEAST8_MAX__, __INT_LEAST16_MAX__,
__INT_LEAST32_MAX__, __INT_LEAST64_MAX__, __UINT_LEAST8_MAX__,
__UINT_LEAST16_MAX__, __UINT_LEAST32_MAX__, __UINT_LEAST64_MAX__,
__INT_FAST8_MAX__, __INT_FAST16_MAX__, __INT_FAST32_MAX__,
__INT_FAST64_MAX__, __UINT_FAST8_MAX__, __UINT_FAST16_MAX__,
__UINT_FAST32_MAX__, __UINT_FAST64_MAX__, __INTPTR_MAX__,
__UINTPTR_MAX__, __WCHAR_MIN__, __WINT_MIN__, __SIG_ATOMIC_MIN__,
__INT8_C, __INT16_C, __INT32_C, __INT64_C, __UINT8_C, __UINT16_C,
__UINT32_C, __UINT64_C, __INTMAX_C, __UINTMAX_C): Document.
* doc/tm.texi (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE,
INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE,
INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Document.
gcc/testsuite:
* lib/target-supports.exp (check_effective_target_stdint_types):
Update comment.
(check_effective_target_inttypes_types): New.
* gcc.dg/c99-stdint-1.c, gcc.dg/c99-stdint-2.c,
gcc.dg/c99-stdint-3.c, gcc.dg/c99-stdint-4.c,
gcc.dg/c99-stdint-5.c, gcc.dg/c99-stdint-6.c: New tests.
From-SVN: r145372
2009-03-31 22:30:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
#if defined( NEWLIB_STDINT_1_CHECK )
|
|
|
|
/* @todo - Add support for wint_t types. */
|
|
|
|
#define INT32_MIN (-INT32_MAX - 1)
|
|
|
|
#define INT32_MAX __INT32_MAX__
|
|
|
|
#define UINT32_MAX __UINT32_MAX__
|
|
|
|
#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)
|
|
|
|
#define INT_LEAST32_MAX __INT_LEAST32_MAX__
|
|
|
|
#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__
|
|
|
|
#define INT_FAST8_MIN (-INT_FAST8_MAX - 1)
|
|
|
|
#define INT_FAST8_MAX __INT_FAST8_MAX__
|
|
|
|
#define UINT_FAST8_MAX __UINT_FAST8_MAX__
|
|
|
|
#define SIZE_MAX __SIZE_MAX__
|
|
|
|
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
|
|
|
|
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
|
|
|
#define UINT8_C(c) __UINT8_C(c)
|
|
|
|
#define UINT16_C(c) __UINT16_C(c)
|
|
|
|
#endif /* NEWLIB_STDINT_1_CHECK */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined( NEWLIB_STDINT_2_CHECK )
|
|
|
|
/* @todo - Add support for wint_t types. */
|
|
|
|
#define INTMAX_MAX __INTMAX_MAX__
|
|
|
|
#define INTMAX_MIN (-INTMAX_MAX - 1)
|
|
|
|
#define UINTMAX_MAX __UINTMAX_MAX__
|
|
|
|
#define WCHAR_MAX __WCHAR_MAX__
|
|
|
|
#define WCHAR_MIN __WCHAR_MIN__
|
|
|
|
#define WINT_MAX __WINT_MAX__
|
|
|
|
#define WINT_MIN __WINT_MIN__
|
|
|
|
|
|
|
|
/** Macros for minimum-width integer constant expressions */
|
|
|
|
#endif /* NEWLIB_STDINT_2_CHECK */
|