From 8f3175736e64de81eb55ee2e57f08689d107dfee Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 30 Nov 2004 14:45:28 +0000 Subject: [PATCH] [!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd. --- lib/chdir-long.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/chdir-long.h b/lib/chdir-long.h index 4d1b001..47fa791 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 -- 2.7.4