diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 14:49:57 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 14:49:57 +0300 |
commit | 6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f (patch) | |
tree | 9a2862cc11be4832f188cfbdce175120ceba5024 /posix/gawkmisc.c | |
parent | 315bd501ca696bc3e3c938b4604d8dac7a6f512f (diff) | |
download | egawk-6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f.tar.gz egawk-6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f.tar.bz2 egawk-6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f.zip |
Move to gawk-3.1.6.
Diffstat (limited to 'posix/gawkmisc.c')
-rw-r--r-- | posix/gawkmisc.c | 12 |
1 files changed, 11 insertions, 1 deletions
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 |