X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgettimeofday.m4;h=f48ef4365cd7f3c205bc944b8d9bc47306898bea;hb=23eecb48e39afd0d267d64d40ba6bf97aa865e13;hp=2e65eb5c1be0ed0e776029a6537d656e5ffcbb13;hpb=b2234a55a9065eeb2aba8d26706c63facd34f3ef;p=gnulib.git diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index 2e65eb5c1..f48ef4365 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,6 +1,6 @@ -# serial 19 +# serial 21 -# Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 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. @@ -56,14 +56,16 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict); fi m4_ifdef([gl_FUNC_TZSET_CLOBBER], [ gl_FUNC_TZSET_CLOBBER - if test $gl_cv_func_tzset_clobber = yes; then - REPLACE_GETTIMEOFDAY=1 - 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 + case "$gl_cv_func_tzset_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + 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.]) + ;; + esac ]) fi AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], @@ -125,10 +127,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], ]) AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ - AC_DEFINE([gmtime], [rpl_gmtime], - [Define to rpl_gmtime if the replacement function should be used.]) - AC_DEFINE([localtime], [rpl_localtime], - [Define to rpl_localtime if the replacement function should be used.]) + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 ]) # Prerequisites of lib/gettimeofday.c.