Commit 470c3642 authored by Matteo Quintiliani's avatar Matteo Quintiliani

Added computation of latency under windows


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@957 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent f182611f
......@@ -250,6 +250,23 @@ AC_CHECK_FUNCS([timegm], [], [
])
AC_CHECK_MEMBERS([struct tm.tm_gmtoff])
# Test whether _timezone is available. (On Windows only)
AC_CACHE_CHECK([whether _timezone is available],
ac_cv_timezone_win, [dnl
AC_RUN_IFELSE([AC_LANG_SOURCE([[
int main(void) {
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)
AC_CACHE_CHECK([whether setsockopt(SO_RCVTIMEO) is broken],
ac_cv_so_rcvtimeo_broken, [dnl
......
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxp_data.c,v 1.56 2008-03-01 22:33:34 mtheo Exp $
* $Id: nmxp_data.c,v 1.57 2008-03-24 19:51:35 mtheo Exp $
*
*/
......@@ -56,6 +56,11 @@ time_t my_timegm (struct tm *tm) {
unsetenv("TZ");
tzset();
#endif
#ifdef HAVE_TIMEZONE_WIN
ret -= _timezone;
#endif
return ret;
}
......
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