diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-03-05 20:21:10 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-03-05 20:21:10 +0200 |
commit | 60c5e72ad30f6c2108574f8c072a386302bc0f51 (patch) | |
tree | 69065edd511777bb788bc214a3a562d1ecfa953b /posix/gawkmisc.c | |
parent | a0753d1e2b362e9e6b4ea35ff6135505758521f6 (diff) | |
parent | 7b77ec860377eafcad05025888721a46b8a7f349 (diff) | |
download | egawk-60c5e72ad30f6c2108574f8c072a386302bc0f51.tar.gz egawk-60c5e72ad30f6c2108574f8c072a386302bc0f51.tar.bz2 egawk-60c5e72ad30f6c2108574f8c072a386302bc0f51.zip |
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'posix/gawkmisc.c')
-rw-r--r-- | posix/gawkmisc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c index ecf5aff9..16cfeb03 100644 --- a/posix/gawkmisc.c +++ b/posix/gawkmisc.c @@ -289,3 +289,23 @@ void init_sockets(void) { } + +// For MSYS, restore behavior of working in text mode. +#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 |