From dfe569334ab9e5bfbb80d0aacf275fafa6a46afb Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 30 May 2002 19:35:51 +0000 Subject: [PATCH] * mkpasswd.cc (main): Don't reset to binmode if stdout is a terminal. --- winsup/utils/ChangeLog | 4 ++++ winsup/utils/mkpasswd.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 7d8f2b193..fc8df5f82 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +2002-05-30 Christopher Faylor + + * mkpasswd.cc (main): Don't reset to binmode if stdout is a terminal. + 2002-05-29 Christopher Faylor * mount.cc (main): Make -b the default. diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c index 982478980..63a81aabd 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) {