Merge pull request #322 from mnieper/emscripten

Exclude unsupported functions in Emscripten version
This commit is contained in:
Alex Shinn 2016-04-10 13:11:36 +09:00
commit 3b57a78f98
2 changed files with 16 additions and 12 deletions

View file

@ -258,7 +258,7 @@ bench-gabriel: chibi-scheme$(EXE)
# Packaging # Packaging
clean: clean-libs 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 tests/run/*.out tests/run/*.err
cleaner: clean cleaner: clean

View file

@ -1,9 +1,9 @@
(define-library (chibi system) (define-library (chibi system)
(export get-host-name (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 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-user-id current-group-id
current-effective-user-id current-effective-group-id current-effective-user-id current-effective-group-id
set-current-user-id! set-current-effective-user-id! set-current-user-id! set-current-effective-user-id!
@ -12,6 +12,10 @@
set-root-directory!) set-root-directory!)
(import (chibi)) (import (chibi))
(include-shared "system") (include-shared "system")
(cond-expand
(emscripten)
(else
(export user-information group-information)
(body (body
(define (user-information user) (define (user-information user)
(car (if (string? user) (car (if (string? user)
@ -20,4 +24,4 @@
(define (group-information group) (define (group-information group)
(car (if (string? group) (car (if (string? group)
(getgrnam_r group (make-string 1024)) (getgrnam_r group (make-string 1024))
(getgrgid_r group (make-string 1024))))))) (getgrgid_r group (make-string 1024)))))))))