diff --git a/bin/ikarus b/bin/ikarus index 2f5522e..36b5f12 100755 Binary files a/bin/ikarus and b/bin/ikarus differ diff --git a/bin/ikarus-runtime.c b/bin/ikarus-runtime.c index 058744c..c42e671 100644 --- a/bin/ikarus-runtime.c +++ b/bin/ikarus-runtime.c @@ -672,7 +672,12 @@ ikp ik_close(ikp fd){ ikp ik_system(ikp str){ - return fix(system(string_data(str))); + if(tagof(str) == bytevector_tag){ + return fix(system((char*)str+off_bytevector_data)); + } else { + fprintf(stderr, "bug in ik_system\n"); + exit(-1); + } } static char* diff --git a/src/ikarus.boot b/src/ikarus.boot index 7b2ef87..44606a2 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.posix.ss b/src/ikarus.posix.ss index 85d3ba2..03dda6c 100644 --- a/src/ikarus.posix.ss +++ b/src/ikarus.posix.ss @@ -30,7 +30,8 @@ (lambda (x) (unless (string? x) (error 'system "~s is not a string" x)) - (let ([rv (foreign-call "ik_system" x)]) + (let ([rv (foreign-call "ik_system" + (string->utf8-bytevector x))]) (if (fx= rv -1) (error 'system "failed") rv)))) diff --git a/src/makefile.ss b/src/makefile.ss index 421d776..1350943 100755 --- a/src/makefile.ss +++ b/src/makefile.ss @@ -467,6 +467,8 @@ [immediate? i] [pointer-value i] + [system i] + [installed-libraries i] [compile-core-expr-to-port $boot] [current-primitive-locations $boot]