sys_select: Avoid syntax error on OpenBSD 5.0.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 13:50:20 +0000 (14:50 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 13:50:20 +0000 (14:50 +0100)
* lib/sys_select.in.h: Include <signal.h> only after the include_next
<sys/select.h>, not before.
Reported by Jiri B <jirib@devio.us>.

ChangeLog
lib/sys_select.in.h

index 11b6e70..26c317e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-02-04  Bruno Haible  <bruno@clisp.org>
 
+       sys_select: Avoid syntax error on OpenBSD 5.0.
+       * lib/sys_select.in.h: Include <signal.h> only after the include_next
+       <sys/select.h>, not before.
+       Reported by Jiri B <jirib@devio.us>.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
        get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
        * tests/test-get-rusage-as.c (main): Assign the malloc() results to
        global variables.
index 5311f43..96edb3d 100644 (file)
    in <signal.h> where it belongs.  */
 #include <sys/types.h>
 
-/* Get definition of 'sigset_t'.
-   But avoid namespace pollution on glibc systems.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <signal.h>
-#endif
-
 #if @HAVE_SYS_SELECT_H@
 
 /* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
 
 #endif
 
+/* Get definition of 'sigset_t'.
+   But avoid namespace pollution on glibc systems.
+   Do this after the include_next (for the sake of OpenBSD 5.0) but before
+   the split double-inclusion guard (for the sake of Solaris).  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <signal.h>
+#endif
+
 #ifndef _@GUARD_PREFIX@_SYS_SELECT_H
 #define _@GUARD_PREFIX@_SYS_SELECT_H