From d36f9827b0d45f36d2200a91b9b5600708e2b489 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 2 Aug 2016 11:19:26 +0000 Subject: 1.13 backport: handle absence of PATH_MAX --- Makefile | 3 ++- configure | 4 +++- configure.local.example | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 22dff56c..aca73e41 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.488.2.1 2016/07/20 14:14:07 schwarze Exp $ +# $Id: Makefile,v 1.488.2.2 2016/08/02 11:19:26 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013-2016 Ingo Schwarze @@ -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 f77bcc8d..c60f9e1b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: configure,v 1.43.2.2 2016/07/31 09:47:01 schwarze Exp $ +# $Id: configure,v 1.43.2.3 2016/08/02 11:19:26 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016 Ingo Schwarze # @@ -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 9ae2e3cf..9e2ad874 100644 --- a/configure.local.example +++ b/configure.local.example @@ -1,4 +1,4 @@ -# $Id: configure.local.example,v 1.14.2.2 2016/07/31 09:47:01 schwarze Exp $ +# $Id: configure.local.example,v 1.14.2.3 2016/08/02 11:19:26 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016 Ingo Schwarze # @@ -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 -- cgit v1.2.3-56-ge451