Exclude unsupported functions in Emscripten version

This commit is contained in:
Marc Nieper-Wisskirchen 2016-04-08 15:48:45 +02:00
parent d1a7f54114
commit 11f5a5473e
2 changed files with 14 additions and 10 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

@ -12,12 +12,16 @@
set-root-directory!) set-root-directory!)
(import (chibi)) (import (chibi))
(include-shared "system") (include-shared "system")
(body (cond-expand
(define (user-information user) (emscripten)
(car (if (string? user) (else
(getpwnam_r user (make-string 1024)) (export user-information group-information)
(getpwuid_r user (make-string 1024))))) (body
(define (group-information group) (define (user-information user)
(car (if (string? group) (car (if (string? user)
(getgrnam_r group (make-string 1024)) (getpwnam_r user (make-string 1024))
(getgrgid_r group (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)))))))))