strftime improvements

Corinna Vinschen
Thu Feb 24 19:09:00 GMT 2005

On Feb 24 13:44, Christopher Faylor wrote:
> On Wed, Feb 23, 2005 at 11:26:32PM +0100, Corinna Vinschen wrote:
> >Cygwin OTOH suffers from the existence of an exported function timezone().
> >I have not the faintest idea why this has been defined (back in 1996 or so)
> >since I don't recall that a timezone() function was ever defined in some
> >standard.
> I think it was a BSD 4.2 thing.
> >Usually, timezone is defined as the function, unless timezonevar has been
> >explicitely defined by the application.  So usually there's no namespace
> >clash between timezone, the function and timezone, the struct name.  The
> >only no-no in Cygwin is to #include <sys/time.h> after #include <time.h>
> >if the application #define's timezonevar.
> >
> >I would love to get rid of the timezone function and instead have a clean
> >and simple definition of long timezone, but that's not possible otherwise
> >we'd break backward compatibility.  Sigh.
> Can't we use our standard method to do this (keep current name the same
> but create a cygwin_timezone variable which is exported via the import
> library as 'timezone') or would that not work with variables?

Never tried that.  Actually, if that works, we wouldn't even need to
rename the timezone variable as cygwin_timezone, because it's exported
as _timezone anyway.  If the import library trick works with variables,
all we would have to do is export it as timezone and change the newlib
time.h header accordingly.


Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.

More information about the Newlib mailing list