]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
[!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd.
authorJim Meyering <jim@meyering.net>
Tue, 30 Nov 2004 14:45:28 +0000 (14:45 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 30 Nov 2004 14:45:28 +0000 (14:45 +0000)
lib/chdir-long.h

index 4d1b0019a181916497774edd55a954514e06cb1c..47fa7916073c7b2ba0eb6c00f4f888b8ba2a1f14 100644 (file)
 
 /* 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