mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-15 17:07:34 +02:00
fixing to work on linux
This commit is contained in:
parent
26c7d669b2
commit
636502de73
2 changed files with 4 additions and 3 deletions
3
Makefile
3
Makefile
|
@ -10,6 +10,7 @@ INCDIR=$(PREFIX)/include/chibi-scheme
|
|||
MODDIR=$(PREFIX)/share/chibi-scheme
|
||||
|
||||
SO=.dylib
|
||||
LDFLAGS=-lm
|
||||
CFLAGS=-Wall -g -save-temps -Os
|
||||
|
||||
GC_OBJ=./gc/gc.a
|
||||
|
@ -33,7 +34,7 @@ libchibischeme.$(SO): eval.o $(GC_OBJ)
|
|||
gcc $(LDFLAGS) -shared -dynamiclib -o $@ $^ -lchibisexp
|
||||
|
||||
chibi-scheme: main.o sexp.o $(GC_OBJ)
|
||||
gcc $(CFLAGS) -o $@ $^
|
||||
gcc $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f *.o *.i *.s
|
||||
|
|
4
sexp.c
4
sexp.c
|
@ -509,8 +509,8 @@ sexp sexp_make_input_string_port (sexp str) {
|
|||
sexp sexp_make_output_string_port () {
|
||||
FILE *out;
|
||||
sexp buf = sexp_alloc_type(string, SEXP_STRING), res;
|
||||
out = open_memstream(&sexp_string_data(str), &sexp_string_length(buf));
|
||||
res = sexp_make_input_port(in);
|
||||
out = open_memstream(&sexp_string_data(buf), &sexp_string_length(buf));
|
||||
res = sexp_make_input_port(out);
|
||||
sexp_port_cookie(res) = buf;
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue