File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ Core and Builtins
124124Library
125125-------
126126
127+ - Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
128+
127129- Issue 10527: make multiprocessing use poll() instead of select() if available.
128130
129131- Issue #16688: Fix backreferences did make case-insensitive regex fail on
Original file line number Diff line number Diff line change @@ -186,6 +186,13 @@ semlock_release(SemLockObject *self, PyObject *args)
186186#define SEM_GETVALUE (sem , pval ) sem_getvalue(sem, pval)
187187#define SEM_UNLINK (name ) sem_unlink(name)
188188
189+ /* OS X 10.4 defines SEM_FAILED as -1 instead of (sem_t *)-1; this gives
190+ compiler warnings, and (potentially) undefined behaviour. */
191+ #ifdef __APPLE__
192+ # undef SEM_FAILED
193+ # define SEM_FAILED ((sem_t *)-1)
194+ #endif
195+
189196#ifndef HAVE_SEM_UNLINK
190197# define sem_unlink (name ) 0
191198#endif
You can’t perform that action at this time.
0 commit comments