bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't compile on Windows


From: Bruno Haible
Subject: Re: Can't compile on Windows
Date: Mon, 06 May 2019 10:18:52 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; )

Redirecting to bug-gnulib.

Michele Locati wrote in
<https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00061.html>:

> > > i686-w64-mingw32.shared-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I.
> > > -I/home/m/build-gettext-windows/shared-32/source/gettext-0.20-rc1/gettext-tools/gnulib-tests
> > > -I..  -DIN_GETTEXT_TOOLS_GNULIB_TESTS=1 -I.
> > > -I/home/m/build-gettext-windows/shared-32/source/gettext-0.20-rc1/gettext-tools/gnulib-tests
> > > -I.. 
> > > -I/home/m/build-gettext-windows/shared-32/source/gettext-0.20-rc1/gettext-tools/gnulib-tests/..
> > > -I../gnulib-lib
> > > -I/home/m/build-gettext-windows/shared-32/source/gettext-0.20-rc1/gettext-tools/gnulib-tests/../gnulib-lib
> > > -I../intl 
> > > -I/home/m/build-gettext-windows/shared-32/compiled/gettext/include
> > >    -g -O2 -c -o pthread_sigmask.o
> > > /home/m/build-gettext-windows/shared-32/source/gettext-0.20-rc1/gettext-tools/gnulib-tests/pthread_sigmask.c
> > > In file included from
> > > /home/m/mxe/usr/i686-w64-mingw32.shared/include/signal.h:10:0,
> > >                  from ../gnulib-lib/signal.h:52,
> > >                  from
> > > /home/m/build-gettext-windows/shared-32/source/gettext-0.20-rc1/gettext-tools/gnulib-tests/pthread_sigmask.c:20:
> > > /home/m/build-gettext-windows/shared-32/source/gettext-0.20-rc1/gettext-tools/gnulib-tests/pthread_sigmask.c:34:1:
> > > error: expected identifier or '(' before numeric constant
> > >  pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
> > >  ^
> > > Makefile:5287: recipe for target 'pthread_sigmask.o' failed
> >
> > This has recently been discussed on the gnulib list:
> >
> > https://lists.gnu.org/archive/html/bug-gnulib/2019-04/msg00028.html
> > https://lists.gnu.org/archive/html/bug-gnulib/2019-04/msg00029.html
> > https://lists.gnu.org/archive/html/bug-gnulib/2019-04/msg00035.html
> >
> > But no fix was provided. If you are in a position to provide a solid fix,
> > it will be welcome.
> 
> I'm absolutely ignorant about this subject.
> BTW I managed to get past that error with this patch:
> 
> --- a/gettext-tools/gnulib-tests/pthread_sigmask.c
> +++ b/gettext-tools/gnulib-tests/pthread_sigmask.c
> @@ -30,9 +30,9 @@
>  # include <unistd.h>
>  #endif
> 
> +#undef pthread_sigmask
>  int
>  pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
> -#undef pthread_sigmask
>  {
>  #if HAVE_PTHREAD_SIGMASK
>    int ret;

Thanks. This is probably going in the right direction. But this fix is too
"strong": It's a common technique (used in libunistring, libtextstyle, and 
others)
to "hide" gnulib symbols through preprocessor definitions like this in config.h:
  #define pthread_sigmask libfoo_pthread_sigmask

What we would need is a #undef that only undefines the definition from mingw's
header file, but not the one from config.h.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]