]> granicus.if.org Git - python/commitdiff
Issue #10062: Allow building on platforms which do not have sem_timedwait.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 10 Oct 2010 08:37:22 +0000 (08:37 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 10 Oct 2010 08:37:22 +0000 (08:37 +0000)
Misc/NEWS
Python/thread_pthread.h

index 81dc552e7e7a9f0ace8fb0b095d83bd2fce1d1ac..e90cb370d97e0e3476f5b5a03ca96ce96a27f012 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -346,6 +346,8 @@ Tests
 Build
 -----
 
+- Issue #10062: Allow building on platforms which do not have sem_timedwait.
+
 - Issue #10054: Some platforms provide uintptr_t in inttypes.h.  Patch by
   Akira Kitada.
 
index a529b7a7eb191cd1778605c7a5cd10269fd3bb26..c007c8b90674ade2e51108a820ea5f5c6b824b5e 100644 (file)
@@ -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