From 08e4fead8b7271cb03dfb8ecf4ed7f4cb54b69e6 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Wed, 20 Jun 2012 21:39:52 -0700 Subject: [PATCH] small fixes and warning removals for build tests --- Makefile.libs | 2 +- eval.c | 4 ++++ include/chibi/sexp.h | 2 -- lib/chibi/disasm.c | 2 ++ opt/bignum.c | 7 +++++-- tests/build/build-opts.txt | 2 +- tests/build/build-tests.sh | 2 +- vm.c | 4 ---- 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Makefile.libs b/Makefile.libs index 6767d386..eac21192 100644 --- a/Makefile.libs +++ b/Makefile.libs @@ -4,7 +4,7 @@ # for usage. .PHONY: all all-libs clean clean-libs dist-clean dist-clean-libs install install-libs uninstall uninstall-libs doc doc-libs -.PRECIOUS: %.c +.PRECIOUS: %.c lib/%.c # install configuration diff --git a/eval.c b/eval.c index ecd1a770..0c64499e 100644 --- a/eval.c +++ b/eval.c @@ -4,6 +4,10 @@ #include "chibi/eval.h" +#if SEXP_USE_DEBUG_VM || SEXP_USE_PROFILE_VM || SEXP_USE_STATIC_LIBS +#include "opt/opcode_names.h" +#endif + /************************************************************************/ static int scheme_initialized_p = 0; diff --git a/include/chibi/sexp.h b/include/chibi/sexp.h index 9b1e16a3..04aef12e 100755 --- a/include/chibi/sexp.h +++ b/include/chibi/sexp.h @@ -25,10 +25,8 @@ extern "C" { #if SEXP_USE_DL #include #endif -#if SEXP_USE_GREEN_THREADS || SEXP_USE_GC_FILE_DESCRIPTORS #include #include -#endif #if SEXP_USE_GREEN_THREADS #include #include diff --git a/lib/chibi/disasm.c b/lib/chibi/disasm.c index edf4fa4f..d6bcc3cc 100644 --- a/lib/chibi/disasm.c +++ b/lib/chibi/disasm.c @@ -3,7 +3,9 @@ /* BSD-style license: http://synthcode.com/license.txt */ #include "chibi/eval.h" +#if ! SEXP_USE_STATIC_LIBS #include "../../opt/opcode_names.h" +#endif #define SEXP_DISASM_MAX_DEPTH 16 #define SEXP_DISASM_PAD_WIDTH 4 diff --git a/opt/bignum.c b/opt/bignum.c index def182e5..b0bb0682 100644 --- a/opt/bignum.c +++ b/opt/bignum.c @@ -1,5 +1,5 @@ /* bignum.c -- bignum support */ -/* Copyright (c) 2009-2011 Alex Shinn. All rights reserved. */ +/* Copyright (c) 2009-2012 Alex Shinn. All rights reserved. */ /* BSD-style license: http://synthcode.com/license.txt */ #define SEXP_INIT_BIGNUM_SIZE 2 @@ -999,7 +999,10 @@ sexp sexp_add (sexp ctx, sexp a, sexp b) { } sexp sexp_sub (sexp ctx, sexp a, sexp b) { - int at=sexp_number_type(a), bt=sexp_number_type(b), negatep=0; +#if SEXP_USE_FLONUMS + int negatep=0; +#endif + int at=sexp_number_type(a), bt=sexp_number_type(b); sexp r=SEXP_VOID; sexp_gc_var2(tmp1, tmp2); sexp_gc_preserve2(ctx, tmp1, tmp2); diff --git a/tests/build/build-opts.txt b/tests/build/build-opts.txt index 87683e3c..d7953d89 100644 --- a/tests/build/build-opts.txt +++ b/tests/build/build-opts.txt @@ -17,7 +17,7 @@ CPPFLAGS=-DSEXP_USE_MATH=0 CPPFLAGS=-DSEXP_WARN_UNDEFS=0 CPPFLAGS=-DSEXP_USE_HUFF_SYMS=0 CPPFLAGS=-DSEXP_USE_HASH_SYMS=0 -CPPFLAGS=-DSEXP_USE_STRING_STREAMS=0 +CPPFLAGS=-DSEXP_USE_STRING_STREAMS=1 CPPFLAGS=-DSEXP_USE_AUTOCLOSE_PORTS=0 CPPFLAGS=-DSEXP_USE_2010_EPOCH=0 CPPFLAGS=-DSEXP_USE_CHECK_STACK=0 diff --git a/tests/build/build-tests.sh b/tests/build/build-tests.sh index 1071b8ca..0868d784 100755 --- a/tests/build/build-tests.sh +++ b/tests/build/build-tests.sh @@ -22,7 +22,7 @@ for opts in $(cat ${BUILDDIR}/build-opts.txt); do staticopts=$(echo ${staticopts} | tr ';' ' ') $MAKE cleaner 2>&1 >/dev/null rm -f clibs.c - $MAKE $staticopts chibi-scheme 2>&1 >${BUILDDIR}/build${i}-bootstrap.out + $MAKE $staticopts 2>&1 >${BUILDDIR}/build${i}-bootstrap.out $MAKE $staticopts clibs.c 2>&1 >${BUILDDIR}/build${i}-clibs.out fi # Try to build then run tests. diff --git a/vm.c b/vm.c index 4e8cbd41..7e9906ce 100644 --- a/vm.c +++ b/vm.c @@ -796,10 +796,6 @@ static int sexp_check_type(sexp ctx, sexp a, sexp b) { top -= i; _ARG1 = x; ip += sizeof(sexp); sexp_check_exception(); #endif -#if SEXP_USE_DEBUG_VM || SEXP_USE_PROFILE_VM -#include "opt/opcode_names.h" -#endif - #if SEXP_USE_EXTENDED_FCALL #include "opt/fcall.c" #endif