[Python-checkins] CVS: python/dist/src acconfig.h,1.50,1.51 config.h.in,2.99,2.100 configure,1.218,1.219 configure.in,1.226,1.227
Thomas Wouters
twouters@users.sourceforge.net
Wed, 11 Jul 2001 15:35:34 -0700
- Previous message: [Python-checkins] CVS: python/dist/src configure,1.207.2.3,1.207.2.4 configure.in,1.215.2.3,1.215.2.4 config.h.in,2.91.2.3,2.91.2.4 acconfig.h,1.46.2.1,1.46.2.2
- Next message: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.191,2.192
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv16903
Modified Files:
acconfig.h config.h.in configure configure.in
Log Message:
Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Also note that it isn't just Linux nice() that is broken: at least FreeBSD
and BSDI also have this problem. os.nice() should probably just be emulated
using getpriority()/setpriority(), if they are available, but I'll get to
that later.
Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** acconfig.h 2001/07/10 16:44:35 1.50
--- acconfig.h 2001/07/11 22:35:31 1.51
***************
*** 117,120 ****
--- 117,123 ----
#undef Py_UNICODE_SIZE
+ /* Define if nice() returns success/failure instead of the new priority. */
+ #undef HAVE_BROKEN_NICE
+
/* Define if malloc(0) returns a NULL pointer */
#undef MALLOC_ZERO_RETURNS_NULL
Index: config.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/config.h.in,v
retrieving revision 2.99
retrieving revision 2.100
diff -C2 -r2.99 -r2.100
*** config.h.in 2001/07/11 14:45:34 2.99
--- config.h.in 2001/07/11 22:35:31 2.100
***************
*** 176,179 ****
--- 176,182 ----
#undef Py_UNICODE_SIZE
+ /* Define if nice() returns success/failure instead of the new priority. */
+ #undef HAVE_BROKEN_NICE
+
/* Define if malloc(0) returns a NULL pointer */
#undef MALLOC_ZERO_RETURNS_NULL
***************
*** 641,644 ****
--- 644,650 ----
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+
+ /* Define if you have the <sys/resource.h> header file. */
+ #undef HAVE_SYS_RESOURCE_H
/* Define if you have the <sys/select.h> header file. */
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.218
retrieving revision 1.219
diff -C2 -r1.218 -r1.219
*** configure 2001/07/11 14:45:34 1.218
--- configure 2001/07/11 22:35:31 1.219
***************
*** 1,5 ****
#! /bin/sh
! # From configure.in Revision: 1.225
# Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
#! /bin/sh
! # From configure.in Revision: 1.226
# Guess values for system-dependent variables and create Makefiles.
***************
*** 2075,2079 ****
sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
! ndbm.h db1/ndbm.h gdbm/ndbm.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
--- 2075,2079 ----
sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
! ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
***************
*** 6877,6880 ****
--- 6877,6925 ----
+ echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
+ echo "configure:6881: checking for broken nice()" >&5
+ if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ else
+ cat > conftest.$ac_ext <<EOF
+ #line 6890 "configure"
+ #include "confdefs.h"
+
+ int main()
+ {
+ int val1 = nice(1);
+ if (val1 != -1 && val1 == nice(2))
+ exit(0);
+ exit(1);
+ }
+
+ EOF
+ if { (eval echo configure:6902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ ac_cv_broken_nice=yes
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_broken_nice=no
+ fi
+ rm -fr conftest*
+ fi
+
+ fi
+
+ echo "$ac_t""$ac_cv_broken_nice" 1>&6
+ if test "$ac_cv_broken_nice" = yes
+ then
+ cat >> confdefs.h <<\EOF
+ #define HAVE_BROKEN_NICE 1
+ EOF
+
+ fi
+
# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
# Add sys/socket.h to confdefs.h
***************
*** 6885,6894 ****
EOF
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:6888: checking for socklen_t" >&5
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 6893 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 6930,6939 ----
EOF
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:6933: checking for socklen_t" >&5
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 6938 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 6939,6943 ****
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6942: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
--- 6984,6988 ----
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6987: 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.226
retrieving revision 1.227
diff -C2 -r1.226 -r1.227
*** configure.in 2001/07/11 14:45:34 1.226
--- configure.in 2001/07/11 22:35:31 1.227
***************
*** 546,550 ****
sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
! ndbm.h db1/ndbm.h gdbm/ndbm.h)
AC_HEADER_DIRENT
--- 546,550 ----
sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
! ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h)
AC_HEADER_DIRENT
***************
*** 1671,1674 ****
--- 1671,1691 ----
AC_CHECK_LIB(readline, rl_completion_matches,
AC_DEFINE(HAVE_RL_COMPLETION_MATCHES), , -ltermcap)
+
+ AC_MSG_CHECKING(for broken nice())
+ AC_CACHE_VAL(ac_cv_broken_nice, [
+ AC_TRY_RUN([
+ int main()
+ {
+ int val1 = nice(1);
+ if (val1 != -1 && val1 == nice(2))
+ exit(0);
+ exit(1);
+ }
+ ],ac_cv_broken_nice=yes, ac_cv_broken_nice=no)])
+ AC_MSG_RESULT($ac_cv_broken_nice)
+ if test "$ac_cv_broken_nice" = yes
+ then
+ AC_DEFINE(HAVE_BROKEN_NICE)
+ fi
# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
- Previous message: [Python-checkins] CVS: python/dist/src configure,1.207.2.3,1.207.2.4 configure.in,1.215.2.3,1.215.2.4 config.h.in,2.91.2.3,2.91.2.4 acconfig.h,1.46.2.1,1.46.2.2
- Next message: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.191,2.192
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]