diff --git a/compat/mingw.h b/compat/mingw.h index 93ef42b9cf..bf3843272b 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -192,6 +192,7 @@ sig_handler_t mingw_signal(int sig, sig_handler_t handler); * git specific compatibility */ +#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') #define PATH_SEP ';' #define PRIuMAX "I64u" diff --git a/git-compat-util.h b/git-compat-util.h index 4144605725..08f764ef9e 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -113,6 +113,10 @@ #define PATH_SEP ':' #endif +#ifndef has_dos_drive_prefix +#define has_dos_drive_prefix(path) 0 +#endif + #ifdef __GNUC__ #define NORETURN __attribute__((__noreturn__)) #else @@ -467,20 +471,4 @@ void git_qsort(void *base, size_t nmemb, size_t size, # define FORCE_DIR_SET_GID 0 #endif -#ifdef __MINGW32__ - -static inline int has_dos_drive_prefix(const char *path) -{ - return isalpha(*path) && path[1] == ':'; -} - -#else /* __MINGW32__ */ - -static inline int has_dos_drive_prefix(const char *path) -{ - return 0; -} - -#endif /* __MINGW32__ */ - #endif