diff options
author | Junio C Hamano <junkio@cox.net> | 2006-09-15 22:47:21 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-15 22:47:21 -0700 |
commit | d0c2449f7805ee35b97c5dcb22845f157da1cea4 (patch) | |
tree | 3c13396d15949269f4aea75422b4eb2bc77b1342 /git-compat-util.h | |
parent | 17fd965d215060a10911db99c2dacf9c3554787a (diff) | |
download | git-d0c2449f7805ee35b97c5dcb22845f157da1cea4.tar.gz |
Define fallback PATH_MAX on systems that do not define one in <limits.h>
Notably on GNU/Hurd, as reported by Gerrit Pape.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 552b8ec23a..0272d043d0 100644 --- 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 |