[Python-checkins] CVS: python/dist/src acconfig.h,1.39,1.40 config.h.in,2.80,2.81 configure,1.173,1.174 configure.in,1.181,1.182
Guido van Rossum
python-dev@python.org
Fri, 05 Jan 2001 06:45:51 -0800
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv3749
Modified Files:
acconfig.h config.h.in configure configure.in
Log Message:
Configuration test for working getc_unlocked() (and flockfile() and
funlockfile()).
Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** acconfig.h 2000/10/09 17:01:03 1.39
--- acconfig.h 2001/01/05 14:45:48 1.40
***************
*** 33,36 ****
--- 33,39 ----
#undef HAVE_ALTZONE
+ /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
+ #undef HAVE_GETC_UNLOCKED
+
/* Define this if you have gethostbyname() */
#undef HAVE_GETHOSTBYNAME
Index: config.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/config.h.in,v
retrieving revision 2.80
retrieving revision 2.81
diff -C2 -r2.80 -r2.81
*** config.h.in 2000/11/29 02:44:05 2.80
--- config.h.in 2001/01/05 14:45:48 2.81
***************
*** 98,101 ****
--- 98,104 ----
#undef HAVE_ALTZONE
+ /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
+ #undef HAVE_GETC_UNLOCKED
+
/* Define this if you have some version of gethostbyname_r() */
#undef HAVE_GETHOSTBYNAME_R
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.173
retrieving revision 1.174
diff -C2 -r1.173 -r1.174
*** configure 2000/12/13 17:37:02 1.173
--- configure 2001/01/05 14:45:48 1.174
***************
*** 1,5 ****
#! /bin/sh
! # From configure.in Revision: 1.180
# Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
#! /bin/sh
! # From configure.in Revision: 1.182
# Guess values for system-dependent variables and create Makefiles.
***************
*** 5949,5952 ****
--- 5949,5992 ----
fi
+ # check for getc_unlocked and related locking functions
+ echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
+ echo "configure:5954: checking for getc_unlocked() and friends" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+
+ cat > conftest.$ac_ext <<EOF
+ #line 5960 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int main() {
+
+ FILE *f = fopen("/dev/null", "r");
+ flockfile(f);
+ getc_unlocked(f);
+ funlockfile(f);
+
+ ; return 0; }
+ EOF
+ if { (eval echo configure:5972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_have_getc_unlocked=yes
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_have_getc_unlocked=no
+ fi
+ rm -f conftest*
+ fi
+
+ echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
+ if test "$ac_cv_have_getc_unlocked" = yes
+ then
+ cat >> confdefs.h <<\EOF
+ #define HAVE_GETC_UNLOCKED 1
+ EOF
+
+ fi
# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
***************
*** 5958,5967 ****
EOF
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:5961: 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 5966 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 5998,6007 ----
EOF
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:6001: 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 6006 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 5992,5996 ****
echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
! echo "configure:5995: checking for Modules/Setup" >&5
if test ! -f Modules/Setup ; then
if test ! -d Modules ; then
--- 6032,6036 ----
echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
! echo "configure:6035: checking for Modules/Setup" >&5
if test ! -f Modules/Setup ; then
if test ! -d Modules ; then
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.181
retrieving revision 1.182
diff -C2 -r1.181 -r1.182
*** configure.in 2000/12/13 17:37:02 1.181
--- configure.in 2001/01/05 14:45:49 1.182
***************
*** 1292,1295 ****
--- 1292,1309 ----
fi
+ # check for getc_unlocked and related locking functions
+ AC_MSG_CHECKING(for getc_unlocked() and friends)
+ AC_CACHE_VAL(ac_cv_have_getc_unlocked, [
+ AC_TRY_LINK([#include <stdio.h>],[
+ FILE *f = fopen("/dev/null", "r");
+ flockfile(f);
+ getc_unlocked(f);
+ funlockfile(f);
+ ], ac_cv_have_getc_unlocked=yes, ac_cv_have_getc_unlocked=no)])
+ AC_MSG_RESULT($ac_cv_have_getc_unlocked)
+ if test "$ac_cv_have_getc_unlocked" = yes
+ then
+ AC_DEFINE(HAVE_GETC_UNLOCKED)
+ fi
# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!