1. python_mirrors
  2. features/pep-380

Commits

Martin von Löwis  committed a50ffe6

Add 0 to _POSIX_SEMAPHORES.

  • Participants
  • Parent commits ec87a11
  • Branches 2.4

Comments (0)

Files changed (1)

File Python/thread_pthread.h

View file
  • Ignore whitespace
    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>