summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-10-15 23:12:57 +0000
committerR. David Murray <rdmurray@bitdance.com>2010-10-15 23:12:57 +0000
commite16cda9ad8dad231d6354c1af2c58a07749e5eca (patch)
tree900a568922e7ff0e29299ac94ce4015354177733
parent88bd891e6c536cec0b53d2a52115f44f8498c331 (diff)
downloadcpython-git-e16cda9ad8dad231d6354c1af2c58a07749e5eca.tar.gz
#9862: On AIX PIPE_BUF is broken. Make it 512.
Patch by Sébastien Sablé.
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/selectmodule.c4
-rw-r--r--configure.in4
3 files changed, 11 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 0e247379fb..55e57ba310 100644
--- 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.
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 5c475f5785..58cc4c7c86 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -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
diff --git a/configure.in b/configure.in
index 01d81e9671..4252d93c4b 100644
--- a/configure.in
+++ b/configure.in
@@ -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