diff options
author | Jim Meyering <jim@meyering.net> | 2004-11-30 14:45:28 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-11-30 14:45:28 +0000 |
commit | 8f3175736e64de81eb55ee2e57f08689d107dfee (patch) | |
tree | b3611f2f833af1afca746eb8843f6fcd8ba6c88d /lib | |
parent | 86c716db617796d194a02d8ea133fc85db3bae9b (diff) | |
download | coreutils-8f3175736e64de81eb55ee2e57f08689d107dfee.tar.xz |
[!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chdir-long.h | 15 |
1 files changed, 15 insertions, 0 deletions
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 <unistd.h> +#include <limits.h> + +#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 |