mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-05 12:16:37 +02:00
adding sexp_version constant which is just a string holding the
version information (currently "0.3"). also adding some features that may be important to test for: dynamic-loading, modules, and boehm-gc.
This commit is contained in:
parent
dd16dcef2d
commit
98d03e884e
2 changed files with 12 additions and 2 deletions
1
Makefile
1
Makefile
|
@ -96,6 +96,7 @@ include/chibi/install.h: Makefile
|
|||
echo '#define sexp_so_extension "'$(SO)'"' > $@
|
||||
echo '#define sexp_default_module_dir "'$(MODDIR)'"' >> $@
|
||||
echo '#define sexp_platform "'$(PLATFORM)'"' >> $@
|
||||
echo '#define sexp_version "'`cat VERSION`'"' >> $@
|
||||
|
||||
sexp.o: sexp.c gc.c opt/bignum.c $(INCLUDES) Makefile
|
||||
$(CC) -c $(XCPPFLAGS) $(XCFLAGS) $(CLIBFLAGS) -o $@ $<
|
||||
|
|
13
eval.c
13
eval.c
|
@ -2546,10 +2546,19 @@ sexp sexp_load_standard_env (sexp ctx, sexp e, sexp version) {
|
|||
sexp_gc_preserve3(ctx, op, tmp, sym);
|
||||
sexp_load_standard_parameters(ctx, e);
|
||||
#if SEXP_USE_DL
|
||||
sexp_env_define(ctx, e, sexp_intern(ctx, "*shared-object-extension*"),
|
||||
sexp_c_string(ctx, sexp_so_extension, -1));
|
||||
sexp_env_define(ctx, e, sym=sexp_intern(ctx, "*shared-object-extension*"),
|
||||
tmp=sexp_c_string(ctx, sexp_so_extension, -1));
|
||||
#endif
|
||||
tmp = sexp_list1(ctx, sym=sexp_intern(ctx, sexp_platform));
|
||||
#if SEXP_USE_DL
|
||||
sexp_push(ctx, tmp, sym=sexp_intern(ctx, "dynamic-loading"));
|
||||
#endif
|
||||
#if SEXP_USE_MODULES
|
||||
sexp_push(ctx, tmp, sym=sexp_intern(ctx, "modules"));
|
||||
#endif
|
||||
#if SEXP_USE_BOEHM
|
||||
sexp_push(ctx, tmp, sym=sexp_intern(ctx, "boehm-gc"));
|
||||
#endif
|
||||
sexp_push(ctx, tmp, sym=sexp_intern(ctx, "chibi"));
|
||||
sexp_env_define(ctx, e, sexp_intern(ctx, "*features*"), tmp);
|
||||
sexp_global(ctx, SEXP_G_OPTIMIZATIONS) = SEXP_NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue