# HG changeset patch # User Bruno Haible # Date 1270315993 -7200 # Node ID 5735734700f225334c41b3b4996bfa7a1151b7e0 # Parent 3a2049062a71f6caf65ae9fcfb6502feff19e4b8 timegm: Assume declaration if function exists. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-03 Bruno Haible + + timegm: Assume declaration if function exists. + * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume timegm is declared if and only + if it exists. Don't clobber ac_cv_func_timegm. + 2010-04-03 Bruno Haible time_r: Fix C++ test error on mingw. diff --git a/m4/timegm.m4 b/m4/timegm.m4 --- a/m4/timegm.m4 +++ b/m4/timegm.m4 @@ -1,4 +1,4 @@ -# timegm.m4 serial 6 +# timegm.m4 serial 7 dnl Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,18 +8,18 @@ [ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MKTIME]) + REPLACE_TIMEGM=0 if test $ac_cv_func_working_mktime = no; then # Assume that timegm is buggy if mktime is. - AC_LIBOBJ([timegm]) - ac_cv_func_timegm=no + REPLACE_TIMEGM=1 else - AC_REPLACE_FUNCS([timegm]) - fi - REPLACE_TIMEGM=1 - if test $ac_cv_func_timegm = yes; then - AC_CHECK_DECLS([timegm], [REPLACE_TIMEGM=0], [], [#include ]) + AC_CHECK_FUNCS([timegm]) + if test $ac_cv_func_timegm != yes; then + REPLACE_TIMEGM=1 + fi fi if test $REPLACE_TIMEGM = 1; then + AC_LIBOBJ([timegm]) gl_PREREQ_TIMEGM fi ])