fixing to work on linux

This commit is contained in:
foof 2009-04-02 13:28:31 -04:00
parent 26c7d669b2
commit 636502de73
2 changed files with 4 additions and 3 deletions

View file

@ -10,6 +10,7 @@ INCDIR=$(PREFIX)/include/chibi-scheme
MODDIR=$(PREFIX)/share/chibi-scheme MODDIR=$(PREFIX)/share/chibi-scheme
SO=.dylib SO=.dylib
LDFLAGS=-lm
CFLAGS=-Wall -g -save-temps -Os CFLAGS=-Wall -g -save-temps -Os
GC_OBJ=./gc/gc.a GC_OBJ=./gc/gc.a
@ -33,7 +34,7 @@ libchibischeme.$(SO): eval.o $(GC_OBJ)
gcc $(LDFLAGS) -shared -dynamiclib -o $@ $^ -lchibisexp gcc $(LDFLAGS) -shared -dynamiclib -o $@ $^ -lchibisexp
chibi-scheme: main.o sexp.o $(GC_OBJ) chibi-scheme: main.o sexp.o $(GC_OBJ)
gcc $(CFLAGS) -o $@ $^ gcc $(CFLAGS) $(LDFLAGS) -o $@ $^
clean: clean:
rm -f *.o *.i *.s rm -f *.o *.i *.s

4
sexp.c
View file

@ -509,8 +509,8 @@ sexp sexp_make_input_string_port (sexp str) {
sexp sexp_make_output_string_port () { sexp sexp_make_output_string_port () {
FILE *out; FILE *out;
sexp buf = sexp_alloc_type(string, SEXP_STRING), res; sexp buf = sexp_alloc_type(string, SEXP_STRING), res;
out = open_memstream(&sexp_string_data(str), &sexp_string_length(buf)); out = open_memstream(&sexp_string_data(buf), &sexp_string_length(buf));
res = sexp_make_input_port(in); res = sexp_make_input_port(out);
sexp_port_cookie(res) = buf; sexp_port_cookie(res) = buf;
return res; return res;
} }