bug-gnulib
[Top][All Lists]
Advanced

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

Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock


From: Bruno Haible
Subject: Re: Tests on MinGW: undef ref pthread_mutex_lock/unlock
Date: Fri, 12 Apr 2019 02:26:06 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Hi Tim,

The points to look at are:
  - How does the configure script behave while running the expanded code
    that comes from threadlib.m4? Try "sh -x ./configure ..." for this
    exercise.
  - Why does gl_lock_unlock expand to a call to pthread_mutex_unlock? Only
    if USE_POSIX_THREADS is defined. And where does USE_POSIX_THREADS come
    from on your system?

> In file included from /usr/share/mingw-w64/include/signal.h:10,
>                  from ./signal.h:52,
>                  from pthread_sigmask.c:20:
> 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)
>  ^~~~~~~~~~~~~~~
> make[4]: *** [Makefile:10495: pthread_sigmask.o] Fehler 1

This one, you can start with a "gcc -E" command, to see where a macro
expansion of pthread_sigmask come from.

Btw, I never build with mingw-pthreads installed. But even with mingw-pthreads
installed, gnulib modules ought to not use it; they ought to use the Windows
API instead.

Bruno




reply via email to

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