summaryrefslogtreecommitdiffstats
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-06-30 02:09:17 +0200
committerJunio C Hamano <gitster@pobox.com>2011-06-30 02:09:17 +0200
commit033c2dc4364042b9e6dbd44e82e1974f78a72567 (patch)
tree8a7dc969376cd254dd46e5f4038f9592929f8a7a /git-compat-util.h
parentMerge branch 'js/i18n-windows' (diff)
parentverify_dotfile(): do not assume '/' is the path seperator (diff)
downloadgit-033c2dc4364042b9e6dbd44e82e1974f78a72567.tar.xz
git-033c2dc4364042b9e6dbd44e82e1974f78a72567.zip
Merge branch 'ef/maint-win-verify-path'
* ef/maint-win-verify-path: verify_dotfile(): do not assume '/' is the path seperator verify_path(): simplify check at the directory boundary verify_path: consider dos drive prefix real_path: do not assume '/' is the path seperator A Windows path starting with a backslash is absolute
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index e0bb81ed8d..a75530df7b 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -215,6 +215,10 @@ extern char *gitbasename(char *);
#define is_dir_sep(c) ((c) == '/')
#endif
+#ifndef find_last_dir_sep
+#define find_last_dir_sep(path) strrchr(path, '/')
+#endif
+
#if __HP_cc >= 61000
#define NORETURN __attribute__((noreturn))
#define NORETURN_PTR