X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fruntime.c;h=a4fc68adbf13ced6c1fc871b5d4c63830ed19035;hb=c2ac5ba3964165ee2d21ccd4c6bf8bdc48e1a165;hp=5db14530241650a26f632364fdbf3137abe0fb1f;hpb=a8a79584f77a1ca0b1f651c27d219678e44c3f4d;p=sbcl.git diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 5db1453..a4fc68a 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -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);