[PATCH v3 5/5] y2038: Support for Y2038 safe time on 32 bit systems

Andreas Schwab schwab@suse.de
Tue May 7 13:34:00 GMT 2019


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."



More information about the Libc-alpha mailing list