This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 5/5] y2038: Support for Y2038 safe time on 32 bit systems
- From: Andreas Schwab <schwab at suse dot de>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: libc-alpha at sourceware dot org, Stepan Golosunov <stepan at golosunov dot pp dot ru>, Arnd Bergmann <arnd at arndb dot de>, Paul Eggert <eggert at cs dot ucla dot edu>, Joseph Myers <joseph at codesourcery dot com>
- Date: Tue, 07 May 2019 15:34:16 +0200
- Subject: Re: [PATCH v3 5/5] y2038: Support for Y2038 safe time on 32 bit systems
- References: <20190414220841.20243-1-lukma@denx.de> <20190507131848.30980-1-lukma@denx.de> <20190507131848.30980-12-lukma@denx.de>
On Mai 07 2019, Lukasz Majewski <lukma@denx.de> wrote:
> diff --git a/include/features.h b/include/features.h
> index e016b3e5c7..153c6320f0 100644
> --- a/include/features.h
> +++ b/include/features.h
> @@ -365,6 +365,25 @@
> # define __USE_FILE_OFFSET64 1
> #endif
>
> +/* We need to know the word size in order to check the time size. */
> +#include <bits/wordsize.h>
> +
> +#if defined _TIME_BITS
> +# if _TIME_BITS == 64
> +# if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
> +# error _TIME_BITS==64 is allowed only when _FILE_OFFSET_BITS==64
Perhaps:
# error _TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."