comparison lib/sys_select.in.h @ 17303:0e38241a3d05

sys_time: port to Solaris 2.6 There is 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. Problem reported by Tom G. Christensen in <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00113.html>. * lib/sys_select.in.h: Treat Solaris 2.6's problem with <sys/time.h> and <sys/types.h> like OSF/1's similar problem. * lib/sys_time.in.h: Redo to resemble sys_select.in.h, which uses split double-inclusion guards.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 30 Jan 2013 21:26:44 -0800
parents e542fd46ad6f
children 5a51fb7777a9
comparison
equal deleted inserted replaced
17302:0e5a583a2a8d 17303:0e38241a3d05
17 # if __GNUC__ >= 3 17 # if __GNUC__ >= 3
18 @PRAGMA_SYSTEM_HEADER@ 18 @PRAGMA_SYSTEM_HEADER@
19 # endif 19 # endif
20 @PRAGMA_COLUMNS@ 20 @PRAGMA_COLUMNS@
21 21
22 /* On OSF/1, <sys/types.h> and <sys/time.h> include <sys/select.h>. 22 /* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
23 both include <sys/select.h>.
23 Simply delegate to the system's header in this case. */ 24 Simply delegate to the system's header in this case. */
24 #if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE 25 #if (@HAVE_SYS_SELECT_H@ \
26 && ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \
27 || (defined __sun && defined _SYS_TYPES_H \
28 && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
29 || defined __EXTENSIONS__))) \
30 && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H)
25 31
26 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H 32 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
27 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ 33 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
28 34
29 #elif @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TIME_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) && defined _OSF_SOURCE 35 #elif (@HAVE_SYS_SELECT_H@ \
36 && ((defined __osf__ && defined _SYS_TIME_H_ && defined _OSF_SOURCE) \
37 || (defined __sun && defined _SYS_TIME_H \
38 && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
39 || defined __EXTENSIONS__))) \
40 && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H)
30 41
31 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H 42 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
32 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ 43 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
33 44
34 /* On IRIX 6.5, <sys/timespec.h> includes <sys/types.h>, which includes 45 /* On IRIX 6.5, <sys/timespec.h> includes <sys/types.h>, which includes