This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
HAVE_TIMEZONE and cygwin
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- To: <java at gcc dot gnu dot org>
- Date: Thu, 2 May 2002 14:17:41 +1000
- Subject: HAVE_TIMEZONE and cygwin
The cygwin patch for natSystem.cc
(http://gcc.gnu.org/ml/java-patches/2002-q2/msg00252.html)
probably should read something like
#elif HAVE_UNDERSCORE_TIMEZONE
tzoffset = _timezone;
#elif HAVE_TIMEZONE
// timezone is secs WEST of UTC.
tzoffset = timezone;
#else
// FIXME: there must be another global if neither
tm_gmtoff nor timezone
// is available, esp. if tzname is valid.
To do this we need to add to libjava/configure.in
a test something like
AC_TRY_COMPILE([#include <time.h>], [long z2 = _timezone;],
[AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])])
and preferably get the existing test
AC_TRY_COMPILE([#include <time.h>], [long z2 = timezone;],
[AC_DEFINE(HAVE_TIMEZONE)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])])
to fail for the cygwin <time.h> which has
char *_EXFUN(timezone, (void));