[PATCH] Changes the default size of time_t to 64 bit.

Corinna Vinschen vinschen@redhat.com
Fri Aug 11 13:50:00 GMT 2017


On Aug 11 13:20, philipp.trommler@preh.de wrote:
> From: Philipp Trommler <philipp.trommler@preh.de>
> 
> This fixes the year 2038 problem by defining _TIME_T_ to either
> __int_least64_t, __int64_t, long (on 64 bit machines) or long long,
> depending on the available types.
> [...]
> diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
> index 98b93ce..09be6b0 100644
> --- a/newlib/libc/include/sys/_types.h
> +++ b/newlib/libc/include/sys/_types.h
> @@ -183,7 +183,22 @@ typedef void *_iconv_t;
>  #define	_CLOCK_T_	unsigned long	/* clock() */
>  typedef	_CLOCK_T_	__clock_t;
>  
> +#if defined(_USE_LONG_TIME_T)
> +/* User decided to use short time_t */

You know, this is kind of funny :)

You may want to clarify the discrepancy of USE_LONG vs. "use short"

>  #define	_TIME_T_	long		/* time() */

https://sourceware.org/ml/newlib/2017/msg00776.html


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20170811/6f07e035/attachment.sig>


More information about the Newlib mailing list