X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ftimegm.m4;h=ca903b1afce2b9b75c293836af794489e85208e4;hb=7d5d77e65684de1c65c74c1b1d87a6c4f591b045;hp=82e9d66be461147fc98ffdcd484fe95a13ad5cad;hpb=44d7c1c1f004fa9bfb8ec3948de2671a7958cf5b;p=gnulib.git diff --git a/m4/timegm.m4 b/m4/timegm.m4 index 82e9d66be..ca903b1af 100644 --- a/m4/timegm.m4 +++ b/m4/timegm.m4 @@ -1,11 +1,12 @@ -# timegm.m4 serial 3 -dnl Copyright (C) 2003 Free Software Foundation, Inc. +# timegm.m4 serial 5 +dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_TIMEGM], [ + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MKTIME]) if test $ac_cv_func_working_mktime = no; then # Assume that timegm is buggy if mktime is. @@ -14,11 +15,13 @@ AC_DEFUN([gl_FUNC_TIMEGM], else AC_REPLACE_FUNCS(timegm) fi - if test $ac_cv_func_timegm = no; then + REPLACE_TIMEGM=1 + if test $ac_cv_func_timegm = yes; then + AC_CHECK_DECLS([timegm], [REPLACE_TIMEGM=0], [], [#include ]) + fi + if test $REPLACE_TIMEGM = 1; then gl_PREREQ_TIMEGM fi - - AC_CHECK_DECLS([timegm], , , [#include ]) ]) # Prerequisites of lib/timegm.c.