summaryrefslogtreecommitdiff
path: root/m4/sys_time_h.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-10-22 16:24:32 +0200
committerLudovic Courtès <ludo@gnu.org>2011-10-22 16:24:32 +0200
commit35428fb6b2d269dbfa2eec7d0739aec149bd4cc2 (patch)
tree03146c5871ad9b2167f3dffc89fdbb3082d7fc4e /m4/sys_time_h.m4
parentfe4ea6859e7d19a0fe2694a3fb49f4abb722afc1 (diff)
downloadguile-35428fb6b2d269dbfa2eec7d0739aec149bd4cc2.tar.gz
Update Gnulib to v0.0-6523-gb3609c1.
Diffstat (limited to 'm4/sys_time_h.m4')
-rw-r--r--m4/sys_time_h.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index 3a3adc8c4..064e0deeb 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 6
+# serial 7
# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -27,6 +27,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
HAVE_SYS_TIME_H=0
fi
+ dnl On native Windows with MSVC, 'struct timeval' is defined in <winsock2.h>
+ dnl only. So include that header in the list.
+ gl_PREREQ_SYS_H_WINSOCK2
AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
@@ -34,6 +37,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
#include <sys/time.h>
#endif
#include <time.h>
+ #if HAVE_WINSOCK2_H
+ # include <winsock2.h>
+ #endif
]],
[[static struct timeval x; x.tv_sec = x.tv_usec;]])],
[gl_cv_sys_struct_timeval=yes],