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/<foo>/
#include <stdio.h>
#include <string.h>
+#include <libgen.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
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) {
;;; 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"