From b38a696841b1f1a74b35e5cac7074f8077ff7d07 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 8 Mar 2010 00:41:08 +0100 Subject: [PATCH] mingw: support fopen(/dev/null) Signed-off-by: Johannes Schindelin --- compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index e637209baf..d131092a6e 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -225,7 +225,7 @@ FILE *mingw_fopen (const char *filename, const char *mode) basename((char*)filename)[0] == '.') hide = access(filename, F_OK); - file = fopen(filename, mode); + file = fopen(strcmp(filename, "/dev/null") ? filename : "NUL", mode); /* * In Windows a file or dir starting with a dot is not * automatically hidden. So lets mark it as hidden when