maybe_flush_or_die: move a too-loose Windows specific error
commit84adb641545f4b58f9276adf099f840ea2928e44
authorJohannes Sixt <j6t@kdbg.org>
Wed, 17 Oct 2012 07:05:51 +0000 (17 09:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Oct 2012 07:33:42 +0000 (17 00:33 -0700)
treed254096fe4a3e94ac9f79d88be6dd83cf6c21590
parentbafc478f1618534fcb85bedc0fa224bd2d462441
maybe_flush_or_die: move a too-loose Windows specific error

 check to compat

Commit b2f5e268 (Windows: Work around an oddity when a pipe with no reader
is written to) introduced a check for EINVAL after fflush() to fight
spurious "Invalid argument" errors on Windows when a pipe was broken. But
this check may hide real errors on systems that do not have the this odd
behavior. Introduce an fflush wrapper in compat/mingw.* so that the treatment
is only applied on Windows.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c
compat/mingw.h
write_or_die.c