]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: don't use gnulib's pathmax module; define PATH_MAX if needed
authorJim Meyering <meyering@redhat.com>
Fri, 24 Jun 2011 07:12:59 +0000 (09:12 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 25 Jun 2011 05:59:13 +0000 (07:59 +0200)
* bootstrap.conf (gnulib_modules): Remove pathmax.
* src/system.h: Don't include "pathmax.h".
(PATH_MAX) [!PATH_MAX]: Define to 8192.  Defining it to a constant
is preferable to using a definition from pathmax.h that might expand
to pathconf ("/", _PC_PATH_MAX). Prompted by discussion leading to:
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/27183/focus=27269

bootstrap.conf
src/system.h

index c9983849307a77c18df8feb4c42cc033fefe3b99..08bfc21864f09128d5dac46d2e78af7748950422 100644 (file)
@@ -158,7 +158,6 @@ gnulib_modules="
   nproc
   obstack
   parse-datetime
-  pathmax
   perl
   physmem
   posix-shell
index 95ef2c3b36db7382258c559d53b790dd33bca42b..d250d94f8da65a558cdf6d5be46f10a4931af652 100644 (file)
@@ -40,11 +40,10 @@ you must include <sys/types.h> before including this file
 
 #include <unistd.h>
 
-/* limits.h must come before pathmax.h because limits.h on some systems
-   undefs PATH_MAX, whereas pathmax.h sets PATH_MAX.  */
 #include <limits.h>
-
-#include "pathmax.h"
+#ifndef PATH_MAX
+# define PATH_MAX 8192
+#endif
 
 #include "configmake.h"