Hi all,
some more Android related woes.
Making all for library libgnustep-base...
Compiling file NSTimeZone.m ...
NSTimeZone.m:1644:56: error: use of undeclared identifier 'daylight'
if (NULL != tzname[0] && '\0' != *tzname[0] && 0 == daylight)
This is the context:
#if HAVE_TZSET && !defined(__FreeBSD__) && !defined(__OpenBSD__)
/*
* Try to get timezone from tzset and tzname/daylight.
* If daylight is non-zero, then tzname[0] is only the name
* the the zone for part of the year, so we can't use it as
* the definitive zone.
*
* FreeBSD doesn't implement TZSet fully, so we can't use it there.
* Apparently, OpenBSD neither.
*/
if (localZoneString == nil)
{
localZoneSource = @"function: 'tzset()/tzname'";
tzset();
if (NULL != tzname[0] && '\0' != *tzname[0] && 0 == daylight)
localZoneString = [NSString stringWithUTF8String: tzname[0]];
}
#endif
I can't exactly figure out what the "daylight" variable should be; it
doesn't seem to be an ivar, not a static variable. In the interest of
making progress on the Android build, I'm commenting it out, but I'm not
sure where it came from. It's obviously dead code on the most used
platforms, but it's breaking Android.
Is it perhaps the "extern int daylight" apparently present in time.h?
http://unixhelp.ed.ac.uk/CGI/man-cgi?tzset+3
If so, should I simply add "&& !defined(ANDROID)"? Should this perhaps be
added as a test to configure.ac?
--
Ivan Vučica - [email protected]
_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev