[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] maint: don't use gnulib's pathmax module; define PATH_MAX if nee
From: |
Jim Meyering |
Subject: |
[PATCH] maint: don't use gnulib's pathmax module; define PATH_MAX if needed |
Date: |
Fri, 24 Jun 2011 09:36:34 +0200 |
Prompted by recent discussion on bug-gnulib,
>From 0bcfe87631993b3bd60bbc37ba26f2e267ebb8c6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 24 Jun 2011 09:12:59 +0200
Subject: [PATCH] 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
---
bootstrap.conf | 1 -
src/system.h | 7 +++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index c998384..08bfc21 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 95ef2c3..d250d94 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"
--
1.7.6.rc2.302.gc2115
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] maint: don't use gnulib's pathmax module; define PATH_MAX if needed,
Jim Meyering <=