From 370a1dad18129837c95188f91edef6e3e12cd9d0 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sat, 8 Dec 2007 23:15:32 +0100 Subject: [PATCH] Don't make the extra check for errno == EINVAL MinGW specific. This saves an #ifdef. There is precedent for an extra check without #ifdef brackets already in refs.c (Solaris). The check for EINVAL shouldn't hurt. Signed-off-by: Johannes Sixt --- write_or_die.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/write_or_die.c b/write_or_die.c index 40b046acb0..f3b8566ab8 100644 --- a/write_or_die.c +++ b/write_or_die.c @@ -34,16 +34,12 @@ void maybe_flush_or_die(FILE *f, const char *desc) return; } if (fflush(f)) { -#ifndef __MINGW32__ - if (errno == EPIPE) -#else /* * On Windows, EPIPE is returned only by the first write() * after the reading end has closed its handle; subsequent * write()s return EINVAL. */ if (errno == EPIPE || errno == EINVAL) -#endif exit(0); die("write failure on %s: %s", desc, strerror(errno)); }