summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2005-03-16 04:13:29 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2005-03-16 04:13:29 (GMT)
commit11da5d5e6f4b0bec88e463d571ba65adc7dda948 (patch)
tree48a0181b8b9547436572f0b4678c95622e5c27e3 /Python/thread_pthread.h
parent3a3f9cc9c1a1ba9348b98be954d0dc433aee6479 (diff)
downloadcpython-11da5d5e6f4b0bec88e463d571ba65adc7dda948.zip
cpython-11da5d5e6f4b0bec88e463d571ba65adc7dda948.tar.gz
cpython-11da5d5e6f4b0bec88e463d571ba65adc7dda948.tar.bz2
Patch #1163249 - Correctly handle _POSIX_SEMAPHORES == -1 to mean no
support for posix semaphores.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index dd1616c..d754005 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -16,9 +16,13 @@
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)