From: Junio C Hamano Date: Sat, 16 Sep 2006 05:47:21 +0000 (-0700) Subject: Define fallback PATH_MAX on systems that do not define one in X-Git-Tag: v1.4.3-rc1~100 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d0c2449f7805ee35b97c5dcb22845f157da1cea4;p=git.git Define fallback PATH_MAX on systems that do not define one in Notably on GNU/Hurd, as reported by Gerrit Pape. Signed-off-by: Junio C Hamano --- diff --git a/builtin.h b/builtin.h index 25431d708..398eafbf9 100644 --- a/builtin.h +++ b/builtin.h @@ -1,8 +1,7 @@ #ifndef BUILTIN_H #define BUILTIN_H -#include -#include +#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 552b8ec23..0272d043d 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -26,6 +26,13 @@ #include #include +/* On most systems 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