X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-compat-util.h;h=ddfbf771492c599e7a6ca04bb39962cf4c7a784c;hb=66c8448543432308e8fce5e3e04076e875410f67;hp=e0bb81ed8d0bd89f18b31b1c03d3e23744aea5a1;hpb=2cd517cdd3f52bcfb5a87e6991560cc000b11089;p=git.git diff --git a/git-compat-util.h b/git-compat-util.h index e0bb81ed8..ddfbf7714 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -215,10 +215,14 @@ 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 -#elif defined(__GNUC__) +#elif defined(__GNUC__) && !defined(NO_NORETURN) #define NORETURN __attribute__((__noreturn__)) #define NORETURN_PTR __attribute__((__noreturn__)) #elif defined(_MSC_VER)