diff options
| author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2008-12-03 23:53:55 +0000 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2008-12-09 08:37:52 -0800 |
| commit | 5ee2fe777c41d9ad9e7eb9fece56fe21f830c5cd (patch) | |
| tree | 436cda88b3b747c66549eb0fc0c89d1102f967c1 /src/common.h | |
| parent | 192678b55c30d0652356a5021b521f8e205f3428 (diff) | |
| download | libgit2-5ee2fe777c41d9ad9e7eb9fece56fe21f830c5cd.tar.gz | |
Add a GIT_PATH_MAX constant
The PATH_MAX symbol is often, but not always, defined
in the <limits.h> header. In particular, on cygwin you
need to include this header to avoid a compilation error.
However, some systems define PATH_MAX to be something as
small as 256, which POSIX is happy to allow, while others
allow much larger values. In general it can vary from
one filesystem to another.
In order to avoid the vagaries of different systems, define
our own symbol.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 1a2e9c0f1..f5be02b49 100644 --- a/src/common.h +++ b/src/common.h @@ -10,4 +10,7 @@ #include <string.h> #include "git/common.h" + +#define GIT_PATH_MAX 4096 + #endif /* INCLUDE_common_h__ */ |
