real_path: do not assume '/' is the path seperator
[gitweb.git] / git-compat-util.h
index 79b5122b4f75697413b23b45646813bef8705ba9..15bf3ef81010a90498e4773f54e39a9286a9f0c5 100644 (file)
@@ -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