aboutsummaryrefslogtreecommitdiffstats
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/ChangeLog15
-rw-r--r--posix/gawkmisc.c12
2 files changed, 26 insertions, 1 deletions
diff --git a/posix/ChangeLog b/posix/ChangeLog
index 54fd5144..6686dc00 100644
--- a/posix/ChangeLog
+++ b/posix/ChangeLog
@@ -1,3 +1,18 @@
+Mon Oct 22 08:49:05 2007 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Release 3.1.6: Release tar file made.
+
+Sun Apr 2 21:43:02 2006 Corinna Vinschen <vinschen@redhat.com>
+
+ * gawkmisc.c (os_setbinmode): Call `setmode' for Cygwin.
+ (cygwin_premain0, cygwin_premain2): Change type of `myself'
+ parameter to `void *'.
+
+Sun Mar 12 22:45:11 2006 Corinna Vinschen <vinschen@redhat.com>
+
+ * gawkmisc.c (cygwin_premain2): New function.
+ Fixes CR-LF problem with already open stdin.
+
Tue Jul 26 21:46:16 2005 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.5: Release tar file made.
diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c
index 5f9dec82..242d1e02 100644
--- a/posix/gawkmisc.c
+++ b/posix/gawkmisc.c
@@ -207,6 +207,9 @@ int
os_setbinmode(fd, mode)
int fd, mode;
{
+#ifdef __CYGWIN__
+ setmode (fd, mode);
+#endif
return 0;
}
@@ -221,11 +224,12 @@ int fd;
}
#ifdef __CYGWIN__
+#include <stdio.h>
#include <sys/cygwin.h>
extern int _fmode;
void
-cygwin_premain0 (int argc, char **argv, struct per_process *myself)
+cygwin_premain0 (int argc, char **argv, void *myself)
{
static struct __cygwin_perfile pf[] =
{
@@ -235,4 +239,10 @@ cygwin_premain0 (int argc, char **argv, struct per_process *myself)
};
cygwin_internal (CW_PERFILE, pf);
}
+
+void
+cygwin_premain2 (int argc, char **argv, void *myself)
+{
+ setmode (fileno (stdin), O_TEXT);
+}
#endif