summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2005-03-28 12:36:19 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2005-03-28 12:36:19 (GMT)
commit465499aad4f7fcf6294262891df43cbe9dc94516 (patch)
tree32cddf44217df77705d1669e3ae78e4cbf8470ff /Python/thread_pthread.h
parent92d395026e38acf28c92e991f0b983ad729c3eb7 (diff)
downloadcpython-465499aad4f7fcf6294262891df43cbe9dc94516.zip
cpython-465499aad4f7fcf6294262891df43cbe9dc94516.tar.gz
cpython-465499aad4f7fcf6294262891df43cbe9dc94516.tar.bz2
Add 0 to _POSIX_SEMAPHORES.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index d754005..a415a43 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -16,7 +16,9 @@
family of functions must indicate this by defining
_POSIX_SEMAPHORES. */
#ifdef _POSIX_SEMAPHORES
-#if _POSIX_SEMAPHORES == -1
+/* On FreeBSD 4.x, _POSIX_SEMAPHORES is defined empty, so
+ we need to add 0 to make it work there as well. */
+#if (_POSIX_SEMAPHORES+0) == -1
#define HAVE_BROKEN_POSIX_SEMAPHORES
#else
#include <semaphore.h>