From f22d7e2c69f9095edc2703483ec11a3b7ff931f5 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 11 Jan 1997 19:28:55 +0000 Subject: [PATCH] On Windows, -u implies binary mode for stdin/stdout (as well as unbuffered stdout/stderr). --- Modules/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/main.c b/Modules/main.c index c8b583a455d7..15d0cc5ccaf0 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); -- 2.47.3