From 26d0559df82a00acf85b8ec89541ee8e09bb3e55 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 31 Aug 2010 12:46:41 +0000 Subject: [PATCH] 1.0.42.7: fix shell scripts on Solaris (and FreeBSD?) * Patch by Josh Elsasser, lp#615497. * Fixes for run-sbcl.sh and tests/subr.sh on Solaris, some of which I believe were also necessary on FreeBSD. * A missing #include needed on Solaris is also added. --- run-sbcl.sh | 13 ++++++++++--- src/runtime/runtime.c | 1 + tests/subr.sh | 3 ++- version.lisp-expr | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/run-sbcl.sh b/run-sbcl.sh index 83f40c1..26dc406 100644 --- a/run-sbcl.sh +++ b/run-sbcl.sh @@ -14,15 +14,22 @@ set -e BASE=`dirname "$0"` -BASE=`(readlink -f ${BASE} 2> /dev/null || echo ${BASE})` +if (readlink -f "${BASE}") >/dev/null 2>&1; then + BASE=`readlink -f ${BASE}` +else + opwd=`pwd` + cd "${BASE}" + BASE=`pwd` + cd "${opwd}" +fi CORE_DEFINED=no for arg in $*; do case $arg in - (--core) + --core) CORE_DEFINED=yes ;; - (--help) + --help) echo "usage: run-sbcl.sh sbcl-options*" echo echo "Runs SBCL from the build directory or binary tarball without need for" diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 7200500..0f1f0ff 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -35,6 +35,7 @@ #endif #include #include +#include #if defined(SVR4) || defined(__linux__) #include diff --git a/tests/subr.sh b/tests/subr.sh index c0e67f8..333ffb6 100644 --- a/tests/subr.sh +++ b/tests/subr.sh @@ -33,7 +33,8 @@ SBCL_ARGS="--noinform --no-sysinit --no-userinit --noprint --disable-debugger" # Scripts that use these variables should quote them. TEST_BASENAME="`basename $0`" -TEST_FILESTEM="`echo ${TEST_BASENAME%.sh} | sed 's/\./-/g'`" +TEST_FILESTEM="`basename "${TEST_BASENAME}" | sed 's/\.sh$//'`" +TEST_FILESTEM="`echo "${TEST_FILESTEM}" | sed 's/\./-/g'`" TEST_DIRECTORY="$SBCL_PWD/$TEST_FILESTEM-$$" # "Ten four" is the closest numerical slang I can find to "OK", so diff --git a/version.lisp-expr b/version.lisp-expr index 6784b85..922b464 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.42.6" +"1.0.42.7" -- 1.7.10.4