summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-10-27 19:53:15 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-10-27 19:53:15 (GMT)
commit78de9cc146c3078b325ede5eeb9b06d9c44eada2 (patch)
treeb41d590860a0f212942e9c99537523593a1172d8 /Modules/_io
parentb27ddc72eaec4fe5855e04c370df26327078b1b0 (diff)
downloadcpython-78de9cc146c3078b325ede5eeb9b06d9c44eada2.zip
cpython-78de9cc146c3078b325ede5eeb9b06d9c44eada2.tar.gz
cpython-78de9cc146c3078b325ede5eeb9b06d9c44eada2.tar.bz2
Merged revisions 85864 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85864 | antoine.pitrou | 2010-10-27 21:45:43 +0200 (mer., 27 oct. 2010) | 5 lines In open(), only set the buffer size from st.st_blksize when it is greater than 1. This matches the pure Python implementation in _pyio and should fix a couple of failures on the NetBSD buildbot. ........
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/_iomodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index ca359bc..6d7121c 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -453,7 +453,7 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds)
if (fileno == -1 && PyErr_Occurred())
goto error;
- if (fstat(fileno, &st) >= 0)
+ if (fstat(fileno, &st) >= 0 && st.st_blksize > 1)
buffering = st.st_blksize;
}
#endif