diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 2002-08-09 13:35:18 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 2002-08-09 13:35:18 (GMT) |
commit | 9cf424b04bf355df85659da18abc2ac3f9419c37 (patch) | |
tree | 665b3105d7e78ecebca630ab74aae3eaadbdce8b /Modules | |
parent | d77f93ad8174dd839ced84e56ebf76a0bf87c064 (diff) | |
download | cpython-9cf424b04bf355df85659da18abc2ac3f9419c37.zip cpython-9cf424b04bf355df85659da18abc2ac3f9419c37.tar.gz cpython-9cf424b04bf355df85659da18abc2ac3f9419c37.tar.bz2 |
On Cygwin, put stdin, stderr, and stdout in binary mode when the -u
flag is given (to mimic native Windows).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/main.c b/Modules/main.c index 9e46717..102693a 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -4,7 +4,7 @@ #include "osdefs.h" #include "compile.h" /* For CO_FUTURE_DIVISION */ -#ifdef MS_WINDOWS +#if defined(MS_WINDOWS) || defined(__CYGWIN__) #include <fcntl.h> #endif @@ -304,7 +304,7 @@ Py_Main(int argc, char **argv) stdin_is_interactive = Py_FdIsInteractive(stdin, (char *)0); if (unbuffered) { -#ifdef MS_WINDOWS +#if defined(MS_WINDOWS) || defined(__CYGWIN__) _setmode(fileno(stdin), O_BINARY); _setmode(fileno(stdout), O_BINARY); #endif |