2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Avoid use of "local" in /bin/sh-based script (#26)

Looks like `/bin/sh` on Solaris doesn't have extra `bash`/`ksh` features, and [`local` is not in POSIX](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html).

Closes: boostorg/build#722
This commit is contained in:
Tanzinul Islam
2021-05-03 19:47:52 +01:00
committed by GitHub
parent 5b4ae4477c
commit da7efaa25b

View File

@@ -111,9 +111,7 @@ test_uname ()
test_compiler ()
{
local EXE="${B2_CXX_OPT:-$1}"
local CMD
local SETUP
EXE="${B2_CXX_OPT:-$1}"
shift
CMD="${EXE} $@ ${B2_CXXFLAGS_OPT:-}"
SETUP=${B2_SETUP:-true}
@@ -123,7 +121,7 @@ test_compiler ()
else
( ${SETUP} ; ${CMD} check_cxx11.cpp ) 1>/dev/null 2>/dev/null
fi
local CHECK_RESULT=$?
CHECK_RESULT=$?
if test_true ${CHECK_RESULT} ; then
B2_CXX=${CMD}
fi