unix: Minor cleanups
parent
d1775f9bfa
commit
a9bc2309ea
|
@ -7,9 +7,9 @@ IN: unix.system-call
|
|||
ERROR: unix-system-call-error word args message ;
|
||||
|
||||
MACRO: unix-system-call ( quot -- )
|
||||
[ ] [ infer in>> ] [ first ] tri
|
||||
'[
|
||||
[ @ dup 0 < [ dup throw ] [ ] if ]
|
||||
[ drop , narray , swap err_no strerror unix-system-call-error ]
|
||||
recover
|
||||
] ;
|
||||
[ ] [ infer in>> ] [ first ] tri
|
||||
'[
|
||||
[ @ dup 0 < [ dup throw ] [ ] if ]
|
||||
[ drop , narray , swap err_no strerror unix-system-call-error ]
|
||||
recover
|
||||
] ;
|
||||
|
|
|
@ -29,7 +29,6 @@ TYPEDEF: ulong size_t
|
|||
|
||||
! ! ! Unix functions
|
||||
LIBRARY: factor
|
||||
! FUNCTION: int err_no ( ) ;
|
||||
FUNCTION: void clear_err_no ( ) ;
|
||||
|
||||
LIBRARY: libc
|
||||
|
@ -78,7 +77,6 @@ FUNCTION: void* mmap ( void* addr, size_t len, int prot, int flags, int fd, off_
|
|||
FUNCTION: int munmap ( void* addr, size_t len ) ;
|
||||
FUNCTION: uint ntohl ( uint n ) ;
|
||||
FUNCTION: ushort ntohs ( ushort n ) ;
|
||||
! FUNCTION: char* strerror ( int errno ) ;
|
||||
|
||||
: open ( path flags prot -- int ) [ unix.ffi:open ] unix-system-call ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue