From: KO Myung-Hun Date: Sun, 11 Oct 2020 11:30:32 +0000 (+0200) Subject: Fix "warning: implicit declaration of function 'pthread_sigmask'". X-Git-Tag: v1.0~3576 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=739f535bf836b25bb25e0494415be81389e77566;p=gnulib.git Fix "warning: implicit declaration of function 'pthread_sigmask'". * lib/signal.in.h [__KLIBC__]: Include . * lib/sys_select.in.h [__KLIBC__]: Do not include . --- diff --git a/ChangeLog b/ChangeLog index 2aba2b0c7d..5789d74055 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-10-11 KO Myung-Hun + + Fix "warning: implicit declaration of function 'pthread_sigmask'". + * lib/signal.in.h [__KLIBC__]: Include . + * lib/sys_select.in.h [__KLIBC__]: Do not include . + 2020-10-10 Bruno Haible *-list, *-oset, *-omap: Avoid possible compiler warnings. diff --git a/lib/signal.in.h b/lib/signal.in.h index c94b053d6a..70a2d4af6c 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -55,13 +55,13 @@ #ifndef _@GUARD_PREFIX@_SIGNAL_H #define _@GUARD_PREFIX@_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android - declare pthread_sigmask in , not in . +/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android, + OS/2 kLIBC declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \ && ((defined __APPLE__ && defined __MACH__) \ || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ - || defined __sun || defined __ANDROID__) \ + || defined __sun || defined __ANDROID__ || defined __KLIBC__) \ && ! defined __GLIBC__ # include #endif diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index d625d73e71..034b0f32f0 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 , too. In addition, + if is included, -> -> + are included. Then -> are included by GNULIB. By the + way, requires PAGE_SIZE defined in . However, + has not been processed, yet. As a result, 'PAGE_SIZE' + undeclared error occurs in . 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 #endif