# HG changeset patch # User Paul Eggert # Date 1363709327 25200 # Node ID 5a51fb7777a9950502965a043a70bd6ca5e0498b # Parent 7a2e583edf71c1983f4aa14bab4d646bee4cda7f sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in . * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system in this case. diff -r 7a2e583edf71 -r 5a51fb7777a9 ChangeLog --- a/ChangeLog Tue Mar 19 10:47:12 2013 -0700 +++ b/ChangeLog Tue Mar 19 09:08:47 2013 -0700 @@ -1,3 +1,16 @@ +2013-03-21 Paul Eggert + + sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin + Problem reported by Marco Atzeri in + . + * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: + Simply delegate to the system in this case too. + Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only + if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to + be needed on Solaris either. + * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: + Simply delgate to the system in this case. + 2013-03-19 Karl Berry * build-aux/gnupload: check for erroneous (with gnupload) use of diff -r 7a2e583edf71 -r 5a51fb7777a9 lib/sys_select.in.h --- a/lib/sys_select.in.h Tue Mar 19 10:47:12 2013 -0700 +++ b/lib/sys_select.in.h Tue Mar 19 09:08:47 2013 -0700 @@ -21,23 +21,27 @@ /* On OSF/1 and Solaris 2.6, and both include . + On Cygwin, includes . Simply delegate to the system's header in this case. */ #if (@HAVE_SYS_SELECT_H@ \ - && ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \ + && ((defined __osf__ && defined _SYS_TYPES_H_ \ + && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \ + && defined _OSF_SOURCE) \ || (defined __sun && defined _SYS_TYPES_H \ && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ - || defined __EXTENSIONS__))) \ - && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) + || defined __EXTENSIONS__)))) # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #elif (@HAVE_SYS_SELECT_H@ \ - && ((defined __osf__ && defined _SYS_TIME_H_ && defined _OSF_SOURCE) \ + && (defined _CYGWIN_SYS_TIME_H \ + || (defined __osf__ && defined _SYS_TIME_H_ \ + && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \ + && defined _OSF_SOURCE) \ || (defined __sun && defined _SYS_TIME_H \ && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ - || defined __EXTENSIONS__))) \ - && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) + || defined __EXTENSIONS__)))) # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ diff -r 7a2e583edf71 -r 5a51fb7777a9 lib/sys_time.in.h --- a/lib/sys_time.in.h Tue Mar 19 10:47:12 2013 -0700 +++ b/lib/sys_time.in.h Tue Mar 19 09:08:47 2013 -0700 @@ -24,6 +24,14 @@ #endif @PRAGMA_COLUMNS@ +/* On Cygwin, includes itself recursively via . + Simply delegate to the system's header in this case; it is a no-op. + Without this extra ifdef, the C++ gettimeofday declaration below + would be a forward declaration in gnulib's nested . */ +#ifdef _CYGWIN_SYS_TIME_H +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#else + /* The include_next requires a split double-inclusion guard. */ #if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ @@ -200,4 +208,5 @@ #endif #endif /* _@GUARD_PREFIX@_SYS_TIME_H */ +#endif /* _CYGWIN_SYS_TIME_H */ #endif /* _@GUARD_PREFIX@_SYS_TIME_H */