From 496f29fa8ce6ddd5e71ba816282e0522c674ea7d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 2 Sep 2002 07:43:38 +0000 Subject: (NEED_PATHCONF_WRAPPER): Define. (pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set. --- src/pathchk.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3-70-g09d2