aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert2012-07-06 03:08:57 +0000
committerPaul Eggert2012-07-06 03:08:57 +0000
commit7dca65a4b4ff280171df473557d5fc0f98540200 (patch)
treeb703e6a714e38b3f4f0328f7dd095c15f3c8912e /m4
parent8c6c57ea627f1d32ec1564fc86851974b19f1cb8 (diff)
downloademacs-7dca65a4b4ff280171df473557d5fc0f98540200.tar.gz
emacs-7dca65a4b4ff280171df473557d5fc0f98540200.zip
Port to OpenBSD 5.1 amd64.
Diffstat (limited to 'm4')
-rw-r--r--m4/sys_time_h.m48
1 files changed, 6 insertions, 2 deletions
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index 26eaf8ea7f3..c4a30cda777 100644
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -52,7 +52,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
52 dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only 52 dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
53 dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is 53 dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
54 dnl smaller than the 'time_t' type mandated by POSIX. 54 dnl smaller than the 'time_t' type mandated by POSIX.
55 AC_CACHE_CHECK([for correct struct timeval.tv_sec member], 55 dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but
56 dnl that is good enough.
57 AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member],
56 [gl_cv_sys_struct_timeval_tv_sec], 58 [gl_cv_sys_struct_timeval_tv_sec],
57 [AC_COMPILE_IFELSE( 59 [AC_COMPILE_IFELSE(
58 [AC_LANG_PROGRAM( 60 [AC_LANG_PROGRAM(
@@ -65,7 +67,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
65 #endif 67 #endif
66 ]], 68 ]],
67 [[static struct timeval x; 69 [[static struct timeval x;
68 typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1]; 70 typedef int verify_tv_sec_type[
71 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
72 ];
69 ]])], 73 ]])],
70 [gl_cv_sys_struct_timeval_tv_sec=yes], 74 [gl_cv_sys_struct_timeval_tv_sec=yes],
71 [gl_cv_sys_struct_timeval_tv_sec=no]) 75 [gl_cv_sys_struct_timeval_tv_sec=no])