[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <sys/select.h> on OSF/1

From: Paolo Bonzini
Subject: Re: <sys/select.h> on OSF/1
Date: Mon, 29 Sep 2008 12:01:47 +0200
User-agent: Thunderbird (Macintosh/20080914)

Simon Josefsson wrote:
> Bruno Haible <address@hidden> writes:
>> On OSF/1 4.0, <sys/select.h> exists but provides only a forward declaration
>> of 'struct timeval', no definition of this type.
> Sigh.  So it seems we need a sys_select header module and a separate
> select function after all: someone might want to get the 'struct
> timeval' structure out of sys/select.h without calling the select
> function.

I don't think so.  It just means that the "self-containedness" test of
sys/select.h fails by mistake.

What about this patch?  Bruno, can you give it a try on OSF/1?

2008-09-29  Paolo Bonzini  <address@hidden>

        * 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.

diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index 255c02f..396f209 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -25,6 +25,10 @@
    <sys/types.h>.  */
 # include <sys/types.h>
+/* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
+   of 'struct timeval', and no definition of this type..  */
+# include <sys/time.h>
 /* The include_next requires a split double-inclusion guard.  */
diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4
index f9468af..865a414 100644
--- a/m4/sys_select_h.m4
+++ b/m4/sys_select_h.m4
@@ -10,7 +10,8 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
   AC_CACHE_CHECK([whether <sys/select.h> is self-contained],
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]], [[]])],
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]],
+                                        [[struct timeval b;]])],
diff --git a/modules/sys_select b/modules/sys_select
index f2f7698..4f13917 100644
--- a/modules/sys_select
+++ b/modules/sys_select
@@ -10,6 +10,7 @@ Depends-on:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]