Enforce that GETTIMEOFDAY_REPLACEMENT=0 is only expanded once.
authorBruno Haible <bruno@clisp.org>
Fri, 19 Jan 2007 02:04:14 +0000 (02:04 +0000)
committerBruno Haible <bruno@clisp.org>
Fri, 19 Jan 2007 02:04:14 +0000 (02:04 +0000)
ChangeLog
m4/sys_time_h.m4

index 6b66d4db7332d5423e785bc65d2eed4883af90da..a7e05a0f44df83979722e280bdc0163cfb4868d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-01-18  Bruno Haible  <bruno@clisp.org>
 
+       * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
+       gl_HEADER_SYS_TIME_H.
+       (gl_HEADER_SYS_TIME_H): New macro.
+
        * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
        HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
        * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
index 1943abf447621837713c05f5824c90538081e1f5..dbd60c3a2a64d8501388c3d993b744643b0bf5f4 100644 (file)
@@ -8,6 +8,14 @@
 # Written by Paul Eggert and Martin Lambers.
 
 AC_DEFUN([gl_HEADER_SYS_TIME_H],
+[
+  dnl Use AC_REQUIRE here, so that the GETTIMEOFDAY_REPLACEMENT=0 statement
+  dnl below is expanded once only, before all GETTIMEOFDAY_REPLACEMENT=1
+  dnl statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
 [
   AC_REQUIRE([AC_C_RESTRICT])
   AC_CHECK_HEADERS_ONCE([sys/time.h])