diff --git a/lib/chdir-long.h b/lib/chdir-long.h index 4d1b0019a..47fa79160 100644 --- a/lib/chdir-long.h +++ b/lib/chdir-long.h @@ -17,4 +17,19 @@ /* Written by Jim Meyering. */ +#include +#include + +#ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# endif +#endif + +/* On systems without PATH_MAX, presume that chdir accepts + arbitrarily long directory names. */ +#ifndef PATH_MAX +# define chdir_long(Dir) chdir (Dir) +#else int chdir_long (char const *dir); +#endif