| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -200,6 +200,8 @@ Core and Builtins | |||
| 200 | 200 | Library | |
| 201 | 201 | ------- | |
| 202 | 202 | ||
| 203 | + - Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy. | ||
| 204 | + | ||
| 203 | 205 | - Issue #16787: Increase asyncore and asynchat default output buffers size, to | |
| 204 | 206 | decrease CPU usage and increase throughput. | |
| 205 | 207 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -186,6 +186,13 @@ semlock_release(SemLockObject *self, PyObject *args) | |||
| 186 | 186 | #define SEM_GETVALUE(sem, pval) sem_getvalue(sem, pval) | |
| 187 | 187 | #define SEM_UNLINK(name) sem_unlink(name) | |
| 188 | 188 | ||
| 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 | + | ||
| 189 | 196 | #ifndef HAVE_SEM_UNLINK | |
| 190 | 197 | # define sem_unlink(name) 0 | |
| 191 | 198 | #endif | |
| Back | FazBrowse Home | New Git URL |
0 commit comments