1.0.42.7: fix shell scripts on Solaris (and FreeBSD?)
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 31 Aug 2010 12:46:41 +0000 (12:46 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Tue, 31 Aug 2010 12:46:41 +0000 (12:46 +0000)
 * 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
src/runtime/runtime.c
tests/subr.sh
version.lisp-expr

index 83f40c1..26dc406 100644 (file)
 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"
index 7200500..0f1f0ff 100644 (file)
@@ -35,6 +35,7 @@
 #endif
 #include <errno.h>
 #include <locale.h>
+#include <limits.h>
 
 #if defined(SVR4) || defined(__linux__)
 #include <time.h>
index c0e67f8..333ffb6 100644 (file)
@@ -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
index 6784b85..922b464 100644 (file)
@@ -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"