summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-03-25 15:32:01 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-03-25 15:32:01 (GMT)
commit6d8898b5eb741645d5d7352b0f49bde190355eaa (patch)
tree7b2e4cf4d867191c76678b472c5d1ec545f4b4a0 /Modules
parent03ffbcd393319cfd34341974829fd010fad4b053 (diff)
downloadcpython-6d8898b5eb741645d5d7352b0f49bde190355eaa.zip
cpython-6d8898b5eb741645d5d7352b0f49bde190355eaa.tar.gz
cpython-6d8898b5eb741645d5d7352b0f49bde190355eaa.tar.bz2
Due to interaction between the MSL C library and the GUSI I/O library I can get reads from sockets to work consistently either for unbuffered binary files or for buffered binary files, but not for both:-(
The workaround is to force socket.makefile() to disable buffering for binary files. Fixes bug 534625. 2.2.1 candidate.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index ef5967a..4f35b32 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1365,6 +1365,11 @@ PySocketSock_makefile(PySocketSockObject *s, PyObject *args)
SOCKETCLOSE(fd);
return s->errorhandler();
}
+#ifdef USE_GUSI2
+ /* Workaround for bug in Metrowerks MSL vs. GUSI I/O library */
+ if (strchr(mode, 'b') != NULL )
+ bufsize = 0;
+#endif
f = PyFile_FromFile(fp, "<socket>", mode, fclose);
if (f != NULL)
PyFile_SetBufSize(f, bufsize);