This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC 6/7] y2038: Support for Y2038 safe time on 32 bit systems (generic code)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: <libc-alpha at sourceware dot org>, Paul Eggert <eggert at cs dot ucla dot edu>, Zack Weinberg <zackw at panix dot com>
- Date: Wed, 27 Mar 2019 13:47:27 +0000
- Subject: Re: [RFC 6/7] y2038: Support for Y2038 safe time on 32 bit systems (generic code)
- References: <20190327085210.22019-1-lukma@denx.de> <20190327085210.22019-7-lukma@denx.de>
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