This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Change time_t to 64-bit by default


On Sep  7 15:00, Sebastian Huber wrote:
> On 07/09/17 14:34, Corinna Vinschen wrote:
> 
> > On Sep  7 09:20, Sebastian Huber wrote:
> > > In order to avoid the year 2038 problem, define time_t to a signed
> > > integer with at least 64-bits.  The type for time_t can be forced to
> > > long with the --enable-newlib-long-time_t configure option or with the
> > > _USE_LONG_TIME_T system configuration define.
> > > 
> > > Signed-off-by: Sebastian Huber<sebastian.huber@embedded-brains.de>
> > > ---
> > >   newlib/README                         |  6 ++++++
> > >   newlib/configure                      | 26 ++++++++++++++++++++++++--
> > >   newlib/configure.in                   | 15 +++++++++++++++
> > >   newlib/libc/include/sys/_types.h      |  6 +++++-
> > >   newlib/libc/include/sys/config.h      |  6 ++++++
> > >   newlib/newlib.hin                     |  3 +++
> > >   winsup/cygwin/include/cygwin/config.h |  1 +
> > >   7 files changed, 60 insertions(+), 3 deletions(-)
> > Your patch is fine, but aren't we missing a preliminary patch to the
> > time functions as discussed in
> > https://sourceware.org/ml/newlib/2017/msg00772.html  first?
> 
> If I compare
> 
> https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=newlib/libc/time/gmtime_r.c;h=81c7c94b1f9fe54f83c677e15c2ef6cc81509445;hb=HEAD
> 
> with
> 
> https://svnweb.freebsd.org/base/head/contrib/tzcode/stdtime/localtime.c?view=markup
> 
> or
> 
> https://android.googlesource.com/platform/bionic/+/master/libc/tzcode/localtime.c
> 
> I wonder if the Newlib version is correct in general. At least support for
> leap seconds seems to be missing.
> 
> The casts in Newlib gmtime_r() look pretty useless. I will send a patch
> with:

Thanks, feel free to push the patch from this thread after the
other one.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]