[PATCH] Changes the default size of time_t to 64 bit.
Corinna Vinschen
vinschen@redhat.com
Mon Aug 28 08:57:00 GMT 2017
On Aug 25 14:14, Sebastian Huber wrote:
> On 25/08/17 14:06, Corinna Vinschen wrote:
>
> > On Aug 25 08:15, Sebastian Huber wrote:
> > > Currently we have:
> > >
> > > #define _TIME_T_ long /* time() */
> > >
> > > If we change this type, it is probably nice to add a configure option to
> > > restore this definition for those who trade off binary compatibility with a
> > > year 2038 readiness.
> > >
> > > I am still in favour of --enable-long-time_t, since this corresponds exactly
> > > to the current definition.
> > >
> > > We should make the type change only if necessary, e.g. something like this:
> > >
> > > #if defined(_USE_LONG_TIME_T) || __LONG_MAX__ > 0x7fffffffL
> > >
> > > #define _TIME_T_ long
> > >
> > > #else
> > >
> > > #define _TIME_T_ __int_least64_t
> > >
> > > #endif
> > Fine with me, unless Cygwin.
>
> We should probably add this to <sys/config.h>:
>
> #ifdef _WANT_USE_LONG_TIME_T
> #ifndef _USE_LONG_TIME_T
> #define _USE_LONG_TIME_T
> #endif
> #endif
>
> The _WANT_USE_LONG_TIME_T is defined by --enable-long-time_t. Cygwin (or any
> other system) can use <cygwin/config.h> to define _USE_LONG_TIME_T. Is this
> ok?
Sounds good to me.
Thanks,
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/20170828/bed10511/attachment.sig>
More information about the Newlib
mailing list