summaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-02-28 05:17:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-02-28 05:17:37 (GMT)
commit70ae2beadd45d1874ffbfba2d5c45ea9fd2af12c (patch)
tree6e87711dc4f32058c3e2c5a8de7c3b688fa6ad38 /compat/mingw.h
parent42e3086bf6cf054b9a437235e8b9669b22478d08 (diff)
parentab1a11be7858e1f92ee2e4ee1d70fabe7d5fe0ee (diff)
downloadgit-70ae2beadd45d1874ffbfba2d5c45ea9fd2af12c.zip
git-70ae2beadd45d1874ffbfba2d5c45ea9fd2af12c.tar.gz
git-70ae2beadd45d1874ffbfba2d5c45ea9fd2af12c.tar.bz2
Merge branch 'hv/mingw-fs-funnies'
* hv/mingw-fs-funnies: mingw_rmdir: set errno=ENOTEMPTY when appropriate mingw: add fallback for rmdir in case directory is in use mingw: make failures to unlink or move raise a question mingw: work around irregular failures of unlink on windows mingw: move unlink wrapper to mingw.c
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index cafc1eb..fe6ba34 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -119,14 +119,6 @@ static inline int mingw_mkdir(const char *path, int mode)
}
#define mkdir mingw_mkdir
-static inline int mingw_unlink(const char *pathname)
-{
- /* read-only files cannot be removed */
- chmod(pathname, 0666);
- return unlink(pathname);
-}
-#define unlink mingw_unlink
-
#define WNOHANG 1
pid_t waitpid(pid_t pid, int *status, unsigned options);
@@ -174,6 +166,12 @@ int link(const char *oldpath, const char *newpath);
* replacements of existing functions
*/
+int mingw_unlink(const char *pathname);
+#define unlink mingw_unlink
+
+int mingw_rmdir(const char *path);
+#define rmdir mingw_rmdir
+
int mingw_open (const char *filename, int oflags, ...);
#define open mingw_open