]> code.delx.au - gnu-emacs/commitdiff
Merge from gnulib.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 24 Mar 2013 00:49:50 +0000 (17:49 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 24 Mar 2013 00:49:50 +0000 (17:49 -0700)
ChangeLog
lib/sys_select.in.h
lib/sys_time.in.h

index f8ee8d441ca1eac171dea56a69e3fe988131d157..d6626d4df10fb9c2c111f19cbe8ea819c81b4f2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2013-03-21 sys_select, sys_time: port 2013-01-30 fix to Cygwin
+
 2013-03-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix bug when building Emacs with a GNU Make submake (Bug#13962).
index 521ccef321dc2fd7f4f5547484a86452978ac689..2af6bfe6f6fbff102af6c235931b26eb309f2674 100644 (file)
 
 /* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
    both include <sys/select.h>.
+   On Cygwin, <sys/time.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 _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@
index 656c3f13ad272f236f64353a79f3c136249f5964..3dbf63206675daa06604ae219ca994a8862f1ee1 100644 (file)
 #endif
 @PRAGMA_COLUMNS@
 
+/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
+   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 <sys/time.h>.  */
+#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 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
 #endif
 
 #endif /* _@GUARD_PREFIX@_SYS_TIME_H */
+#endif /* _CYGWIN_SYS_TIME_H */
 #endif /* _@GUARD_PREFIX@_SYS_TIME_H */