summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-09-02 07:43:38 +0000
committerJim Meyering <jim@meyering.net>2002-09-02 07:43:38 +0000
commit496f29fa8ce6ddd5e71ba816282e0522c674ea7d (patch)
tree7509c57812dac67404bfc5a093920791ac35c149
parent0ea01d21a34447f456ce340bad52f4629cb8d73d (diff)
downloadcoreutils-496f29fa8ce6ddd5e71ba816282e0522c674ea7d.tar.xz
(NEED_PATHCONF_WRAPPER): Define.
(pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
-rw-r--r--src/pathchk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pathchk.c b/src/pathchk.c
index 3fcc12924..2e89b1c8a 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -58,12 +58,15 @@ extern int errno;
#define AUTHORS N_ ("David MacKenzie and Jim Meyering")
+#define NEED_PATHCONF_WRAPPER 0
#if HAVE_PATHCONF
# ifndef PATH_MAX
# define PATH_MAX_FOR(p) pathconf_wrapper ((p), _PC_PATH_MAX)
+# define NEED_PATHCONF_WRAPPER 1
# endif /* not PATH_MAX */
# ifndef NAME_MAX
# define NAME_MAX_FOR(p) pathconf_wrapper ((p), _PC_NAME_MAX);
+# define NEED_PATHCONF_WRAPPER 1
# endif /* not NAME_MAX */
#else
@@ -112,6 +115,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
+#if NEED_PATHCONF_WRAPPER
/* Distinguish between the cases when pathconf fails and when it reports there
is no limit (the latter is the case for PATH_MAX on the Hurd). When there
is no limit, return LONG_MAX. Otherwise, return pathconf's return value. */
@@ -128,6 +132,7 @@ pathconf_wrapper (const char *filename, int param)
return ret;
}
+#endif
void
usage (int status)