@matheusbsbs / matheus-bagliano / commits / d0c2449f78
Fork 0

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>

Junio C Hamano committed Sep 15, 2006 at 22:47 UTC d0c2449f7805ee35b97c5dcb22845f157da1cea4
2 files changed +8 -2
builtin.h
+1 -2
@@ -1,8 +1,7 @@
1 #ifndef BUILTIN_H
2 #define BUILTIN_H
3
4 -#include <stdio.h>
5 -#include <limits.h>
4 +#include "git-compat-util.h"
5
6 extern const char git_version_string[];
7 extern const char git_usage_string[];
git-compat-util.h
+7
@@ -26,6 +26,13 @@
26 #include <sys/types.h>
27 #include <dirent.h>
28
29 +/* On most systems <limits.h> would have given us this, but
30 + * not on some systems (e.g. GNU/Hurd).
31 + */
32 +#ifndef PATH_MAX
33 +#define PATH_MAX 4096
34 +#endif
35 +
36 #ifdef __GNUC__
37 #define NORETURN __attribute__((__noreturn__))
38 #else