[Python-checkins] CVS: python/dist/src pyconfig.h.in,1.14,1.15 configure,1.260,1.261 configure.in,1.268,1.269
Martin v. L?wis
loewis@users.sourceforge.net
Mon, 15 Oct 2001 07:34:44 -0700
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv3346
Modified Files:
pyconfig.h.in configure configure.in
Log Message:
Do not define _POSIX_THREADS if unistd.h defines it.
Check for pthread_sigmask before using it. Fixes remaining problem in #470781.
Index: pyconfig.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** pyconfig.h.in 2001/10/13 09:12:40 1.14
--- pyconfig.h.in 2001/10/15 14:34:42 1.15
***************
*** 478,481 ****
--- 478,484 ----
#undef HAVE_PTHREAD_INIT
+ /* Define if you have the pthread_sigmask function. */
+ #undef HAVE_PTHREAD_SIGMASK
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.260
retrieving revision 1.261
diff -C2 -d -r1.260 -r1.261
*** configure 2001/10/15 08:06:29 1.260
--- configure 2001/10/15 14:34:42 1.261
***************
*** 1,5 ****
#! /bin/sh
! # From configure.in Revision: 1.267
# Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
#! /bin/sh
! # From configure.in Revision: 1.268
[...2880 lines suppressed...]
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 7294 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 7296,7300 ****
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:7299: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
--- 7340,7344 ----
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:7343: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.268
retrieving revision 1.269
diff -C2 -d -r1.268 -r1.269
*** configure.in 2001/10/15 08:06:29 1.268
--- configure.in 2001/10/15 14:34:42 1.269
***************
*** 969,973 ****
then
AC_DEFINE(WITH_THREAD)
- AC_DEFINE(_POSIX_THREADS)
# Defining _REENTRANT on system with POSIX threads should not hurt.
AC_DEFINE(_REENTRANT)
--- 969,972 ----
***************
*** 978,982 ****
CC="$CC -Kpthread"
AC_DEFINE(WITH_THREAD)
- AC_DEFINE(_POSIX_THREADS)
posix_threads=yes
LIBOBJS="$LIBOBJS thread.o"
--- 977,980 ----
***************
*** 988,991 ****
--- 986,1001 ----
then LDFLAGS="$LDFLAGS -L$withval"
fi
+
+ # According to the POSIX spec, a pthreads implementation must
+ # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
+ AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
+ AC_EGREP_CPP(yes,
+ [#include <unistd.h>
+ #ifdef _POSIX_THREADS
+ yes
+ #endif
+ ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
+ AC_MSG_RESULT($unistd_defines_pthreads)
+
AC_DEFINE(_REENTRANT)
AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
***************
*** 1014,1032 ****
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_THREAD)
! case $ac_sys_system in
! Darwin*) ;;
! *) AC_DEFINE(_POSIX_THREADS)
! posix_threads=yes
! ;;
! esac
LIBOBJS="$LIBOBJS thread.o"],[
LIBS=$_libs
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
! case $ac_sys_system in
! Darwin*) ;;
! *) AC_DEFINE(_POSIX_THREADS)
! posix_threads=yes
! ;;
! esac
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
--- 1024,1032 ----
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_THREAD)
! posix_threads=yes
LIBOBJS="$LIBOBJS thread.o"],[
LIBS=$_libs
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
! posix_threads=yes
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
***************
*** 1034,1058 ****
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
- AC_DEFINE(_POSIX_THREADS)
posix_threads=yes
LIBS="$LIBS -lpthreads"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
- AC_DEFINE(_POSIX_THREADS)
posix_threads=yes
LIBS="$LIBS -lc_r"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD)
- AC_DEFINE(_POSIX_THREADS)
posix_threads=yes
LIBS="$LIBS -lthread"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
- AC_DEFINE(_POSIX_THREADS)
posix_threads=yes
LIBS="$LIBS -lpthread"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
- AC_DEFINE(_POSIX_THREADS)
posix_threads=yes
LIBS="$LIBS -lcma"
--- 1034,1053 ----
***************
*** 1062,1065 ****
--- 1057,1064 ----
if test "$posix_threads" = "yes"; then
+ if test "$unistd_defines_pthreads" = "no"; then
+ AC_DEFINE(_POSIX_THREADS)
+ fi
+
AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
AC_CACHE_VAL(ac_cv_pthread_system_supported,
***************
*** 1083,1086 ****
--- 1082,1086 ----
AC_DEFINE(PTHREAD_SYSTEM_SCHED_SUPPORTED)
fi
+ AC_CHECK_FUNCS(pthread_sigmask)
fi