unix: Minor cleanups

db4
Eduardo Cavazos 2008-05-10 09:10:16 -05:00
parent d1775f9bfa
commit a9bc2309ea
2 changed files with 6 additions and 8 deletions

View File

@ -7,9 +7,9 @@ IN: unix.system-call
ERROR: unix-system-call-error word args message ; ERROR: unix-system-call-error word args message ;
MACRO: unix-system-call ( quot -- ) MACRO: unix-system-call ( quot -- )
[ ] [ infer in>> ] [ first ] tri [ ] [ infer in>> ] [ first ] tri
'[ '[
[ @ dup 0 < [ dup throw ] [ ] if ] [ @ dup 0 < [ dup throw ] [ ] if ]
[ drop , narray , swap err_no strerror unix-system-call-error ] [ drop , narray , swap err_no strerror unix-system-call-error ]
recover recover
] ; ] ;

View File

@ -29,7 +29,6 @@ TYPEDEF: ulong size_t
! ! ! Unix functions ! ! ! Unix functions
LIBRARY: factor LIBRARY: factor
! FUNCTION: int err_no ( ) ;
FUNCTION: void clear_err_no ( ) ; FUNCTION: void clear_err_no ( ) ;
LIBRARY: libc 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: int munmap ( void* addr, size_t len ) ;
FUNCTION: uint ntohl ( uint n ) ; FUNCTION: uint ntohl ( uint n ) ;
FUNCTION: ushort ntohs ( ushort n ) ; FUNCTION: ushort ntohs ( ushort n ) ;
! FUNCTION: char* strerror ( int errno ) ;
: open ( path flags prot -- int ) [ unix.ffi:open ] unix-system-call ; : open ( path flags prot -- int ) [ unix.ffi:open ] unix-system-call ;