ffi work, add dirent struct for linux
parent
bce8b1eff6
commit
548ee091d9
|
@ -3,8 +3,6 @@
|
||||||
USING: alien.syntax combinators system vocabs.loader ;
|
USING: alien.syntax combinators system vocabs.loader ;
|
||||||
IN: unix
|
IN: unix
|
||||||
|
|
||||||
! FreeBSD
|
|
||||||
|
|
||||||
: MAXPATHLEN 1024 ; inline
|
: MAXPATHLEN 1024 ; inline
|
||||||
|
|
||||||
: O_RDONLY HEX: 0000 ; inline
|
: O_RDONLY HEX: 0000 ; inline
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
|
|
||||||
USING: alien.syntax ;
|
USING: alien.syntax ;
|
||||||
|
|
||||||
IN: unix.linux.fs
|
IN: unix.linux.fs
|
||||||
|
|
||||||
: MS_RDONLY 1 ; ! Mount read-only.
|
: MS_RDONLY 1 ; ! Mount read-only.
|
||||||
|
|
|
@ -92,6 +92,13 @@ C-STRUCT: passwd
|
||||||
{ "char*" "pw_dir" }
|
{ "char*" "pw_dir" }
|
||||||
{ "char*" "pw_shell" } ;
|
{ "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
|
: EPERM 1 ; inline
|
||||||
: ENOENT 2 ; inline
|
: ENOENT 2 ; inline
|
||||||
: ESRCH 3 ; inline
|
: ESRCH 3 ; inline
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
|
|
||||||
USING: layouts combinators vocabs.loader ;
|
USING: layouts combinators vocabs.loader ;
|
||||||
|
|
||||||
IN: unix.stat
|
IN: unix.stat
|
||||||
|
|
||||||
cell-bits
|
cell-bits
|
||||||
{
|
{
|
||||||
{ 32 [ "unix.stat.linux.32" require ] }
|
{ 32 [ "unix.stat.linux.32" require ] }
|
||||||
{ 64 [ "unix.stat.linux.64" require ] }
|
{ 64 [ "unix.stat.linux.64" require ] }
|
||||||
}
|
} case
|
||||||
case
|
|
||||||
|
|
Loading…
Reference in New Issue