summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dtable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 8f8b14aa1..32c4a4347 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -151,7 +151,7 @@ void
hinfo::init_std_file_from_handle (int fd, HANDLE handle,
DWORD myaccess, const char *name)
{
- int bin = __fmode;
+ int bin = binmode ? O_BINARY : 0;
/* Check to see if we're being redirected - if not then
we open then as consoles */
if (fd == 0 || fd == 1 || fd == 2)