]> granicus.if.org Git - python/commitdiff
Don't use Posix semaphores on Solaris 8. Fixes #662787.
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 21 Jan 2003 10:14:41 +0000 (10:14 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 21 Jan 2003 10:14:41 +0000 (10:14 +0000)
Python/thread_pthread.h
configure
configure.in
pyconfig.h.in

index 80671215ea82843e5455a17842fd08053e8abd66..e30982fc4f8be5c8977ed2841ac84bbc498f1940 100644 (file)
 /* Whether or not to use semaphores directly rather than emulating them with
  * mutexes and condition variables:
  */
-#ifdef _POSIX_SEMAPHORES
+#if defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES)
 #  define USE_SEMAPHORES
 #else
 #  undef USE_SEMAPHORES
index df432d81f0b2aa0b0dd88302a0a008d679c148a8..c94f2a15169d0f757107db7ae6c3bbc90968f02a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.385 .
+# From configure.in Revision: 1.386 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53 for python 2.3.
 #
@@ -11132,6 +11132,15 @@ _ACEOF
 
       fi
 
+      # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
+      case  $ac_sys_system/$ac_sys_release in
+      SunOS/5.8)
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BROKEN_POSIX_SEMAPHORES 1
+_ACEOF
+;;
+      esac
+
       echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
 echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
       if test "${ac_cv_pthread_system_supported+set}" = set; then
index c8ba86bb4c3a9465ed99d0bbfc3634e6e320be66..8011c970b135f1787253e43fc522898fa6e30bcb 100644 (file)
@@ -1447,6 +1447,12 @@ pthread_create (NULL, NULL, start_routine, NULL)], [
           and your system does not define that.])
       fi
 
+      # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
+      case  $ac_sys_system/$ac_sys_release in
+      SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
+                           Define if the Posix semaphores do not work on your system);;
+      esac
+
       AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
       AC_CACHE_VAL(ac_cv_pthread_system_supported,
       [AC_TRY_RUN([#include <pthread.h>
index 3627b83a289eaed049972ed1461cc665e843f3cc..dea4722ea8b2b90dd5cfc4e1a87baf7f4fc17d44 100644 (file)
@@ -44,6 +44,9 @@
 /* Define if nice() returns success/failure instead of the new priority. */
 #undef HAVE_BROKEN_NICE
 
+/* Define if the Posix semaphores do not work on your system */
+#undef HAVE_BROKEN_POSIX_SEMAPHORES
+
 /* Define to 1 if you have the `chown' function. */
 #undef HAVE_CHOWN