aboutsummaryrefslogtreecommitdiffstats
path: root/posix/gawkmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/gawkmisc.c')
-rw-r--r--posix/gawkmisc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c
index 6ca9ee3d..b421766a 100644
--- a/posix/gawkmisc.c
+++ b/posix/gawkmisc.c
@@ -219,3 +219,20 @@ int fd;
/* no-op */
return;
}
+
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>
+
+extern int _fmode;
+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);
+}
+#endif