Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
This commit is contained in:
parent
856cb0fc34
commit
7450a81970
|
@ -175,6 +175,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
|
||||||
|
|
||||||
- Issue 10527: make multiprocessing use poll() instead of select() if available.
|
- Issue 10527: make multiprocessing use poll() instead of select() if available.
|
||||||
|
|
||||||
- Issue #16485: Fix file descriptor not being closed if file header patching
|
- Issue #16485: Fix file descriptor not being closed if file header patching
|
||||||
|
|
|
@ -197,6 +197,13 @@ semlock_release(SemLockObject *self, PyObject *args)
|
||||||
#define SEM_GETVALUE(sem, pval) sem_getvalue(sem, pval)
|
#define SEM_GETVALUE(sem, pval) sem_getvalue(sem, pval)
|
||||||
#define SEM_UNLINK(name) sem_unlink(name)
|
#define SEM_UNLINK(name) sem_unlink(name)
|
||||||
|
|
||||||
|
/* OS X 10.4 defines SEM_FAILED as -1 instead of (sem_t *)-1; this gives
|
||||||
|
compiler warnings, and (potentially) undefined behaviour. */
|
||||||
|
#ifdef __APPLE__
|
||||||
|
# undef SEM_FAILED
|
||||||
|
# define SEM_FAILED ((sem_t *)-1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SEM_UNLINK
|
#ifndef HAVE_SEM_UNLINK
|
||||||
# define sem_unlink(name) 0
|
# define sem_unlink(name) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue