diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-11 22:24:41 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-11 22:24:41 +0300 |
commit | 967e4b9ec9e1b7cc7ca9968f6fe822f3b1155f53 (patch) | |
tree | 25d98488c29b77686670ea66c6647701493de63a /main.c | |
parent | 75981b3d127c3c97329b5b085bddebf3b40e797d (diff) | |
parent | bd6dc293e35fdeac05bd1577593e111fd09d22b7 (diff) | |
download | egawk-967e4b9ec9e1b7cc7ca9968f6fe822f3b1155f53.tar.gz egawk-967e4b9ec9e1b7cc7ca9968f6fe822f3b1155f53.tar.bz2 egawk-967e4b9ec9e1b7cc7ca9968f6fe822f3b1155f53.zip |
Merge branch 'master' into feature/api-mpfr
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -627,6 +627,10 @@ By default it reads standard input and writes standard output.\n\n"), fp); fflush(fp); if (ferror(fp)) { +#ifdef __MINGW32__ + if (errno == 0 || errno == EINVAL) + w32_maybe_set_errno(); +#endif /* don't warn about stdout/stderr if EPIPE, but do error exit */ if (errno == EPIPE) die_via_sigpipe(); @@ -673,6 +677,10 @@ along with this program. If not, see http://www.gnu.org/licenses/.\n"); fflush(stdout); if (ferror(stdout)) { +#ifdef __MINGW32__ + if (errno == 0 || errno == EINVAL) + w32_maybe_set_errno(); +#endif /* don't warn about stdout if EPIPE, but do error exit */ if (errno != EPIPE) warning(_("error writing standard output (%s)"), strerror(errno)); |