]> granicus.if.org Git - python/commitdiff
Patch #1163249 - Correctly handle _POSIX_SEMAPHORES == -1 to mean no
authorAnthony Baxter <anthonybaxter@gmail.com>
Wed, 16 Mar 2005 04:15:07 +0000 (04:15 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Wed, 16 Mar 2005 04:15:07 +0000 (04:15 +0000)
support for posix semaphores.

Python/thread_pthread.h

index dd1616c71642e9f74d1329d042256affb411ec64..d75400502340b1ba0e09f94a70f48c7e80e52600 100644 (file)
    family of functions must indicate this by defining
    _POSIX_SEMAPHORES. */   
 #ifdef _POSIX_SEMAPHORES
+#if _POSIX_SEMAPHORES == -1
+#define HAVE_BROKEN_POSIX_SEMAPHORES
+#else
 #include <semaphore.h>
 #include <errno.h>
 #endif
+#endif
 
 #if !defined(pthread_attr_default)
 #  define pthread_attr_default ((pthread_attr_t *)NULL)