[Python-checkins] python/dist/src README, 1.177.4.7, 1.177.4.8 configure, 1.416.4.11, 1.416.4.12 configure.in, 1.427.4.10, 1.427.4.11 pyconfig.h.in, 1.83.4.3, 1.83.4.4

mondragon at users.sourceforge.net mondragon at users.sourceforge.net
Mon Mar 22 15:20:37 EST 2004


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14693

Modified Files:
      Tag: release23-maint
	README configure configure.in pyconfig.h.in 
Log Message:
Added check for broken poll on OSes where it exists but sets errno for
bad file descriptor.  Fixes SF Bug #850981


Index: README
===================================================================
RCS file: /cvsroot/python/python/dist/src/README,v
retrieving revision 1.177.4.7
retrieving revision 1.177.4.8
diff -C2 -d -r1.177.4.7 -r1.177.4.8
*** README	4 Dec 2003 20:33:58 -0000	1.177.4.7
--- README	22 Mar 2004 20:20:26 -0000	1.177.4.8
***************
*** 668,671 ****
--- 668,672 ----
  	      work (It does not return POLLNVAL for bad fds and
  	      hangs).
+               (Believed fixed, unverified - autoconf check for broken poll)
  	    - posix: statvfs and fstatvfs always return ENOSYS.
  	    - disabled modules:

Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.416.4.11
retrieving revision 1.416.4.12
diff -C2 -d -r1.416.4.11 -r1.416.4.12
*** configure	18 Nov 2003 19:59:36 -0000	1.416.4.11
--- configure	22 Mar 2004 20:20:27 -0000	1.416.4.12
***************
*** 1,4 ****
  #! /bin/sh
! # From configure.in Revision: 1.427.4.9 .
  # Guess values for system-dependent variables and create Makefiles.
  # Generated by GNU Autoconf 2.57 for python 2.3.
--- 1,4 ----
  #! /bin/sh
! # From configure.in Revision: 1.427.4.10 .
  # Guess values for system-dependent variables and create Makefiles.
  # Generated by GNU Autoconf 2.57 for python 2.3.
***************
*** 18419,18422 ****
--- 18419,18494 ----
  fi
  
+ echo "$as_me:$LINENO: checking for broken poll()" >&5
+ echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+   ac_cv_broken_poll=no
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ 
+ #include <poll.h>
+ 
+ int main (void)
+     {
+     struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
+ 
+     close (42);
+ 
+     int poll_test = poll (&poll_struct, 1, 0);
+ 
+     if (poll_test < 0)
+         {
+         exit(0);
+         }
+     else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
+         {
+         exit(0);
+         }
+     else
+         {
+         exit(1);
+         }
+     }
+ 
+ _ACEOF
+ rm -f conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_broken_poll=yes
+ else
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ ( exit $ac_status )
+ ac_cv_broken_poll=no
+ fi
+ rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
+ echo "${ECHO_T}$ac_cv_broken_poll" >&6
+ if test "$ac_cv_broken_poll" = yes
+ then
+ 
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_BROKEN_POLL 1
+ _ACEOF
+ 
+ fi
+ 
+ 
  # tzset(3) exists and works like we expect it to
  echo "$as_me:$LINENO: checking for working tzset()" >&5

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.427.4.10
retrieving revision 1.427.4.11
diff -C2 -d -r1.427.4.10 -r1.427.4.11
*** configure.in	18 Nov 2003 19:59:39 -0000	1.427.4.10
--- configure.in	22 Mar 2004 20:20:32 -0000	1.427.4.11
***************
*** 2840,2843 ****
--- 2840,2880 ----
  fi
  
+ AC_MSG_CHECKING(for broken poll())
+ AC_TRY_RUN([
+ #include <poll.h>
+ 
+ int main (void)
+     {
+     struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
+     
+     close (42);
+ 
+     int poll_test = poll (&poll_struct, 1, 0);
+ 
+     if (poll_test < 0)
+         {
+         exit(0);
+         }
+     else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
+         {
+         exit(0);
+         }
+     else
+         {
+         exit(1);
+         }
+     }
+ ],
+ ac_cv_broken_poll=yes,
+ ac_cv_broken_poll=no,
+ ac_cv_broken_poll=no)
+ AC_MSG_RESULT($ac_cv_broken_poll)
+ if test "$ac_cv_broken_poll" = yes
+ then
+   AC_DEFINE(HAVE_BROKEN_POLL, 1,
+       [Define if poll() sets errno on invalid file descriptors.])
+ fi
+ 
+ 
  # tzset(3) exists and works like we expect it to
  AC_MSG_CHECKING(for working tzset())

Index: pyconfig.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v
retrieving revision 1.83.4.3
retrieving revision 1.83.4.4
diff -C2 -d -r1.83.4.3 -r1.83.4.4
*** pyconfig.h.in	25 Sep 2003 15:21:00 -0000	1.83.4.3
--- pyconfig.h.in	22 Mar 2004 20:20:32 -0000	1.83.4.4
***************
*** 45,48 ****
--- 45,51 ----
  #undef HAVE_BROKEN_NICE
  
+ /* Define if poll() sets errno on invalid file descriptors. */
+ #undef HAVE_BROKEN_POLL
+ 
  /* Define if the Posix semaphores do not work on your system */
  #undef HAVE_BROKEN_POSIX_SEMAPHORES
***************
*** 127,130 ****
--- 130,136 ----
  #undef HAVE_FSTATVFS
  
+ /* Define if you have the 'fsync' function. */
+ #undef HAVE_FSYNC
+ 
  /* Define to 1 if you have the `ftell64' function. */
  #undef HAVE_FTELL64
***************
*** 486,492 ****
  #undef HAVE_SYMLINK
  
- /* Define if you have the 'fsync' function. */
- #undef HAVE_FSYNC
- 
  /* Define to 1 if you have the `sysconf' function. */
  #undef HAVE_SYSCONF
--- 492,495 ----




More information about the Python-checkins mailing list