]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Fail via #error if PATH_MAX is not defined, since
authorJim Meyering <jim@meyering.net>
Sat, 11 Dec 2004 11:18:53 +0000 (11:18 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 11 Dec 2004 11:18:53 +0000 (11:18 +0000)
this file is now compiled only on systems that define PATH_MAX.

lib/chdir-long.c

index cb9b7d725f5f1fe8e66166ceeee53ba6826f2a97..4525168c377c74f285a55aebae20457a0d66043f 100644 (file)
 #endif
 
 #ifndef PATH_MAX
-# ifdef        MAXPATHLEN
-#  define PATH_MAX MAXPATHLEN
-# else
-#  error "use this module only if your system defines PATH_MAX"
-# endif
+# error "use this module only if your system defines PATH_MAX"
 #endif
 
 /* FIXME: this use of `MIN' is our sole concession to arbitrary limitations.
@@ -65,7 +61,7 @@ struct cd_buf
      above, we'll still have to avoid allocating 2^31 bytes on
      systems that define PATH_MAX to very large number.
      Ideally, we'd allocate enough to deal with most names, and
-     dynamically increase the buffer size only necessary.  */
+     dynamically increase the buffer size only when necessary.  */
   char buffer[MAX_COMPONENT_LENGTH + 1];
   char *avail;
   int fd;