summaryrefslogtreecommitdiff
path: root/include/git2/common.h
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-06-15 13:47:41 -0700
committerVicent Martí <tanoku@gmail.com>2011-06-15 13:47:41 -0700
commitef9a6f4cbc4aac143279d7eb37909e78fd7c62cc (patch)
treeeff02adf0c805e3d602bd743e91e63689a275160 /include/git2/common.h
parentf2bb894e6492f54d52d9c8e3d1d554c05916cf69 (diff)
parent0657e46deef98803058a3c339433a2b6dcafcc13 (diff)
downloadlibgit2-ef9a6f4cbc4aac143279d7eb37909e78fd7c62cc.tar.gz
Merge pull request #261 from Romain-Geissler/discovery-path-v2
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
Diffstat (limited to 'include/git2/common.h')
-rw-r--r--include/git2/common.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index 9a27ac2e..ba54ce48 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -76,6 +76,10 @@
# define GIT_FORMAT_PRINTF(a,b) /* empty */
#endif
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#define GIT_WIN32 1
+#endif
+
/**
* @file git2/common.h
* @brief Git common platform definitions
@@ -86,6 +90,22 @@
GIT_BEGIN_DECL
+/**
+ * The separator used in path list strings (ie like in the PATH
+ * environment variable). A semi-colon ";" is used on Windows, and
+ * a colon ":" for all other systems.
+ */
+#ifdef GIT_WIN32
+#define GIT_PATH_LIST_SEPARATOR ';'
+#else
+#define GIT_PATH_LIST_SEPARATOR ':'
+#endif
+
+/**
+ * The maximum length of a git valid git path.
+ */
+#define GIT_PATH_MAX 4096
+
typedef struct {
char **strings;
size_t count;