mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
Merge pull request #322 from mnieper/emscripten
Exclude unsupported functions in Emscripten version
This commit is contained in:
commit
3b57a78f98
2 changed files with 16 additions and 12 deletions
2
Makefile
2
Makefile
|
@ -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
|
||||||
|
|
|
@ -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,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)))))))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue