diff options
author | Guido van Rossum <guido@python.org> | 1997-01-11 19:28:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-11 19:28:55 (GMT) |
commit | f22d7e2c69f9095edc2703483ec11a3b7ff931f5 (patch) | |
tree | 715e9f1733123e03897b3811bcd5b6b91348b672 /Modules/main.c | |
parent | 919cf1aff1b28d784fa91e31994875aa91a9ed55 (diff) | |
download | cpython-f22d7e2c69f9095edc2703483ec11a3b7ff931f5.zip cpython-f22d7e2c69f9095edc2703483ec11a3b7ff931f5.tar.gz cpython-f22d7e2c69f9095edc2703483ec11a3b7ff931f5.tar.bz2 |
On Windows, -u implies binary mode for stdin/stdout
(as well as unbuffered stdout/stderr).
Diffstat (limited to 'Modules/main.c')
-rw-r--r-- | Modules/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c index c8b583a..15d0cc5 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -162,6 +162,10 @@ main(argc, argv) } if (unbuffered) { +#ifdef MS_WINDOWS + _setmode(stdin, O_BINARY); + _setmode(stdout, O_BINARY); +#endif #ifndef MPW setbuf(stdout, (char *)NULL); setbuf(stderr, (char *)NULL); |