Mercurial > cpython-lru_cache-weakref
diff Python/thread_pthread.h @ 65205:ed5e598da150
Issue #10062: Allow building on platforms which do not have sem_timedwait.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sun, 10 Oct 2010 08:37:22 +0000 |
| parents | 8e428b8e7d81 |
| children | b750c45a772c |
line wrap: on
line diff
--- a/Python/thread_pthread.h Sun Oct 10 08:10:16 2010 +0000 +++ b/Python/thread_pthread.h Sun Oct 10 08:37:22 2010 +0000 @@ -64,7 +64,8 @@ /* Whether or not to use semaphores directly rather than emulating them with * mutexes and condition variables: */ -#if defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES) +#if (defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES) && \ + defined(HAVE_SEM_TIMEDWAIT)) # define USE_SEMAPHORES #else # undef USE_SEMAPHORES
