summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2005-03-28 12:34:20 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2005-03-28 12:34:20 (GMT)
commit8b8fb3db5a3dd7f2d2111d493f9dc94fff234eaa (patch)
treea3ff2b0d032074eea1aa819d25749905117756b3 /Python/thread_pthread.h
parent0f2605473699f80bf6082d6fb90f3392fd6a518d (diff)
downloadcpython-8b8fb3db5a3dd7f2d2111d493f9dc94fff234eaa.zip
cpython-8b8fb3db5a3dd7f2d2111d493f9dc94fff234eaa.tar.gz
cpython-8b8fb3db5a3dd7f2d2111d493f9dc94fff234eaa.tar.bz2
Add 0 to _POSIX_SEMAPHORES. Will backport to 2.4.
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>