aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2013-03-23 17:49:50 -0700
committerPaul Eggert2013-03-23 17:49:50 -0700
commitf8ce376ec852149b64afa282860ec778a4fec328 (patch)
treef416a25935d27db63863c92ffe08b1ecb40ee8e1 /lib
parent789b5e9a7fa4c94364ddd6da7b22ecb9d1620477 (diff)
downloademacs-f8ce376ec852149b64afa282860ec778a4fec328.tar.gz
emacs-f8ce376ec852149b64afa282860ec778a4fec328.zip
Merge from gnulib.
Diffstat (limited to 'lib')
-rw-r--r--lib/sys_select.in.h16
-rw-r--r--lib/sys_time.in.h9
2 files changed, 19 insertions, 6 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index 521ccef321d..2af6bfe6f6f 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -21,23 +21,27 @@
21 21
22/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h> 22/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
23 both include <sys/select.h>. 23 both include <sys/select.h>.
24 On Cygwin, <sys/time.h> includes <sys/select.h>.
24 Simply delegate to the system's header in this case. */ 25 Simply delegate to the system's header in this case. */
25#if (@HAVE_SYS_SELECT_H@ \ 26#if (@HAVE_SYS_SELECT_H@ \
26 && ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \ 27 && ((defined __osf__ && defined _SYS_TYPES_H_ \
28 && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
29 && defined _OSF_SOURCE) \
27 || (defined __sun && defined _SYS_TYPES_H \ 30 || (defined __sun && defined _SYS_TYPES_H \
28 && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ 31 && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
29 || defined __EXTENSIONS__))) \ 32 || defined __EXTENSIONS__))))
30 && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H)
31 33
32# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H 34# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
33# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ 35# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
34 36
35#elif (@HAVE_SYS_SELECT_H@ \ 37#elif (@HAVE_SYS_SELECT_H@ \
36 && ((defined __osf__ && defined _SYS_TIME_H_ && defined _OSF_SOURCE) \ 38 && (defined _CYGWIN_SYS_TIME_H \
39 || (defined __osf__ && defined _SYS_TIME_H_ \
40 && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
41 && defined _OSF_SOURCE) \
37 || (defined __sun && defined _SYS_TIME_H \ 42 || (defined __sun && defined _SYS_TIME_H \
38 && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ 43 && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
39 || defined __EXTENSIONS__))) \ 44 || defined __EXTENSIONS__))))
40 && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H)
41 45
42# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H 46# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
43# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ 47# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
index 656c3f13ad2..3dbf6320667 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -24,6 +24,14 @@
24#endif 24#endif
25@PRAGMA_COLUMNS@ 25@PRAGMA_COLUMNS@
26 26
27/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
28 Simply delegate to the system's header in this case; it is a no-op.
29 Without this extra ifdef, the C++ gettimeofday declaration below
30 would be a forward declaration in gnulib's nested <sys/time.h>. */
31#ifdef _CYGWIN_SYS_TIME_H
32# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
33#else
34
27/* The include_next requires a split double-inclusion guard. */ 35/* The include_next requires a split double-inclusion guard. */
28#if @HAVE_SYS_TIME_H@ 36#if @HAVE_SYS_TIME_H@
29# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ 37# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
@@ -200,4 +208,5 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
200#endif 208#endif
201 209
202#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ 210#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
211#endif /* _CYGWIN_SYS_TIME_H */
203#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ 212#endif /* _@GUARD_PREFIX@_SYS_TIME_H */