summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index ce007102f7..fd36d3bfdc 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -236,6 +236,12 @@
#include <sys/sysctl.h>
#endif
+/* Used by compat/win32/path-utils.h, and more */
+static inline int is_xplatform_dir_sep(int c)
+{
+ return c == '/' || c == '\\';
+}
+
#if defined(__CYGWIN__)
#include "compat/win32/path-utils.h"
#endif
@@ -416,11 +422,11 @@ static inline int git_skip_dos_drive_prefix(char **path)
#define skip_dos_drive_prefix git_skip_dos_drive_prefix
#endif
-#ifndef is_dir_sep
static inline int git_is_dir_sep(int c)
{
return c == '/';
}
+#ifndef is_dir_sep
#define is_dir_sep git_is_dir_sep
#endif
@@ -1334,11 +1340,13 @@ void bug_fl(const char *file, int line, const char *fmt, ...);
BUG_fl(__FILE__, __LINE__, __VA_ARGS__); \
} while (0)
+#ifndef FSYNC_METHOD_DEFAULT
#ifdef __APPLE__
#define FSYNC_METHOD_DEFAULT FSYNC_METHOD_WRITEOUT_ONLY
#else
#define FSYNC_METHOD_DEFAULT FSYNC_METHOD_FSYNC
#endif
+#endif
enum fsync_action {
FSYNC_WRITEOUT_ONLY,