aboutsummaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-05 14:54:17 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-05 14:54:17 -0800
commit07be1da216debe1f76cd4d03ac5effcb9e40e6c6 (patch)
tree7642a42d6b7348710a13374c6b6dda1b6a51d225 /compat/mingw.h
parent081363dde231346c2f051cd7d41622f6fa02e3cb (diff)
parente7d5ce816579723150c341116737fb51d8e33eb3 (diff)
downloadgit-07be1da216debe1f76cd4d03ac5effcb9e40e6c6.tar.gz
git-07be1da216debe1f76cd4d03ac5effcb9e40e6c6.tar.xz
Merge branch 'js/dirname-basename' into maint
dirname() emulation has been added, as Msys2 lacks it. * js/dirname-basename: mingw: avoid linking to the C library's isalpha() t0060: loosen overly strict expectations t0060: verify that basename() and dirname() work as expected compat/basename.c: provide a dirname() compatibility function compat/basename: make basename() conform to POSIX Refactor skipping DOS drive prefixes
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 57ca477d1..a5fb52f97 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -361,7 +361,10 @@ HANDLE winansi_get_osfhandle(int fd);
* git specific compatibility
*/
-#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
+#define has_dos_drive_prefix(path) \
+ (isalpha(*(path)) && (path)[1] == ':' ? 2 : 0)
+int mingw_skip_dos_drive_prefix(char **path);
+#define skip_dos_drive_prefix mingw_skip_dos_drive_prefix
#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
static inline char *mingw_find_last_dir_sep(const char *path)
{