Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-05-30 23:35:51 +0400
committerChristopher Faylor <me@cgf.cx>2002-05-30 23:35:51 +0400
commitdfe569334ab9e5bfbb80d0aacf275fafa6a46afb (patch)
treebfa6d757ef1cf309a5c4a3eb7def10f20ced6d22 /winsup/utils
parent5fe3a988af58d1686749135b9fb1a539232abd2c (diff)
* mkpasswd.cc (main): Don't reset to binmode if stdout is a terminal.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog4
-rw-r--r--winsup/utils/mkpasswd.c3
2 files changed, 6 insertions, 1 deletions
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 <cgf@redhat.com>
+
+ * mkpasswd.cc (main): Don't reset to binmode if stdout is a terminal.
+
2002-05-29 Christopher Faylor <cgf@redhat.com>
* 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)
{