]> granicus.if.org Git - python/commitdiff
Patch #618347: Work around Solaris 2.6 pthread.h bug. Will backport to 2.2.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 4 Oct 2002 07:21:24 +0000 (07:21 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 4 Oct 2002 07:21:24 +0000 (07:21 +0000)
Python/thread_pthread.h
configure
configure.in
pyconfig.h.in

index 556445e583a19693a78e1d21174c22a0f2f09561..c9f695726e2852818c73289b1f37b1837b86856a 100644 (file)
@@ -3,11 +3,11 @@
 
 #include <stdlib.h>
 #include <string.h>
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(HAVE_PTHREAD_DESTRUCTOR)
 #define destructor xxdestructor
 #endif
 #include <pthread.h>
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(HAVE_PTHREAD_DESTRUCTOR)
 #undef destructor
 #endif
 #include <signal.h>
index 9c995c34e99027312421cd47d801a62b68834530..181c98342ea6f05cddf1c615f6e73bb8c428bb58 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.348 .
+# From configure.in Revision: 1.349 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53.
 #
         OSF1) LDLAST=-threads;;
         esac
     fi
+
+    if test "$posix_threads" = yes -a \
+               "$ac_sys_system" = "SunOS" -a \
+               "$ac_sys_release" = "5.6"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD_DESTRUCTOR 1
+_ACEOF
+
+       fi
+
 fi
 
 # Check for enable-ipv6
index 27462a602616d70e5d63a370cffd8f2106e8d30a..fef6e22f9219dfd082c7ec137aa1e384e3b93baa 100644 (file)
@@ -1326,6 +1326,14 @@ pthread_create (NULL, NULL, start_routine, NULL)], [
         OSF1) LDLAST=-threads;;
         esac
     fi
+
+    if test "$posix_threads" = yes -a \
+               "$ac_sys_system" = "SunOS" -a \
+               "$ac_sys_release" = "5.6"; then
+               AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1,
+               [Defined for Solaris 2.6 bug in pthread header.])
+       fi
+
 fi
 
 # Check for enable-ipv6
index 3622be8f5a1bec12189503291d14222921d126a9..f5cc30ead475c89c6fb419a08b00a48d4680ee0b 100644 (file)
 /* Define if you have GNU PTH threads. */
 #undef HAVE_PTH
 
+/* Defined for Solaris 2.6 bug in pthread header. */
+#undef HAVE_PTHREAD_DESTRUCTOR
+
 /* Define to 1 if you have the <pthread.h> header file. */
 #undef HAVE_PTHREAD_H