aboutsummaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-03 14:16:06 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-03 14:16:06 -0800
commite01c6b15c97e30baedc45021e6dcbd90140616cd (patch)
treeef740ad7bbef152f294149f3ad10f95de0919025 /compat/mingw.h
parentebcdd635c58e89dbf931a9f90a1b248fb5e90315 (diff)
parente7d5ce816579723150c341116737fb51d8e33eb3 (diff)
downloadgit-e01c6b15c97e30baedc45021e6dcbd90140616cd.tar.gz
git-e01c6b15c97e30baedc45021e6dcbd90140616cd.tar.xz
Merge branch 'js/dirname-basename'
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 093a9771b..8c5bf5076 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -383,7 +383,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)
{