summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-02 11:19:26 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-02 11:19:26 +0000
commite8587abc42f83e4f8a2936c8a984f2a0585e982a (patch)
tree2955befb5afb016e25f51eaa345f4d53f5d8055b
parent2b1441ecf5d3789557a5f2ecc26fe0736e8b8123 (diff)
downloadmandoc-e8587abc42f83e4f8a2936c8a984f2a0585e982a.tar.gz
1.13 backport: handle absence of PATH_MAX
-rw-r--r--Makefile1
-rwxr-xr-xconfigure2
-rw-r--r--configure.local.example1
3 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9dde8f1c..b904adb0 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ TESTSRCS = test-dirent-namlen.c \
test-mmap.c \
test-nanosleep.c \
test-ohash.c \
+ test-PATH_MAX.c \
test-pledge.c \
test-progname.c \
test-reallocarray.c \
diff --git a/configure b/configure
index bdc5e716..16520d6f 100755
--- a/configure
+++ b/configure
@@ -209,6 +209,7 @@ runtest getsubopt GETSUBOPT || true
runtest isblank ISBLANK || true
runtest mkdtemp MKDTEMP || true
runtest mmap MMAP || true
+runtest PATH_MAX PATH_MAX || true
runtest pledge PLEDGE || true
runtest sandbox_init SANDBOX_INIT || true
runtest progname PROGNAME || true
@@ -351,6 +352,7 @@ echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
[ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
[ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
+[ ${HAVE_PATH_MAX} -eq 0 ] && echo "#define PATH_MAX 4096"
cat << __HEREDOC__
#define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}
diff --git a/configure.local.example b/configure.local.example
index cb39ee92..24d8611c 100644
--- a/configure.local.example
+++ b/configure.local.example
@@ -272,6 +272,7 @@ HAVE_GETSUBOPT=0
HAVE_ISBLANK=0
HAVE_MKDTEMP=0
HAVE_MMAP=0
+HAVE_PATH_MAX=0
HAVE_PLEDGE=0
HAVE_PROGNAME=0
HAVE_REALLOCARRAY=0