]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#9862: On AIX PIPE_BUF is broken. Make it 512.
authorR. David Murray <rdmurray@bitdance.com>
Fri, 15 Oct 2010 23:12:57 +0000 (23:12 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Fri, 15 Oct 2010 23:12:57 +0000 (23:12 +0000)
Patch by SĂ©bastien SablĂ©.

Misc/NEWS
Modules/selectmodule.c
configure.in

index 0e247379fbc82f4f77b2d16e4746243334957325..55e57ba310368a2f936747d51791c46ae6afb430 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 3.2 Beta 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.
+
 - Use locale encoding instead of UTF-8 to encode and decode filenames if
   Py_FileSystemDefaultEncoding is not set.
 
index 5c475f5785995ed014b93ece14ac37254a56f98c..58cc4c7c86a4ec848aa28911b26628da27dea6de 100644 (file)
@@ -1786,6 +1786,10 @@ PyInit_select(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 01d81e9671196280ee44a965a455503aee8015c5..4252d93c4bfd3f96587c9308d467fa06898586e6 100644 (file)
@@ -4213,6 +4213,10 @@ fi
 ],
 [AC_MSG_RESULT(no value specified)])
 
+case $ac_sys_system in
+AIX*)   
+  AC_DEFINE(HAVE_BROKEN_PIPE_BUF, 1, [Define if the system reports an invalid PIPE_BUF value.]) ;;
+esac
 
 
 case $ac_sys_system in