diff options
author | Eric Blake <eblake@redhat.com> | 2010-02-22 09:00:06 -0700 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2010-02-22 16:00:59 -0700 |
commit | aff170b49eab9693cdeaf5cc3559f5c64bfdf4c9 (patch) | |
tree | 9b329a80f9150c161a79f5dff94ba98d3ba190e8 /m4/sys_time_h.m4 | |
parent | 56ba8a8e50d7dfb086fd3bb95e5542b1929e96a6 (diff) | |
download | gnulib-aff170b49eab9693cdeaf5cc3559f5c64bfdf4c9.tar.gz |
gettimeofday: restore support for platforms that lack function
Fixes a regression from 2010-02-04, commit de4d0a3.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Also compile
replacement if function is missing.
* m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): New witness.
* modules/sys_time (Makefile.am): Substitute it.
* lib/sys_time.in.h (gettimeofday): Check it.
Reported by Michael Goffioul.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'm4/sys_time_h.m4')
-rw-r--r-- | m4/sys_time_h.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index b14bc4ba2b..be6d7ecbfa 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,5 +1,5 @@ # Configure a replacement for <sys/time.h>. -# serial 3 +# serial 4 # Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -63,6 +63,7 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], [ GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) dnl Assume POSIX behavior unless another module says otherwise. + HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) |