summaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-11-15 21:22:47 (GMT)
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-23 11:38:07 (GMT)
commit3e4a1ba07b65506c36f7f40fa76fcee26c400a5c (patch)
treeb17b947348df45d0c1b44d315a119a04c0430cbb /compat/mingw.h
parent23326d14edbd16469453f6c3ecdd98ab90e6efb7 (diff)
downloadgit-3e4a1ba07b65506c36f7f40fa76fcee26c400a5c.zip
git-3e4a1ba07b65506c36f7f40fa76fcee26c400a5c.tar.gz
git-3e4a1ba07b65506c36f7f40fa76fcee26c400a5c.tar.bz2
Windows: Implement a wrapper of the open() function.
The wrapper does two things: - Requests to open /dev/null are redirected to open the nul pseudo file. - A request to open a file that currently exists as a directory on Windows fails with EACCES; this is changed to EISDIR. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index a954014..901cfa7 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -137,6 +137,9 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out);
* replacements of existing functions
*/
+int mingw_open (const char *filename, int oflags, ...);
+#define open mingw_open
+
char *mingw_getcwd(char *pointer, int len);
#define getcwd mingw_getcwd