fix a netbsd struct definition and some >r r> usage

db4
Doug Coleman 2008-11-29 20:19:40 -06:00
parent 1a50bcce75
commit bc14b8c7c8
3 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@ FUNCTION: int execve ( char* path, char** argv, char** envp ) ;
[ first ] [ ] bi exec-with-path ;
: exec-args-with-env ( seq seq -- int )
>r [ first ] [ ] bi r> exec-with-env ;
[ [ first ] [ ] bi ] dip exec-with-env ;
: with-fork ( child parent -- )
[ [ fork-process dup zero? ] dip [ drop ] prepose ] dip

View File

@ -31,8 +31,8 @@ C-STRUCT: statvfs
{ "uid_t" "f_owner" }
{ { "uint32_t" 4 } "f_spare" }
{ { "char" _VFS_NAMELEN } "f_fstypename" }
{ { "char" _VFS_NAMELEN } "f_mntonname" }
{ { "char" _VFS_NAMELEN } "f_mntfromname" } ;
{ { "char" _VFS_MNAMELEN } "f_mntonname" }
{ { "char" _VFS_MNAMELEN } "f_mntfromname" } ;
FUNCTION: int statvfs ( char* path, statvfs *buf ) ;

View File

@ -198,10 +198,10 @@ FUNCTION: ssize_t readlink ( char* path, char* buf, size_t bufsize ) ;
: PATH_MAX 1024 ; inline
: read-symbolic-link ( path -- path )
PATH_MAX <byte-array> dup >r
PATH_MAX
[ readlink ] unix-system-call
r> swap head-slice >string ;
PATH_MAX <byte-array> dup [
PATH_MAX
[ readlink ] unix-system-call
] dip swap head-slice >string ;
FUNCTION: ssize_t recv ( int s, void* buf, size_t nbytes, int flags ) ;
FUNCTION: ssize_t recvfrom ( int s, void* buf, size_t nbytes, int flags, sockaddr-in* from, socklen_t* fromlen ) ;