Kaydet (Commit) 9cf424b0 authored tarafından Sjoerd Mullender's avatar Sjoerd Mullender

On Cygwin, put stdin, stderr, and stdout in binary mode when the -u

flag is given (to mimic native Windows).
üst d77f93ad
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "osdefs.h" #include "osdefs.h"
#include "compile.h" /* For CO_FUTURE_DIVISION */ #include "compile.h" /* For CO_FUTURE_DIVISION */
#ifdef MS_WINDOWS #if defined(MS_WINDOWS) || defined(__CYGWIN__)
#include <fcntl.h> #include <fcntl.h>
#endif #endif
...@@ -304,7 +304,7 @@ Py_Main(int argc, char **argv) ...@@ -304,7 +304,7 @@ Py_Main(int argc, char **argv)
stdin_is_interactive = Py_FdIsInteractive(stdin, (char *)0); stdin_is_interactive = Py_FdIsInteractive(stdin, (char *)0);
if (unbuffered) { if (unbuffered) {
#ifdef MS_WINDOWS #if defined(MS_WINDOWS) || defined(__CYGWIN__)
_setmode(fileno(stdin), O_BINARY); _setmode(fileno(stdin), O_BINARY);
_setmode(fileno(stdout), O_BINARY); _setmode(fileno(stdout), O_BINARY);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment