X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Fsys_time_h.m4;fp=m4%2Fsys_time_h.m4;h=0ac71ac5e9bc72aedc56a9013d2c6e7eb140b317;hb=d57728a6ca2413a7c564d8b7bb13d9e5a5a180f3;hp=26eaf8ea7f30d50c2fe300eab823e510f1dd4028;hpb=dc84183747ce1703eb99685b5dbde1f65a143c06;p=debian%2Fgzip diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index 26eaf8e..0ac71ac 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for . # serial 8 -# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2013 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. @@ -52,7 +52,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], dnl (in and for mingw64, in only dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is dnl smaller than the 'time_t' type mandated by POSIX. - AC_CACHE_CHECK([for correct struct timeval.tv_sec member], + dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but + dnl that is good enough. + AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member], [gl_cv_sys_struct_timeval_tv_sec], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( @@ -65,7 +67,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], #endif ]], [[static struct timeval x; - typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1]; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; ]])], [gl_cv_sys_struct_timeval_tv_sec=yes], [gl_cv_sys_struct_timeval_tv_sec=no])