From: Jim Meyering Date: Tue, 30 Nov 2004 14:45:28 +0000 (+0000) Subject: [!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd. X-Git-Tag: v5.3.0~275 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f3175736e64de81eb55ee2e57f08689d107dfee;p=thirdparty%2Fcoreutils.git [!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd. --- diff --git a/lib/chdir-long.h b/lib/chdir-long.h index 4d1b0019a1..47fa791607 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