aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-12-01 22:46:18 +0200
committerArnold D. Robbins <arnold@skeeve.com>2021-12-01 22:46:18 +0200
commit0521e672efdbfdaedabfacca03c7a535b4f8526c (patch)
tree96c5db398195d2b81d66a891fae0848b97bfe87d /main.c
parenta22095c81a677b82accccb53cab91052cdc0cbfe (diff)
parentf77e1318c515d495ac9c08bdfdf2dadf79a9649f (diff)
downloadegawk-0521e672efdbfdaedabfacca03c7a535b4f8526c.tar.gz
egawk-0521e672efdbfdaedabfacca03c7a535b4f8526c.tar.bz2
egawk-0521e672efdbfdaedabfacca03c7a535b4f8526c.zip
Merge branch 'gawk-5.1-stable'
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/main.c b/main.c
index fae3b3a9..2ca0dc85 100644
--- a/main.c
+++ b/main.c
@@ -654,10 +654,8 @@ 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
+ os_maybe_set_errno();
+
/* don't warn about stdout/stderr if EPIPE, but do error exit */
if (errno == EPIPE)
die_via_sigpipe();
@@ -704,10 +702,8 @@ 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
+ os_maybe_set_errno();
+
/* don't warn about stdout if EPIPE, but do error exit */
if (errno != EPIPE)
warning(_("error writing standard output: %s"), strerror(errno));