projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70bf121
)
windows: set stdio streams to binary mode
author
Igor Zinkovsky
<igorzi@microsoft.com>
Tue, 2 Aug 2011 01:21:38 +0000
(18:21 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Tue, 2 Aug 2011 01:30:13 +0000
(18:30 -0700)
src/node_stdio_win32.cc
patch
|
blob
|
history
diff --git
a/src/node_stdio_win32.cc
b/src/node_stdio_win32.cc
index
f76c71b
..
489508c
100644
(file)
--- a/
src/node_stdio_win32.cc
+++ b/
src/node_stdio_win32.cc
@@
-25,6
+25,7
@@
#include <v8.h>
#include <errno.h>
+#include <fcntl.h>
#include <io.h>
#include <platform_win32.h>
@@
-663,6
+664,11
@@
void Stdio::Initialize(v8::Handle<v8::Object> target) {
uv_async_init(&tty_avail_notifier, tty_poll);
uv_unref();
+ /* Set stdio streams to binary mode. */
+ _setmode(_fileno(stdin), _O_BINARY);
+ _setmode(_fileno(stdout), _O_BINARY);
+ _setmode(_fileno(stderr), _O_BINARY);
+
name_symbol = NODE_PSYMBOL("name");
shift_symbol = NODE_PSYMBOL("shift");
ctrl_symbol = NODE_PSYMBOL("ctrl");