Mac OSX std.datetime / Posix daylight variable

Jonathan M Davis jmdavisProg at gmx.com
Sun Feb 20 05:32:12 PST 2011


On Sunday 20 February 2011 04:53:03 Michel Fortin wrote:
> On 2011-02-20 00:11:11 -0500, Jonathan M Davis <jmdavisProg at gmx.com> said:
> > Posix defines the tzset function along with a few helper items. From the
> > Linux man page:
> > 
> > extern int daylight;
> > extern long timezone;
> > extern char *tzname[2];
> > void tzset(void);
> > 
> > It seems that while these _are_ Posix, not all Posix systems declare
> > all of them
> > (which baffles me, but that's the way it goes it seems). tzset seem
> > pretty universal, and I believe that tzname is essentially universal,
> > but I'm not so sure about the others.
> > 
> > Currently, std.datetime uses tzset, tzname, and daylight on all Posix
> > systems. It appears that for some reason, daylight is not declared on
> > FreeBSD ( http://d.puremagic.com/issues/show_bug.cgi?id=5616 ). What I
> > want to confirm is that this is _not_ a problem on Mac OS X.
> > 
> > As I understand it, std.datetime has been working just fine on Mac OS X,
> > which would indicate that daylight _is_ declared on Mac OS X. Can anyone
> > confirm this?
> > If it is indeed the case, I'd like to have daylight added to druntime
> > (where it belongs) for OSX. But if it's not actually on OSX, then we
> > definitely don't want
> > to declare it there.
> 
> time.h has daylight in the Mac OS X 10.6 SDK:
> 
> extern int daylight;

Okay. Thanks for the confirmation. I've now added it to druntime for Mac OS X.

- Jonathan M Davis


More information about the Digitalmars-d mailing list