Merge branch 'js/dirname-basename' into maint
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
This commit is contained in:
@ -253,6 +253,8 @@ struct itimerval {
|
||||
#else
|
||||
#define basename gitbasename
|
||||
extern char *gitbasename(char *);
|
||||
#define dirname gitdirname
|
||||
extern char *gitdirname(char *);
|
||||
#endif
|
||||
|
||||
#ifndef NO_ICONV
|
||||
@ -335,6 +337,14 @@ static inline int git_has_dos_drive_prefix(const char *path)
|
||||
#define has_dos_drive_prefix git_has_dos_drive_prefix
|
||||
#endif
|
||||
|
||||
#ifndef skip_dos_drive_prefix
|
||||
static inline int git_skip_dos_drive_prefix(char **path)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#define skip_dos_drive_prefix git_skip_dos_drive_prefix
|
||||
#endif
|
||||
|
||||
#ifndef is_dir_sep
|
||||
static inline int git_is_dir_sep(int c)
|
||||
{
|
||||
|
Reference in New Issue
Block a user