43 lines
990 B
Diff
43 lines
990 B
Diff
From 34e05f3e05e958a77a219c457bc5a47bb754a6ae Mon Sep 17 00:00:00 2001
|
|
From: Orgad Shaneh <orgads@gmail.com>
|
|
Date: Mon, 26 Feb 2018 08:10:42 +0200
|
|
Subject: [PATCH] Revert "Update posix/gawkmisc.c - remove cygwin code."
|
|
|
|
It broke stripping of \r on Windows.
|
|
|
|
This reverts commit 5db38f775d9ba239e125d81dff2010a2ddacb48e.
|
|
---
|
|
posix/gawkmisc.c | 19 +++++++++++++++++++
|
|
1 file changed, 19 insertions(+)
|
|
|
|
diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c
|
|
index ecf5aff9..40950826 100644
|
|
--- a/posix/gawkmisc.c
|
|
+++ b/posix/gawkmisc.c
|
|
@@ -289,3 +289,22 @@ void
|
|
init_sockets(void)
|
|
{
|
|
}
|
|
+
|
|
+#ifdef __MSYS__
|
|
+void
|
|
+cygwin_premain0(int argc, char **argv, struct per_process *myself)
|
|
+{
|
|
+ static struct __cygwin_perfile pf[] = {
|
|
+ { "", O_RDONLY | O_TEXT },
|
|
+ /*{ "", O_WRONLY | O_BINARY },*/
|
|
+ { NULL, 0 }
|
|
+ };
|
|
+ cygwin_internal(CW_PERFILE, pf);
|
|
+}
|
|
+
|
|
+void
|
|
+cygwin_premain2(int argc, char **argv, struct per_process *myself)
|
|
+{
|
|
+ setmode(fileno (stdin), O_TEXT);
|
|
+}
|
|
+#endif
|
|
--
|
|
2.16.2.windows.1
|
|
|