# HG changeset patch # User Paolo Bonzini # Date 1222682555 -7200 # Node ID 93e5702f13447119d9e3713eafe1a4700ab3966b # Parent d75f2a61b4f9a35945e7ae1f65ec30494350fc6b strengthen self-containedness check for sys/select.h 2008-09-29 Paolo Bonzini Bruno Haible * lib/sys_select.in.h: Include sys/time.h. * m4/sys_select.h.m4: Test that struct timeval is fully defined. * modules/sys_select: Depend on sys_time. * tests/test-sys_select.c: Test that sys/select.h defines struct timeval fully. diff -r d75f2a61b4f9 -r 93e5702f1344 ChangeLog --- a/ChangeLog Mon Sep 29 12:08:01 2008 +0200 +++ b/ChangeLog Mon Sep 29 12:02:35 2008 +0200 @@ -1,3 +1,12 @@ +2008-09-29 Paolo Bonzini + Bruno Haible + + * lib/sys_select.in.h: Include sys/time.h. + * m4/sys_select.h.m4: Test that struct timeval is fully defined. + * modules/sys_select: Depend on sys_time. + * tests/test-sys_select.c: Test that sys/select.h defines struct + timeval fully. + 2008-09-29 Bruno Haible * lib/sys_socket.in.h: Wrap the definitions in 'extern "C"'. diff -r d75f2a61b4f9 -r 93e5702f1344 lib/sys_select.in.h --- a/lib/sys_select.in.h Mon Sep 29 12:08:01 2008 +0200 +++ b/lib/sys_select.in.h Mon Sep 29 12:02:35 2008 +0200 @@ -25,6 +25,10 @@ . */ # include +/* On OSF/1 4.0, provides only a forward declaration + of 'struct timeval', and no definition of this type.. */ +# include + /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ diff -r d75f2a61b4f9 -r 93e5702f1344 m4/sys_select_h.m4 --- a/m4/sys_select_h.m4 Mon Sep 29 12:08:01 2008 +0200 +++ b/m4/sys_select_h.m4 Mon Sep 29 12:02:35 2008 +0200 @@ -10,7 +10,8 @@ AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_select_h_selfcontained], [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct timeval b;]])], [gl_cv_header_sys_select_h_selfcontained=yes], [gl_cv_header_sys_select_h_selfcontained=no]) ]) diff -r d75f2a61b4f9 -r 93e5702f1344 modules/sys_select --- a/modules/sys_select Mon Sep 29 12:08:01 2008 +0200 +++ b/modules/sys_select Mon Sep 29 12:02:35 2008 +0200 @@ -10,6 +10,7 @@ alloca include_next sys_socket +sys_time configure.ac: gl_HEADER_SYS_SELECT diff -r d75f2a61b4f9 -r 93e5702f1344 tests/test-sys_select.c --- a/tests/test-sys_select.c Mon Sep 29 12:08:01 2008 +0200 +++ b/tests/test-sys_select.c Mon Sep 29 12:02:35 2008 +0200 @@ -19,10 +19,13 @@ #include +#include + +/* Check that the 'struct timeval' type is defined. */ +struct timeval t1; + #include #include -#include -#include #include #include #include