summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2012-03-22 04:50:26 +0000
committerPádraig Brady <P@draigBrady.com>2012-03-22 12:12:26 +0000
commit049f1dbe6869a4918c9b2181b1014db6c0e3259b (patch)
treebe1a763446c0ace26a06a6430c59dc1189449c4c
parent1b1d656b2d53c52fa807656ea648dbfa058be6d2 (diff)
downloadcoreutils-049f1dbe6869a4918c9b2181b1014db6c0e3259b.tar.xz
maint: ensure PATH_MAX is set correctly
This reverts part of commit v8.12-103-g54cbe6e. * src/system.h: Include gnulib's pathmax.h to honor system specific limits, and then we set PATH_MAX only if needed. Note pathmax.h no longer uses pathconf ("/", _PC_PATH_MAX). Note I didn't reinstate the comments about limits.h inclusion order, because pathmax.h includes limits.h anyway.
-rw-r--r--bootstrap.conf1
-rw-r--r--src/system.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 3980259d7..bb414ef02 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -171,6 +171,7 @@ gnulib_modules="
nproc
obstack
parse-datetime
+ pathmax
perl
physmem
pipe
diff --git a/src/system.h b/src/system.h
index 49cd08a3b..93d48c57d 100644
--- a/src/system.h
+++ b/src/system.h
@@ -41,6 +41,8 @@ you must include <sys/types.h> before including this file
#include <unistd.h>
#include <limits.h>
+
+#include "pathmax.h"
#ifndef PATH_MAX
# define PATH_MAX 8192
#endif