[PATCH] libc/time/gmtime_r.c, libc/time/lcltime_r.c,, libc/time/local.h, libc/time/mktm_r.c: move localtime related functionality, from _mktm_r() to new _mklocaltm_r() to break dependency of gmtime() on, timezones

Corinna Vinschen vinschen@redhat.com
Thu Sep 4 12:30:00 GMT 2014


On Sep  4 14:18, Freddie Chopin wrote:
> W dniu 2014-09-04 13:59, Corinna Vinschen pisze:
> >In this scenario, since _gmtime_r will be included
> >as soon as localtime_r is used, the arrays would just go into the
> >_gmtime_r source file as well.
> 
> Well, it's probably not that easy. There's also __tzcalc_limits(), which
> also uses this array. This function is used by mktime(), _tzset_r() and -
> indirectly - by localtime(). That's why I think it would be reasonable to
> move this array to separate file - when you use mktime(), you don't need
> gmtime().

Indeed.

> The other option is to define the contents of this array as
> #define macro in local.h and just have the array in two files, but that's
> not very elegant...

It's probably also not a good idea space-wise.


Corinna

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


More information about the Newlib mailing list