strftime improvements

Eric Blake ebb9@byu.net
Fri Feb 18 22:23:00 GMT 2005


Jeff Johnston <jjohnstn <at> redhat.com> writes:
> 
> I have no problem with moving the type into sys/types.h, but I would like to 
> suggest a further change as well.  I would like to see the definition moved 
into 
> a separate file with an access function (e.g. __get_tzrule_ptr()) .  Each 
> libc/time function needing access would fetch the address dynamically and 
there 
> wouldn't be a global variable.  If you don't have time to do this, I'll do 
it, 
> but it affects your code on the other side in Cygwin.
> 

While you're at it, could you please fix the type of _timezone to be long, 
rather than time_t (or even char*(*)(void)), since POSIX requires <time.h> to 
export:
int daylight;
long timezone;
char *tzname[2];

http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html#tag_13_76





More information about the Newlib mailing list