Windows build is broken (fresh mingw, cygwin)

Bug #1375040 reported by il71
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

$subj,

sbcl versions: 1.2.1 - 1.2.4

latest mingw w64 and cygwin 64.

Build error:

pthreads_win32.h:365:19: error: expected identifier or '(' before numeric constant
 static inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oldset)

mingw's system header pthread_signal.h:

<---
/* Windows has rudimentary signals support. */
#define pthread_sigmask(H, S1, S2) 0
--->

sbcl's src/runtime/pthreads_win32.h:

#ifndef PTHREAD_INTERNALS
static inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oldset)
{
...
}

Not sure if PTHREAD_INTERNALS should be undefined for windows, but the following
fixes the build:

--- pthreads_win32.h.orig 2014-07-30 12:20:29 +0700
+++ pthreads_win32.h 2014-07-30 01:16:33 +0700
@@ -362,6 +362,9 @@
 int sem_destroy(sem_t *sem);

 #ifndef PTHREAD_INTERNALS
+#ifdef pthread_sigmask
+#undef pthread_sigmask
+#endif
 static inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oldset)
 {
   pthread_t self = pthread_self();

Obviously it is a workaround, not a right fix.

Revision history for this message
Stas Boukarev (stassats) wrote :

I believe that was fixed in cd4ef0868ce63dc907ca45dfee44b5c87653542c.

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.