diff --git a/ChangeLog b/ChangeLog index ad20821e7c..abb3696b44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2016-12-30 Joseph Myers + * bits/types.h (__intmax_t): New typedef. + (__uintmax_t): Likewise. + * sysdeps/generic/stdint.h: Include . + (intmax_t): Define using __intmax_t. + (uintmax_t): Define using __uintmax_t. + * support/Makefile (tests-special): Make definition conditional on [$(run-built-tests) = yes]. ($(objpfx)tst-support_record_failure-2.out): Make rule conditional diff --git a/bits/types.h b/bits/types.h index 01753bd0dc..8c8fe9fc3f 100644 --- a/bits/types.h +++ b/bits/types.h @@ -56,6 +56,15 @@ __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; #endif +/* Largest integral types. */ +#if __WORDSIZE == 64 +typedef long int __intmax_t; +typedef unsigned long int __uintmax_t; +#else +__extension__ typedef long long int __intmax_t; +__extension__ typedef unsigned long long int __uintmax_t; +#endif + /* The machine-dependent file defines __*_T_TYPE macros for each of the OS types we define below. The definitions diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 8e4347c623..4db6e1ce25 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -24,6 +24,7 @@ #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include +#include #include #include @@ -131,15 +132,8 @@ typedef unsigned int uintptr_t; /* Largest integral types. */ -#if __WORDSIZE == 64 -typedef long int intmax_t; -typedef unsigned long int uintmax_t; -#else -__extension__ -typedef long long int intmax_t; -__extension__ -typedef unsigned long long int uintmax_t; -#endif +typedef __intmax_t intmax_t; +typedef __uintmax_t uintmax_t; # if __WORDSIZE == 64