mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
1.0.11.1: Handle set-but-empty environment variables
... SBCL_HOME= sbcl crashed on startup ... Patch by Michael Weber
This commit is contained in:
parent
4266faf75f
commit
ce20022710
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
(defvar *proxy* (posix-getenv "http_proxy"))
|
||||
(defvar *cclan-mirror*
|
||||
(or (posix-getenv "CCLAN_MIRROR")
|
||||
"http://ftp.linux.org.uk/pub/lisp/cclan/"))
|
||||
(let ((mirror (posix-getenv "CCLAN_MIRROR")))
|
||||
(or (and (not (string= mirror "")) mirror)
|
||||
"http://ftp.linux.org.uk/pub/lisp/cclan/")))
|
||||
|
||||
(defun directorify (name)
|
||||
;; input name may or may not have a training #\/, but we know we
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,7 @@ output to *VERBOSE-OUT*. Returns the shell's exit code."
|
|||
|
||||
(defun contrib-sysdef-search (system)
|
||||
(let ((home (sb-ext:posix-getenv "SBCL_HOME")))
|
||||
(when home
|
||||
(when (and home (not (string= home "")))
|
||||
(let* ((name (coerce-name system))
|
||||
(home (truename home))
|
||||
(contrib (merge-pathnames
|
||||
|
|
@ -1205,7 +1205,7 @@ output to *VERBOSE-OUT*. Returns the shell's exit code."
|
|||
|
||||
(pushnew
|
||||
'(let ((home (sb-ext:posix-getenv "SBCL_HOME")))
|
||||
(when home
|
||||
(when (and home (not (string= home "")))
|
||||
(merge-pathnames "site-systems/" (truename home))))
|
||||
*central-registry*)
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,8 @@ code:
|
|||
(funcall (intern "C-CONSTANTS-EXTRACT" (find-package "SB-GROVEL"))
|
||||
filename tmp-c-source (constants-package component))
|
||||
(unless (do-not-grovel component)
|
||||
(let* ((cc (or (sb-ext:posix-getenv "CC")
|
||||
(let* ((cc (or (and (string/= (sb-ext:posix-getenv "CC") "")
|
||||
(sb-ext:posix-getenv "CC"))
|
||||
;; It might be nice to include a CONTINUE or
|
||||
;; USE-VALUE restart here, but ASDF seems to insist
|
||||
;; on handling the errors itself.
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ otherwise. An error of type FILE-ERROR is signaled if pathname is wild."
|
|||
(defun sbcl-homedir-pathname ()
|
||||
(let ((sbcl-home (posix-getenv "SBCL_HOME")))
|
||||
;; SBCL_HOME isn't set for :EXECUTABLE T embedded cores
|
||||
(when sbcl-home
|
||||
(when (and sbcl-home (not (string= sbcl-home "")))
|
||||
(parse-native-namestring
|
||||
(ensure-trailing-slash sbcl-home)))))
|
||||
|
||||
|
|
@ -587,8 +587,7 @@ system."
|
|||
(let ((env-home (posix-getenv "HOME")))
|
||||
(parse-native-namestring
|
||||
(ensure-trailing-slash
|
||||
(if (and env-home
|
||||
(not (equal env-home "")))
|
||||
(if (and env-home (not (string= env-home "")))
|
||||
env-home
|
||||
#!-win32
|
||||
(sb!unix:uid-homedir (sb!unix:unix-getuid))
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ search_for_core ()
|
|||
char *stem = "/sbcl.core";
|
||||
char *core;
|
||||
|
||||
if(!sbcl_home) sbcl_home = SBCL_HOME;
|
||||
if (!(sbcl_home && *sbcl_home)) sbcl_home = SBCL_HOME;
|
||||
lookhere = (char *) calloc(strlen(sbcl_home) +
|
||||
strlen(stem) +
|
||||
1,
|
||||
|
|
@ -234,6 +234,7 @@ main(int argc, char *argv[], char *envp[])
|
|||
boolean end_runtime_options = 0;
|
||||
|
||||
lispobj initial_function;
|
||||
const char *sbcl_home = getenv("SBCL_HOME");
|
||||
|
||||
interrupt_init();
|
||||
block_blockable_signals();
|
||||
|
|
@ -361,8 +362,9 @@ main(int argc, char *argv[], char *envp[])
|
|||
}
|
||||
}
|
||||
|
||||
/* Make sure that SBCL_HOME is set, unless loading an embedded core. */
|
||||
if (!getenv("SBCL_HOME") && embedded_core_offset == 0) {
|
||||
/* Make sure that SBCL_HOME is set and not the empty string,
|
||||
unless loading an embedded core. */
|
||||
if (!(sbcl_home && *sbcl_home) && embedded_core_offset == 0) {
|
||||
char *envstring, *copied_core, *dir;
|
||||
char *stem = "SBCL_HOME=";
|
||||
copied_core = copied_string(core);
|
||||
|
|
|
|||
|
|
@ -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.11"
|
||||
"1.0.11.1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue