Mercurial > hg > octave-lyh > gnulib-hg
changeset 7902:5fa14d8c0b45
Replace HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME
with GETTIMEOFDAY_REPLACEMENT.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 19 Jan 2007 02:00:37 +0000 |
parents | 1b1117096a35 |
children | 42e2f1ada185 |
files | ChangeLog lib/sys_time_.h m4/gettimeofday.m4 m4/sys_time_h.m4 modules/sys_time |
diffstat | 5 files changed, 19 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2007-01-18 Bruno Haible <bruno@clisp.org> + * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of + HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME. + * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY, + gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of + HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME. + * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize + GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE + and GETTIMEOFDAY_CLOBBERS_LOCALTIME. + * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT + instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and + GETTIMEOFDAY_CLOBBERS_LOCALTIME. + * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the last change; it caused a compilation error when cross-compiling to Cygwin.
--- a/lib/sys_time_.h +++ b/lib/sys_time_.h @@ -35,7 +35,7 @@ }; #endif -#if ! @HAVE_GETTIMEOFDAY_POSIX_SIGNATURE@ || @GETTIMEOFDAY_CLOBBERS_LOCALTIME@ +#if @GETTIMEOFDAY_REPLACEMENT@ # undef gettimeofday # define gettimeofday rpl_gettimeofday int gettimeofday (struct timeval *restrict, void *restrict);
--- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,4 +1,4 @@ -#serial 10 +#serial 11 # Copyright (C) 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -31,7 +31,7 @@ gl_FUNC_GETTIMEOFDAY_CLOBBER if test $gl_cv_func_gettimeofday_posix_signature != yes; then - HAVE_GETTIMEOFDAY_POSIX_SIGNATURE=0 + GETTIMEOFDAY_REPLACEMENT=1 if test $gl_cv_func_gettimeofday_clobber != yes; then AC_LIBOBJ(gettimeofday) gl_PREREQ_GETTIMEOFDAY @@ -76,8 +76,8 @@ [gl_cv_func_gettimeofday_clobber=yes])]) if test $gl_cv_func_gettimeofday_clobber = yes; then + GETTIMEOFDAY_REPLACEMENT=1 gl_GETTIMEOFDAY_REPLACE_LOCALTIME - GETTIMEOFDAY_CLOBBERS_LOCALTIME=1 AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], 1, [Define if gettimeofday clobbers the localtime buffer.]) fi
--- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -42,8 +42,6 @@ AC_SUBST([HAVE_STRUCT_TIMEVAL]) dnl Assume POSIX behavior unless another module says otherwise. - HAVE_GETTIMEOFDAY_POSIX_SIGNATURE=1 - AC_SUBST([HAVE_GETTIMEOFDAY_POSIX_SIGNATURE]) - GETTIMEOFDAY_CLOBBERS_LOCALTIME=0 - AC_SUBST([GETTIMEOFDAY_CLOBBERS_LOCALTIME]) + GETTIMEOFDAY_REPLACEMENT=0 + AC_SUBST([GETTIMEOFDAY_REPLACEMENT]) ])
--- a/modules/sys_time +++ b/modules/sys_time @@ -23,8 +23,7 @@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''ABSOLUTE_SYS_TIME_H''@|$(ABSOLUTE_SYS_TIME_H)|g' \ - -e 's/@''GETTIMEOFDAY_CLOBBERS_LOCALTIME''@/$(GETTIMEOFDAY_CLOBBERS_LOCALTIME)/g' \ - -e 's/@''HAVE_GETTIMEOFDAY_POSIX_SIGNATURE''@/$(HAVE_GETTIMEOFDAY_POSIX_SIGNATURE)/g' \ + -e 's/@''GETTIMEOFDAY_REPLACEMENT''@/$(GETTIMEOFDAY_REPLACEMENT)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ < $(srcdir)/sys_time_.h; \ } > $@-t