Message ID | alpine.DEB.2.20.1612211316270.3841@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
Ping. This patch <https://sourceware.org/ml/libc-alpha/2016-12/msg00802.html> is pending review.
On 12/21/2016 02:17 PM, Joseph Myers wrote: > diff --git a/bits/types.h b/bits/types.h > index 01753bd..45b99fd 100644 > --- a/bits/types.h > +++ b/bits/types.h > @@ -56,6 +56,17 @@ __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 I wouldn't put __extension__ on its own line for consistency with the other declarations in that file. Otherwise, looks good to me. Thanks, Florian
diff --git a/bits/types.h b/bits/types.h index 01753bd..45b99fd 100644 --- a/bits/types.h +++ b/bits/types.h @@ -56,6 +56,17 @@ __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 <bits/typesizes.h> 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 8e4347c..4db6e1c 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -24,6 +24,7 @@ #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include <bits/libc-header-start.h> +#include <bits/types.h> #include <bits/wchar.h> #include <bits/wordsize.h> @@ -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