diff options
author | Johannes Sixt <j6t@kdbg.org> | 2012-10-17 11:05:51 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-17 11:33:42 +0400 |
commit | 84adb641545f4b58f9276adf099f840ea2928e44 (patch) | |
tree | d254096fe4a3e94ac9f79d88be6dd83cf6c21590 /compat/mingw.h | |
parent | bafc478f1618534fcb85bedc0fa224bd2d462441 (diff) |
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>
Diffstat (limited to 'compat/mingw.h')
-rw-r--r-- | compat/mingw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index 61a652138a..eeb08d120b 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -185,6 +185,9 @@ FILE *mingw_fopen (const char *filename, const char *otype); FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream); #define freopen mingw_freopen +int mingw_fflush(FILE *stream); +#define fflush mingw_fflush + char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd |