Code

Windows: Treat Windows style path names.
[git.git] / compat / mingw.h
index e5c0c6ba210d6a21dde1d5da9edc41cab4f3c0f1..a954014ff2a815a931fcb968308aa11739b544c1 100644 (file)
@@ -132,3 +132,18 @@ int getpagesize(void);     /* defined in MinGW's libgcc.a */
 struct passwd *getpwuid(int uid);
 int setitimer(int type, struct itimerval *in, struct itimerval *out);
 int sigaction(int sig, struct sigaction *in, struct sigaction *out);
+
+/*
+ * replacements of existing functions
+ */
+
+char *mingw_getcwd(char *pointer, int len);
+#define getcwd mingw_getcwd
+
+/*
+ * git specific compatibility
+ */
+
+#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
+#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
+#define PATH_SEP ';'