mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
adding CHIBI_IGNORE_SYSTEM_PATH=1 env var (fixes issue #501)
This commit is contained in:
parent
d513bdc977
commit
9af77c9b4f
3 changed files with 6 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -15,7 +15,7 @@ CHIBI_DOC_DEPENDENCIES ?= $(CHIBI_DEPENDENCIES) tools/chibi-doc
|
|||
|
||||
GENSTATIC ?= ./tools/chibi-genstatic
|
||||
|
||||
CHIBI ?= LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" DYLD_LIBRARY_PATH=".:$(DYLD_LIBRARY_PATH)" CHIBI_MODULE_PATH=lib ./chibi-scheme$(EXE)
|
||||
CHIBI ?= LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" DYLD_LIBRARY_PATH=".:$(DYLD_LIBRARY_PATH)" CHIBI_IGNORE_SYSTEM_PATH=1 CHIBI_MODULE_PATH=lib ./chibi-scheme$(EXE)
|
||||
CHIBI_DEPENDENCIES = ./chibi-scheme$(EXE)
|
||||
|
||||
SNOW_CHIBI ?= tools/snow-chibi
|
||||
|
|
5
eval.c
5
eval.c
|
@ -486,13 +486,16 @@ static void sexp_init_eval_context_bytecodes (sexp ctx) {
|
|||
#endif
|
||||
|
||||
void sexp_init_eval_context_globals (sexp ctx) {
|
||||
const char* no_sys_path;
|
||||
const char* user_path;
|
||||
ctx = sexp_make_child_context(ctx, NULL);
|
||||
#if ! SEXP_USE_NATIVE_X86
|
||||
sexp_init_eval_context_bytecodes(ctx);
|
||||
#endif
|
||||
sexp_global(ctx, SEXP_G_MODULE_PATH) = SEXP_NULL;
|
||||
sexp_add_path(ctx, sexp_default_module_path);
|
||||
no_sys_path = getenv(SEXP_NO_SYSTEM_PATH_VAR);
|
||||
if (!no_sys_path || strcmp(no_sys_path, "0")==0)
|
||||
sexp_add_path(ctx, sexp_default_module_path);
|
||||
user_path = getenv(SEXP_MODULE_PATH_VAR);
|
||||
if (!user_path) user_path = sexp_default_user_module_path;
|
||||
sexp_add_path(ctx, user_path);
|
||||
|
|
|
@ -13,6 +13,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#define SEXP_MODULE_PATH_VAR "CHIBI_MODULE_PATH"
|
||||
#define SEXP_NO_SYSTEM_PATH_VAR "CHIBI_IGNORE_SYSTEM_PATH"
|
||||
|
||||
#include "chibi/features.h"
|
||||
#include "chibi/install.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue