mingw.h: permit arguments with side effects for is_dir_sep
[gitweb.git] / compat / mingw.h
index 034fff9479d03d2a2e3c7017a4fe4131461f0ec6..d2168c1e5eeecb4f680881486288829aaba2fa5d 100644 (file)
@@ -395,7 +395,11 @@ HANDLE winansi_get_osfhandle(int fd);
        (isalpha(*(path)) && (path)[1] == ':' ? 2 : 0)
 int mingw_skip_dos_drive_prefix(char **path);
 #define skip_dos_drive_prefix mingw_skip_dos_drive_prefix
-#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
+static inline int mingw_is_dir_sep(int c)
+{
+       return c == '/' || c == '\\';
+}
+#define is_dir_sep mingw_is_dir_sep
 static inline char *mingw_find_last_dir_sep(const char *path)
 {
        char *ret = NULL;