X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ftzset.m4;h=c85ab5e6d61f4577db06699ad597aae74e2c855f;hb=e4c754e34096c0703a41f6c0e9fb7cc1f007b3ed;hp=6df4eb7f999a9be398da856871891087dd666bb8;hpb=c68009f90028d2f69c6303cd98f08ac1d88923da;p=gnulib.git diff --git a/m4/tzset.m4 b/m4/tzset.m4 index 6df4eb7f9..c85ab5e6d 100644 --- a/m4/tzset.m4 +++ b/m4/tzset.m4 @@ -1,4 +1,10 @@ -#serial 1 +# serial 4 + +# Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # See if we have a working tzset function. # If so, arrange to compile the wrapper function. # For at least Solaris 2.5.1 and 2.6, this is necessary @@ -9,21 +15,12 @@ AC_DEFUN([gl_FUNC_TZSET_CLOBBER], [ - AC_REQUIRE([AC_HEADER_TIME]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_CACHE_CHECK([whether tzset clobbers localtime buffer], gl_cv_func_tzset_clobber, [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif +#include #include int @@ -36,27 +33,27 @@ main () s = *p; putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"); tzset (); - exit (p->tm_year != s.tm_year - || p->tm_mon != s.tm_mon - || p->tm_mday != s.tm_mday - || p->tm_hour != s.tm_hour - || p->tm_min != s.tm_min - || p->tm_sec != s.tm_sec); + return (p->tm_year != s.tm_year + || p->tm_mon != s.tm_mon + || p->tm_mday != s.tm_mday + || p->tm_hour != s.tm_hour + || p->tm_min != s.tm_min + || p->tm_sec != s.tm_sec); } ]])], [gl_cv_func_tzset_clobber=no], [gl_cv_func_tzset_clobber=yes], [gl_cv_func_tzset_clobber=yes])]) - AC_DEFINE(HAVE_RUN_TZSET_TEST, 1, + AC_DEFINE([HAVE_RUN_TZSET_TEST], [1], [Define to 1 if you have run the test for working tzset.]) if test $gl_cv_func_tzset_clobber = yes; then gl_GETTIMEOFDAY_REPLACE_LOCALTIME - AC_DEFINE(tzset, rpl_tzset, + AC_DEFINE([tzset], [rpl_tzset], [Define to rpl_tzset if the wrapper function should be used.]) - AC_DEFINE(TZSET_CLOBBERS_LOCALTIME_BUFFER, 1, + AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1], [Define if tzset clobbers localtime's static buffer.]) fi ])