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:
authorCorinna Vinschen <corinna@vinschen.de>2017-02-24 22:55:14 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-02-24 22:55:14 +0300
commitf5ecacfc6ccf4cd5c9fcd1601ad9919828b80a1d (patch)
treebbe71c9169417ccff44b81f0e8ff16538b8f5f2a /winsup/utils/cygcheck.cc
parentfa9d3148bff3f1839ba813dde66855ebd65e356a (diff)
Generate output with Unix line endings even from Mingw64 utils
This affects cygcheck and strace. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index e745b20e5..2d5cda382 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -14,6 +14,7 @@
#include <string.h>
#include <sys/time.h>
#include <ctype.h>
+#include <fcntl.h>
#include <io.h>
#include <windows.h>
#include <wininet.h>
@@ -2251,6 +2252,9 @@ main (int argc, char **argv)
bool ok = true;
load_cygwin (argc, argv);
+ _setmode (1, _O_BINARY);
+ _setmode (2, _O_BINARY);
+
/* Need POSIX sorting while parsing args, but don't forget the
user's original environment. */
char *posixly = getenv ("POSIXLY_CORRECT");