Define __intmax_t, __uintmax_t in bits/types.h

Florian Weimer fweimer@redhat.com
Fri Dec 30 12:59:00 GMT 2016


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



More information about the Libc-alpha mailing list