FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue #9586: Merge. · python/cpython@950fab0 · GitHub

Repository navigation

Commit 950fab0

Browse files
committed
Issue #9586: Merge.
2 parents a9bc1bf + 9b45993 commit 950fab0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎Misc/NEWS‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ Core and Builtins
200200
Library
201201
-------
202202

203+
- Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
204+
203205
- Issue #16787: Increase asyncore and asynchat default output buffers size, to
204206
decrease CPU usage and increase throughput.
205207

‎Modules/_multiprocessing/semaphore.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL