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

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


On Aug 11 15:40, Corinna Vinschen wrote:
> On Aug 11 14:23, Freddie Chopin wrote:
> > On Fri, 2017-08-11 at 13:20 +0200, philipp.trommler@preh.de wrote:
> > > +`--enable-32bit-time_t'
> > > +     Use a time_t that is defined to long, regardless of the
> > > wordsize of
> > > +     the target. This may lead to problems in January 2038 when the
> > > 32 bit
> > > +     timestamp overflows but on the other hand may yield better
> > > +     performance than 64 bit timestamps.
> > > +     Disabled by default.
> > 
> > I would say that the option is misleading, as "long" may as well have
> > 64-bits on 64-bit systems. Maybe it would be better to have it as "
> > --disable-64bit-time_t"? This would have a similar issue, but be
> > actually  more consistent with the logic of the patch - time_t is
> > either 64-bit or whatever "long" is.
> 
> what about something like --enable-time_t-is-long-only ?

Alternatively, what about sticking to --enable-32bit-time_t and mean it?

We could define time_t as __int32_t or __int_least32_t then, rather
than using long.  The definition of time_t is then actually controlled
by a concious decision of the developer.


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/66c6dea9/attachment.sig>


More information about the Newlib mailing list