[RFC 6/7] y2038: Support for Y2038 safe time on 32 bit systems (generic code)

Joseph Myers joseph@codesourcery.com
Wed Mar 27 13:47:00 GMT 2019


On Wed, 27 Mar 2019, Lukasz Majewski wrote:

> * include/features.h:
>   Add logic to set __USE_TIME_BITS64 according to passed (when building
>   userspace Y2038 safe program on 32 bit system) _TIME_BITS and
>   _FILE_OFFSET_BITS

Nothing like this should be added until *every* public API has support for 
_TIME_BITS=64 (then the support for it should be added for all APIs at 
once - all the header changes and all the new symbol versions).

> +/* we need to know the word size in order to check the time size */

Comment style.

> +#if defined _TIME_BITS
> +# if _TIME_BITS == 64
> +#  if ! defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64

Space before '('

> +#   error _TIME_BIT==64 is allowed only when _FILE_OFFSET_BITS==64

> +#   error __TIME_BITS=32 is not compatible with __WORDSIZE > 32

It should be _TIME_BITS.  Not _TIME_BIT, not __TIME_BITS.  Please spell 
the name consistently throughout.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list