ffi work, add dirent struct for linux
parent
bce8b1eff6
commit
548ee091d9
basis/unix
|
@ -3,8 +3,6 @@
|
|||
USING: alien.syntax combinators system vocabs.loader ;
|
||||
IN: unix
|
||||
|
||||
! FreeBSD
|
||||
|
||||
: MAXPATHLEN 1024 ; inline
|
||||
|
||||
: O_RDONLY HEX: 0000 ; inline
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
USING: alien.syntax ;
|
||||
|
||||
IN: unix.linux.fs
|
||||
|
||||
: MS_RDONLY 1 ; ! Mount read-only.
|
||||
|
@ -22,4 +20,4 @@ FUNCTION: int mount
|
|||
|
||||
! FUNCTION: int umount2 ( char* file, int flags ) ;
|
||||
|
||||
FUNCTION: int umount ( char* file ) ;
|
||||
FUNCTION: int umount ( char* file ) ;
|
||||
|
|
|
@ -92,6 +92,13 @@ C-STRUCT: passwd
|
|||
{ "char*" "pw_dir" }
|
||||
{ "char*" "pw_shell" } ;
|
||||
|
||||
C-STRUCT: dirent
|
||||
{ "__ino_t" "d_ino" }
|
||||
{ "__off_t" "d_off" }
|
||||
{ "ushort" "d_reclen" }
|
||||
{ "uchar" "d_type" }
|
||||
{ { "char" 256 } "d_name" } ;
|
||||
|
||||
: EPERM 1 ; inline
|
||||
: ENOENT 2 ; inline
|
||||
: ESRCH 3 ; inline
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
|
||||
USING: layouts combinators vocabs.loader ;
|
||||
|
||||
IN: unix.stat
|
||||
|
||||
cell-bits
|
||||
{
|
||||
{
|
||||
{ 32 [ "unix.stat.linux.32" require ] }
|
||||
{ 64 [ "unix.stat.linux.64" require ] }
|
||||
}
|
||||
case
|
||||
} case
|
||||
|
|
Loading…
Reference in New Issue