Permalink
Browse files

Windows: open files in binary mode

  • Loading branch information...
1 parent aa95e57 commit 6329633a3e34ea9f5088757bd6c1a2c7c4c85a1e @piscisaureus piscisaureus committed with ry Feb 4, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/node_file.cc
View
@@ -870,6 +870,11 @@ void InitFs(Handle<Object> target) {
stats_constructor_template->GetFunction());
StatWatcher::Initialize(target);
File::Initialize(target);
+
+#ifdef __MINGW32__
+ // Open files in binary mode by default
+ _fmode = _O_BINARY;
+#endif
}
} // end namespace node

0 comments on commit 6329633

Please sign in to comment.