]> Savannah Git Hosting - gnulib.git/commitdiff
* lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
authorBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 13:56:18 +0000 (14:56 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 13:56:18 +0000 (14:56 +0100)
currently being included, just include the system's <sys/select.h>.

2012-02-04  Bruno Haible  <bruno@clisp.org>

sys_select: Avoid syntax error on OpenBSD 5.0.

ChangeLog
lib/sys_select.in.h

index 26c317e7711ee5b84933c33487fa6b7817b39cfe..b0b03aef81e0a23aa4c46653dc05abfde2ff70c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+       sys_select: Avoid syntax error on OpenBSD 5.0.
+       * lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
+       currently being included, just include the system's <sys/select.h>.
+
 2012-02-04  Bruno Haible  <bruno@clisp.org>
 
        sys_select: Avoid syntax error on OpenBSD 5.0.
index 96edb3ddde13b775124bd9a2367b307cbc58e757..e002843f346c315f1c944f0d4748c88dfd88d5c6 100644 (file)
 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H
 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
 
+/* On OpenBSD 5.0, <pthread.h> includes <sys/types.h>, which includes
+   <sys/select.h>.  At this point we cannot include <signal.h>, because that
+   includes gnulib's pthread.h override, which gives a syntax error because
+   /usr/include/pthread.h has not been completely processed.  Simply delegate
+   to the system's header in this case.  */
+#elif @HAVE_SYS_SELECT_H@ && defined __OpenBSD__ && (defined _PTHREAD_H_ && !defined PTHREAD_MUTEX_INITIALIZER)
+
+# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
+
 #else
 
 #ifndef _@GUARD_PREFIX@_SYS_SELECT_H