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
This commit is contained in:
Jim Meyering 2011-06-24 09:12:59 +02:00
parent 5f4a1cda67
commit 54cbe6e643
2 changed files with 3 additions and 5 deletions

View File

@ -158,7 +158,6 @@ gnulib_modules="
nproc
obstack
parse-datetime
pathmax
perl
physmem
posix-shell

View 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"