From ab811c7aaca82ba6f86584f736071a28e24353d3 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 19 Feb 2003 13:16:20 +0000 Subject: [PATCH] 0.7.12.46: Probably last contrib frob in this release cycle ... ensure that SBCL_HOME is set even if an explicit core is specified. The intent behind this change is to make sbcl --core /usr/lib/sbcl/sbcl.core identical in effect to sbcl so that both invokations can continue to find contrib packages in /usr/lib/sbcl// --- src/runtime/runtime.c | 17 +++++++++++++++++ version.lisp-expr | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 908bd8c..b4a8f16 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -282,6 +283,22 @@ main(int argc, char *argv[], char *envp[]) if (!core) { lose("can't find core file"); } + } else { + /* If a core was specified and SBCL_HOME is unset, set it */ + char *sbcl_home = getenv("SBCL_HOME"); + if (!sbcl_home) { + char *envstring, *copied_core, *dir; + char *stem = "SBCL_HOME="; + copied_core = copied_string(core); + dir = dirname(copied_core); + envstring = (char *) calloc(strlen(stem) + + strlen(dir) + + 1, + sizeof(char)); + sprintf(envstring, "%s%s", stem, dir); + putenv(envstring); + free(copied_core); + } } if (!noinform) { diff --git a/version.lisp-expr b/version.lisp-expr index 63abc7d..4d28c3f 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.12.45" +"0.7.12.46" -- 1.7.10.4