Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Define fallback PATH_MAX on systems that do not define one in <limits.h>
author
Junio C Hamano
<junkio@cox.net>
Sat, 16 Sep 2006 05:47:21 +0000
(22:47 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Sat, 16 Sep 2006 05:47:21 +0000
(22:47 -0700)
Notably on GNU/Hurd, as reported by Gerrit Pape.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin.h
patch
|
blob
|
history
git-compat-util.h
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
17fd965
)
diff --git
a/builtin.h
b/builtin.h
index 25431d70816634cec4ca6c54dc670ac536246277..398eafbf995e4bf7a999ea9ff0e573c55e39790b 100644
(file)
--- a/
builtin.h
+++ b/
builtin.h
@@
-1,8
+1,7
@@
#ifndef BUILTIN_H
#define BUILTIN_H
-#include <stdio.h>
-#include <limits.h>
+#include "git-compat-util.h"
extern const char git_version_string[];
extern const char git_usage_string[];
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 552b8ec23a1a927208f1ed4c48d08b513d8572c5..0272d043d0b82dc6ad0ff4836fe8db8ed1e1d960 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-26,6
+26,13
@@
#include <sys/types.h>
#include <dirent.h>
+/* On most systems <limits.h> would have given us this, but
+ * not on some systems (e.g. GNU/Hurd).
+ */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#else