On 03/22/2012 10:53 AM, Eric Blake wrote: > On 03/21/2012 10:53 PM, Pádraig Brady wrote: >> * src/system.h: Include gnulib's pathmax.h to ensure >> we set PATH_MAX only if needed. >> --- >> src/system.h | 1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/src/system.h b/src/system.h >> index 49cd08a..e3773bf 100644 >> --- a/src/system.h >> +++ b/src/system.h >> @@ -41,6 +41,7 @@ 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 > > ACK, once you also modify bootstrap.conf to call out an explicit > dependency on the 'pathmax' module (right now, we're getting it > implicitly via transitive closure). >
Cool thanks. Adjusting that led me to: http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/27183/focus=27269 Updated patch attached. cheers, Pádraig.
From 3ae499097eb6ccaa70a472f8cf151837454239d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com> Date: Thu, 22 Mar 2012 04:50:26 +0000 Subject: [PATCH] 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). --- bootstrap.conf | 1 + src/system.h | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 3980259..bb414ef 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 49cd08a..dd9208e 100644 --- a/src/system.h +++ b/src/system.h @@ -40,7 +40,11 @@ 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 may set PATH_MAX. */ #include <limits.h> + +#include "pathmax.h" #ifndef PATH_MAX # define PATH_MAX 8192 #endif -- 1.7.6.4