This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [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
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Thu, 4 Sep 2014 14:30:30 +0200
- Subject: Re: [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
- Authentication-results: sourceware.org; auth=none
- References: <54077334 dot 6050804 at op dot pl> <20140904083614 dot GO6056 at calimero dot vinschen dot de> <5408455D dot 2060704 at op dot pl> <20140904115915 dot GQ6056 at calimero dot vinschen dot de> <54085891 dot 90900 at op dot pl>
- Reply-to: newlib at sourceware dot org
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
Attachment:
pgp_AP8uvV0fW.pgp
Description: PGP signature
- References:
- [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
- Re: [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
- Re: [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
- Re: [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
- Re: [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