X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fsys_time_h.m4;h=064e0deeb7d6b1faba8ceee225b21915079d6dd5;hb=a4ed524753cd61bd2c52b9af041eabe83ea1d503;hp=da5752716344679a9343b7c14b62a5e771a6d582;hpb=fb480c11cabf8b1b2f3601a6930037f992b7ceed;p=gnulib.git diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index da5752716..064e0deeb 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for . -# serial 6 +# serial 7 -# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -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 + 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 #endif #include + #if HAVE_WINSOCK2_H + # include + #endif ]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], [gl_cv_sys_struct_timeval=yes],