X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ftzset.m4;h=cef0d02e6425ee339f02614049aa1ffbe51f4433;hb=c43cc7b973f4daf0c59368ae52e130dfd12ce8d6;hp=28ad00f797d7229169830f381b9b5999fc7a5ff8;hpb=d599e5add275f75ed08e6527b8ee4d3f4f7c3aea;p=gnulib.git diff --git a/m4/tzset.m4 b/m4/tzset.m4 index 28ad00f79..cef0d02e6 100644 --- a/m4/tzset.m4 +++ b/m4/tzset.m4 @@ -1,6 +1,6 @@ -# serial 4 +# serial 7 -# Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2003, 2007, 2009-2014 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. @@ -13,9 +13,14 @@ # Written by Paul Eggert and Jim Meyering. +# A placeholder to ensure that this m4 file gets included by aclocal. +AC_DEFUN([gl_FUNC_TZSET], []) + +# Set gl_cv_func_tzset_clobber. AC_DEFUN([gl_FUNC_TZSET_CLOBBER], [ AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether tzset clobbers localtime buffer], gl_cv_func_tzset_clobber, [ @@ -43,17 +48,14 @@ main () ]])], [gl_cv_func_tzset_clobber=no], [gl_cv_func_tzset_clobber=yes], - [gl_cv_func_tzset_clobber=yes])]) + [case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_tzset_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_tzset_clobber="guessing yes" ;; + esac + ])]) 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], - [Define to rpl_tzset if the wrapper function should be used.]) - AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1], - [Define if tzset clobbers localtime's static buffer.]) - fi ])