diff options
-rw-r--r-- | Objects/fileobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index f8c58ba..d07aa69 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -165,7 +165,10 @@ PyFile_SetBufSize(f, bufsize) } setvbuf(((PyFileObject *)f)->f_fp, (char *)NULL, type, bufsize); -#endif /* HAVE_SETVBUF */ +#else /* !HAVE_SETVBUF */ + if (bufsize <= 1) + setbuf(((PyFileObject *)f)->f_fp, (char *)NULL); +#endif /* !HAVE_SETVBUF */ } } |