summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);