mingw: support fopen(/dev/null)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2010-03-08 00:41:08 +01:00
parent f535e48922
commit b38a696841

View File

@@ -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