On 01/04/2018 11:06 AM, Bruno Haible wrote:
> Hi Tim,
> 
>> sorry, but now the build hangs at
>>
>> In file included from /usr/share/mingw-w64/include/signal.h:10:0,
>>                  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)
> 
> Do you have time to provide a patch for this?
> 
> Hint: Look how this situation is handled in the modules 'dirfd' and 'strdup'.

Sorry, no time to look at it any deeper. And a general solution is not
obvious from strdup.c or dirfd.c.

IMO, pthread_sigmask.c shouldn't be relevant with --disable-threads and
thus either not being used or code skipped by

#if defined USE_POSIX_THREADS || defined USE_PTH_THREADS || defined
USE_SOLARIS_THREADS || defined USE_WINDOWS_THREADS

or similar.

I assume, I don't get the whole concept here (at least not by looking 5
mins at it).

Anyways, I attached a diff that works for me. It's definitely not a
general solution but I can continue to work around a threading issue in
wine / mingw that hangs a project's CI runner.


Regards, Tim
diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c
index 3bb92ca8e..ff0a514f0 100644
--- a/lib/pthread_sigmask.c
+++ b/lib/pthread_sigmask.c
@@ -30,6 +30,7 @@
 # include <unistd.h>
 #endif
 
+#if defined pthread_sigmask && pthread_sigmask != 0
 int
 pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
 #undef pthread_sigmask
@@ -90,3 +91,4 @@ pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
   return (ret < 0 ? errno : 0);
 #endif
 }
+#endif

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to