diff --git a/lib/srfi/18/threads.c b/lib/srfi/18/threads.c index cd682311..365a9011 100644 --- a/lib/srfi/18/threads.c +++ b/lib/srfi/18/threads.c @@ -40,7 +40,7 @@ static int sexp_mutex_id, sexp_condvar_id, sexp_pollfds_id; /**************************** threads *************************************/ -static void sexp_define_type_predicate (sexp ctx, sexp env, char *cname, sexp_uint_t type) { +static void sexp_define_type_predicate_by_tag (sexp ctx, sexp env, char *cname, sexp_uint_t type) { sexp_gc_var2(name, op); sexp_gc_preserve2(ctx, name, op); name = sexp_c_string(ctx, cname, -1); @@ -565,7 +565,7 @@ sexp sexp_init_library (sexp ctx sexp_api_params(self, n), sexp env) { if (sexp_typep(t)) sexp_pollfds_id = sexp_type_tag(t); - sexp_define_type_predicate(ctx, env, "thread?", SEXP_CONTEXT); + sexp_define_type_predicate_by_tag(ctx, env, "thread?", SEXP_CONTEXT); sexp_define_foreign(ctx, env, "thread-timeout?", 0, sexp_thread_timeoutp); sexp_define_foreign(ctx, env, "current-thread", 0, sexp_current_thread); sexp_define_foreign_opt(ctx, env, "make-thread", 2, sexp_make_thread, SEXP_FALSE); diff --git a/lib/srfi/95/qsort.c b/lib/srfi/95/qsort.c index 1d115720..a84a2b50 100644 --- a/lib/srfi/95/qsort.c +++ b/lib/srfi/95/qsort.c @@ -5,8 +5,12 @@ #include "chibi/eval.h" #if SEXP_USE_HUFF_SYMS +#if SEXP_USE_STATIC_LIBS +#include "../../../opt/sexp-hufftabdefs.h" +#else #include "../../../opt/sexp-hufftabs.c" #endif +#endif #define swap(tmp_var, a, b) (tmp_var=a, a=b, b=tmp_var) diff --git a/opcodes.c b/opcodes.c index 38c49cca..09f68966 100644 --- a/opcodes.c +++ b/opcodes.c @@ -186,3 +186,8 @@ _OP(SEXP_OPC_GENERIC, SEXP_OP_YIELD, 0, 0, SEXP_VOID, SEXP_FALSE, SEXP_FALSE, SE _FN1(_I(SEXP_PROMISE), _I(SEXP_PROCEDURE), "make-promise", 0, sexp_make_promise), #endif }; + +#undef _I +#undef _OP +#undef _FN +#undef _PARAM diff --git a/opt/sexp-hufftabdefs.h b/opt/sexp-hufftabdefs.h new file mode 100644 index 00000000..3bf05f3f --- /dev/null +++ b/opt/sexp-hufftabdefs.h @@ -0,0 +1,7 @@ + +char _huff_tab1[8], _huff_tab2[8], _huff_tab3[2], _huff_tab4[2], + _huff_tab5[4], _huff_tab6[2], _huff_tab7[4], _huff_tab8[4], + _huff_tab9[4], _huff_tab10[4], _huff_tab11[4], _huff_tab12[2], + _huff_tab13[8], _huff_tab14[2], _huff_tab15[8], _huff_tab16[8], + _huff_tab17[8], _huff_tab18[8], _huff_tab19[4], _huff_tab20[8], + _huff_tab21[8];