From 11f5a5473ef6e0e7cc49d0c45002eb360b62f988 Mon Sep 17 00:00:00 2001 From: Marc Nieper-Wisskirchen Date: Fri, 8 Apr 2016 15:48:45 +0200 Subject: [PATCH 1/2] Exclude unsupported functions in Emscripten version --- Makefile | 2 +- lib/chibi/system.sld | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ef396a40..4e3383a4 100644 --- a/Makefile +++ b/Makefile @@ -258,7 +258,7 @@ bench-gabriel: chibi-scheme$(EXE) # Packaging clean: clean-libs - -$(RM) *.o *.i *.s *.8 tests/basic/*.out tests/basic/*.err \ + -$(RM) *.o *.i *.s *.bc *.8 tests/basic/*.out tests/basic/*.err \ tests/run/*.out tests/run/*.err cleaner: clean diff --git a/lib/chibi/system.sld b/lib/chibi/system.sld index fa8223ab..9ec78622 100644 --- a/lib/chibi/system.sld +++ b/lib/chibi/system.sld @@ -12,12 +12,16 @@ set-root-directory!) (import (chibi)) (include-shared "system") - (body - (define (user-information user) - (car (if (string? user) - (getpwnam_r user (make-string 1024)) - (getpwuid_r user (make-string 1024))))) - (define (group-information group) - (car (if (string? group) - (getgrnam_r group (make-string 1024)) - (getgrgid_r group (make-string 1024))))))) + (cond-expand + (emscripten) + (else + (export user-information group-information) + (body + (define (user-information user) + (car (if (string? user) + (getpwnam_r user (make-string 1024)) + (getpwuid_r user (make-string 1024))))) + (define (group-information group) + (car (if (string? group) + (getgrnam_r group (make-string 1024)) + (getgrgid_r group (make-string 1024))))))))) From 92c74a566a4892ebc0bbefaf6aa95b4be645bc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Nieper-Wi=C3=9Fkirchen?= Date: Sat, 9 Apr 2016 16:13:43 +0200 Subject: [PATCH 2/2] Update system.sld Remove unconditional exports --- lib/chibi/system.sld | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chibi/system.sld b/lib/chibi/system.sld index 9ec78622..49e500f3 100644 --- a/lib/chibi/system.sld +++ b/lib/chibi/system.sld @@ -1,9 +1,9 @@ (define-library (chibi system) (export get-host-name - user-information user? user-name user-password + user? user-name user-password user-id user-group-id user-gecos user-home user-shell - group-information group-name group-password group-id + group-name group-password group-id current-user-id current-group-id current-effective-user-id current-effective-group-id set-current-user-id! set-current-effective-user-id!