bug-gnulib
[Top][All Lists]
Advanced

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

Re: Build errors on Solaris 2.6 & 7


From: Paul Eggert
Subject: Re: Build errors on Solaris 2.6 & 7
Date: Sat, 19 Jan 2013 19:14:30 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

OK, thanks for the additional information.

How about the following patch instead?  It relies on <sys/types.h>
including <sys/select.h> if and only if
!defined __XOPEN_OR_POSIX || defined __EXTENSIONS__.
This last expression is something I picked up on Solaris 10,
and I'm hoping it's also good for Solaris 2.6.

---
 ChangeLog           | 14 ++++++++++++++
 lib/sys_select.in.h |  7 ++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8218eb3..f53aca5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-01-19  Paul Eggert  <address@hidden>
+
+       sys_select: port to Solaris 2.6
+       * lib/sys_select.in.h: Break a circularity problem on Solaris 2.6,
+       where <time.h> includes <sys/time.h> for struct timespec.
+       The include nesting is gnulib <time.h>, system <time.h>, gnulib
+       <sys/time.h>, system <sys/time.h>, gnulib <sys/types.h>, system
+       <sys/types.h>, gnulib <sys/select.h>, gnulib <signal.h>, system
+       <sys/signal.h>, system <sys/siginfo.h>; the last, innermost file
+       needs struct timestruc_t, which is defined in <sys/time.h>, which
+       has not been fully parsed.  Solve this problem the same way it was
+       solved on OSF/1.  Problem reported by Tom G. Christensen in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00113.html>.
+
 2013-01-16  Paul Eggert  <address@hidden>
 
        unistd: port to recent mingw
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index b48c1bb..60291ed 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -20,8 +20,13 @@
 @PRAGMA_COLUMNS@
 
 /* On OSF/1, <sys/types.h> and <sys/time.h> include <sys/select.h>.
+   On Solaris 2.6, <sys/types.h> includes <sys/select.h>.
    Simply delegate to the system's header in this case.  */
-#if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && 
!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE
+#if (@HAVE_SYS_SELECT_H@                                                \
+     && ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \
+         || (defined __sun && defined _SYS_TYPES_H                      \
+             && (!defined __XOPEN_OR_POSIX || defined __EXTENSIONS__))) \
+     && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H)
 
 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
-- 
1.7.11.7





reply via email to

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