diff options
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 607dca7534..8ba576e81e 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -320,26 +320,6 @@ char *gitdirname(char *); #define PATH_MAX 4096 #endif -#ifndef PRIuMAX -#define PRIuMAX "llu" -#endif - -#ifndef SCNuMAX -#define SCNuMAX PRIuMAX -#endif - -#ifndef PRIu32 -#define PRIu32 "u" -#endif - -#ifndef PRIx32 -#define PRIx32 "x" -#endif - -#ifndef PRIo32 -#define PRIo32 "o" -#endif - typedef uintmax_t timestamp_t; #define PRItime PRIuMAX #define parse_timestamp strtoumax @@ -397,6 +377,10 @@ static inline int git_offset_1st_component(const char *path) #define offset_1st_component git_offset_1st_component #endif +#ifndef is_valid_path +#define is_valid_path(path) 1 +#endif + #ifndef find_last_dir_sep static inline char *git_find_last_dir_sep(const char *path) { @@ -405,6 +389,14 @@ static inline char *git_find_last_dir_sep(const char *path) #define find_last_dir_sep git_find_last_dir_sep #endif +#ifndef has_dir_sep +static inline int git_has_dir_sep(const char *path) +{ + return !!strchr(path, '/'); +} +#define has_dir_sep(path) git_has_dir_sep(path) +#endif + #ifndef query_user_email #define query_user_email() NULL #endif |