aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils/mkpasswd.c
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-05-30 19:35:51 +0000
committerChristopher Faylor <me@cgf.cx>2002-05-30 19:35:51 +0000
commitdfe569334ab9e5bfbb80d0aacf275fafa6a46afb (patch)
treebfa6d757ef1cf309a5c4a3eb7def10f20ced6d22 /winsup/utils/mkpasswd.c
parent5fe3a988af58d1686749135b9fb1a539232abd2c (diff)
downloadnewlib-dfe569334ab9e5bfbb80d0aacf275fafa6a46afb.zip
newlib-dfe569334ab9e5bfbb80d0aacf275fafa6a46afb.tar.gz
newlib-dfe569334ab9e5bfbb80d0aacf275fafa6a46afb.tar.bz2
* mkpasswd.cc (main): Don't reset to binmode if stdout is a terminal.
Diffstat (limited to 'winsup/utils/mkpasswd.c')
-rw-r--r--winsup/utils/mkpasswd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c
index 9824789..63a81aa 100644
--- a/winsup/utils/mkpasswd.c
+++ b/winsup/utils/mkpasswd.c
@@ -476,7 +476,8 @@ main (int argc, char **argv)
DWORD len;
passed_home_path[0] = '\0';
- setmode (1, O_BINARY);
+ if (!isatty (1))
+ setmode (1, O_BINARY);
if (GetVersion () < 0x80000000)
{