diff options
Diffstat (limited to 'lib/sys_select.in.h')
-rw-r--r-- | lib/sys_select.in.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index d584e4aea5e..1dacb21087d 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -103,9 +103,16 @@ /* Get definition of 'sigset_t'. But avoid namespace pollution on glibc systems and "unknown type name" problems on Cygwin. + On OS/2 kLIBC, sigset_t is defined in <sys/select.h>, too. In addition, + if <sys/param.h> is included, <types.h> -> <sys/types.h> -> <sys/select.h> + are included. Then <signal.h> -> <pthread.h> are included by GNULIB. By the + way, <pthread.h> requires PAGE_SIZE defined in <sys/param.h>. However, + <sys/param.h> has not been processed, yet. As a result, 'PAGE_SIZE' + undeclared error occurs in <pthread.h>. 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 __CYGWIN__) && !defined __UCLIBC__) +#if !((defined __GLIBC__ || defined __CYGWIN__ || defined __KLIBC__) \ + && !defined __UCLIBC__) # include <signal.h> #endif @@ -177,14 +184,14 @@ rpl_fd_isset (SOCKET fd, fd_set * set) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (close, "close() used without including <unistd.h>"); # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname gethostname_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (gethostname, "gethostname() used without including <unistd.h>"); # endif @@ -219,7 +226,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set) # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (socket, "socket() used without including <sys/socket.h>"); _GL_WARN_ON_USE (connect, |