]> granicus.if.org Git - python/commitdiff
Merged revisions 85554 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sat, 16 Oct 2010 00:43:13 +0000 (00:43 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sat, 16 Oct 2010 00:43:13 +0000 (00:43 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85554 | r.david.murray | 2010-10-15 19:12:57 -0400 (Fri, 15 Oct 2010) | 4 lines

  #9862: On AIX PIPE_BUF is broken.  Make it 512.

  Patch by SĂ©bastien SablĂ©.
........

Misc/NEWS
Modules/selectmodule.c
configure.in

index d7f6d1f5bd45aef928ecd14639214698eac1e2e4..d8f2f1b3d62e32f2675dfe51a8f1df131ed565b0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 2.7.1?
 Core and Builtins
 -----------------
 
+- Issue #9862: Compensate for broken PIPE_BUF in AIX by hard coding
+  its value as the default 512 when compiling on AIX.
+
 - Issue #10068: Global objects which have reference cycles with their module's
   dict are now cleared again. This causes issue #7140 to appear again.
 
index 1b88c987c663b3b84cea20dbcb7328072f14c4df..086a6476ee84ba787dbfcdc1e7286d190b098739 100644 (file)
@@ -1768,6 +1768,10 @@ initselect(void)
     PyModule_AddObject(m, "error", SelectError);
 
 #ifdef PIPE_BUF
+#ifdef HAVE_BROKEN_PIPE_BUF
+#undef PIPE_BUF
+#define PIPE_BUF 512
+#endif
     PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF);
 #endif
 
index bfa5ba5127ab2a64130bbcab584c0729169fbedf..3a87ff11372864d55ebb34a3bdcab3aafb1b83ec 100644 (file)
@@ -4261,6 +4261,12 @@ AC_CHECK_TYPE(socklen_t,,
 #endif
 ])
 
+case $ac_sys_system in
+AIX*)
+  AC_DEFINE(HAVE_BROKEN_PIPE_BUF, 1, [Define if the system reports an invalid PIPE_BUF value.]) ;;
+esac
+
+
 AC_SUBST(THREADHEADERS)
 
 for h in `(cd $srcdir;echo Python/thread_*.h)`