Commit be6c8114 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

fixed problem for HAVE_UNDERSCORE_TIMEZONE


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@958 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 470c3642
...@@ -251,20 +251,15 @@ AC_CHECK_FUNCS([timegm], [], [ ...@@ -251,20 +251,15 @@ AC_CHECK_FUNCS([timegm], [], [
AC_CHECK_MEMBERS([struct tm.tm_gmtoff]) AC_CHECK_MEMBERS([struct tm.tm_gmtoff])
# Test whether _timezone is available. (On Windows only) # Test whether _timezone is available. (On Windows only)
AC_CACHE_CHECK([whether _timezone is available], AC_MSG_CHECKING([for global _timezone variable])
ac_cv_timezone_win, [dnl dnl FIXME: As above, don't want link check
AC_RUN_IFELSE([AC_LANG_SOURCE([[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
int main(void) { [[long z2 = _timezone;]])],
[AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
[Define if your platform has the global _timezone variable.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
printf("%d\n", _timezone);
return 0;
}
]])],[ac_cv_timezone_win=no],[ac_cv_timezone_win=yes],[ac_cv_timezone_win=cross])])
if test x"$ac_cv_timezone_win" = x"yes"; then
AC_DEFINE(HAVE_TIMEZONE_WIN, 1, [Define if _timezone is available])
fi
# Test whether SO_RCVTIMEO is broken. (On Solaris SO_RCVTIMEO is defined but not implemented) # Test whether SO_RCVTIMEO is broken. (On Solaris SO_RCVTIMEO is defined but not implemented)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxp_data.c,v 1.57 2008-03-24 19:51:35 mtheo Exp $ * $Id: nmxp_data.c,v 1.58 2008-03-24 20:18:23 mtheo Exp $
* *
*/ */
...@@ -57,7 +57,7 @@ time_t my_timegm (struct tm *tm) { ...@@ -57,7 +57,7 @@ time_t my_timegm (struct tm *tm) {
tzset(); tzset();
#endif #endif
#ifdef HAVE_TIMEZONE_WIN #ifdef HAVE_UNDERSCORE_TIMEZONE
ret -= _timezone; ret -= _timezone;
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment