Tim Rühsen wrote: > > It looks like there is a definition > > #define pthread_sigmask(how,newmask,oldmask) 0 > > somewhere. Gnulib does not contain such a definition of pthread_sigmask. > > Therefore I guess that it comes from the mingw header files. How does > > the definition/declaration of pthread_sigmask look like, in the mingw header > > files? > > Content of /usr/share/mingw-w64/include/pthread_signal.h: > > #ifndef WIN_PTHREADS_SIGNAL_H > #define WIN_PTHREADS_SIGNAL_H > > /* Windows has rudimentary signals support. */ > #define pthread_sigmask(H, S1, S2) 0 > > #endif /* WIN_PTHREADS_SIGNAL_H */
Thanks, it's clear now. This patch is similar to how we treat similar situations for 'dirfd' and 'strdup'. 2018-01-04 Bruno Haible <br...@clisp.org> pthread_sigmask: Avoid compilation error on mingw. Reported by Tim Rühsen <tim.rueh...@gmx.de>. * lib/signal.in.h (pthread_sigmask): Don't declare it it's defined as a macro. diff --git a/lib/signal.in.h b/lib/signal.in.h index 483413d..7d4927b 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -137,7 +137,7 @@ _GL_FUNCDECL_RPL (pthread_sigmask, int, _GL_CXXALIAS_RPL (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # else -# if !@HAVE_PTHREAD_SIGMASK@ +# if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask) _GL_FUNCDECL_SYS (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # endif