summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-06-24 09:12:59 +0200
committerJim Meyering <meyering@redhat.com>2011-06-25 07:59:13 +0200
commit54cbe6e6434d3a148778ff72eebc75b3ca98cd34 (patch)
tree3641fd48491058ab590ebadc74d7397ac6eebd55
parent5f4a1cda6734982792369760ccc4cff0fb5113ab (diff)
downloadcoreutils-54cbe6e6434d3a148778ff72eebc75b3ca98cd34.tar.xz
maint: don't use gnulib's pathmax module; define PATH_MAX if needed
* 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
-rw-r--r--bootstrap.conf1
-rw-r--r--src/system.h7
2 files changed, 3 insertions, 5 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index c99838493..08bfc2186 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -158,7 +158,6 @@ gnulib_modules="
nproc
obstack
parse-datetime
- pathmax
perl
physmem
posix-shell
diff --git a/src/system.h b/src/system.h
index 95ef2c3b3..d250d94f8 100644
--- a/src/system.h
+++ b/src/system.h
@@ -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"