add freebsd 64, untested
add openbsd 32/64, untested
parent
668633b406
commit
d82808b3a0
|
@ -0,0 +1,30 @@
|
||||||
|
USING: kernel alien.syntax math ;
|
||||||
|
|
||||||
|
IN: unix.stat
|
||||||
|
|
||||||
|
! FreeBSD 8.0-CURRENT
|
||||||
|
|
||||||
|
C-STRUCT: stat
|
||||||
|
{ "__dev_t" "st_dev" }
|
||||||
|
{ "ino_t" "st_ino" }
|
||||||
|
{ "mode_t" "st_mode" }
|
||||||
|
{ "nlink_t" "st_nlink" }
|
||||||
|
{ "uid_t" "st_uid" }
|
||||||
|
{ "gid_t" "st_gid" }
|
||||||
|
{ "__dev_t" "st_rdev" }
|
||||||
|
{ "timespec" "st_atim" }
|
||||||
|
{ "timespec" "st_mtim" }
|
||||||
|
{ "timespec" "st_ctim" }
|
||||||
|
{ "off_t" "st_size" }
|
||||||
|
{ "blkcnt_t" "st_blocks" }
|
||||||
|
{ "blksize_t" "st_blksize" }
|
||||||
|
{ "fflags_t" "st_flags" }
|
||||||
|
{ "__uint32_t" "st_gen" }
|
||||||
|
{ "__int32_t" "st_lspare" }
|
||||||
|
{ "timespec" "st_birthtimespec" }
|
||||||
|
! not sure about the padding here.
|
||||||
|
{ "__uint32_t" "pad0" }
|
||||||
|
{ "__uint32_t" "pad1" } ;
|
||||||
|
|
||||||
|
FUNCTION: int stat ( char* pathname, stat* buf ) ;
|
||||||
|
FUNCTION: int lstat ( char* pathname, stat* buf ) ;
|
|
@ -0,0 +1,30 @@
|
||||||
|
USING: kernel alien.syntax math ;
|
||||||
|
IN: unix.stat
|
||||||
|
|
||||||
|
! FreeBSD 8.0-CURRENT
|
||||||
|
! untested
|
||||||
|
|
||||||
|
C-STRUCT: stat
|
||||||
|
{ "__dev_t" "st_dev" }
|
||||||
|
{ "ino_t" "st_ino" }
|
||||||
|
{ "mode_t" "st_mode" }
|
||||||
|
{ "nlink_t" "st_nlink" }
|
||||||
|
{ "uid_t" "st_uid" }
|
||||||
|
{ "gid_t" "st_gid" }
|
||||||
|
{ "__dev_t" "st_rdev" }
|
||||||
|
{ "timespec" "st_atim" }
|
||||||
|
{ "timespec" "st_mtim" }
|
||||||
|
{ "timespec" "st_ctim" }
|
||||||
|
{ "off_t" "st_size" }
|
||||||
|
{ "blkcnt_t" "st_blocks" }
|
||||||
|
{ "blksize_t" "st_blksize" }
|
||||||
|
{ "fflags_t" "st_flags" }
|
||||||
|
{ "__uint32_t" "st_gen" }
|
||||||
|
{ "__int32_t" "st_lspare" }
|
||||||
|
{ "timespec" "st_birthtimespec" }
|
||||||
|
! not sure about the padding here.
|
||||||
|
{ "__uint32_t" "pad0" }
|
||||||
|
{ "__uint32_t" "pad1" } ;
|
||||||
|
|
||||||
|
FUNCTION: int stat ( char* pathname, stat* buf ) ;
|
||||||
|
FUNCTION: int lstat ( char* pathname, stat* buf ) ;
|
|
@ -1,30 +1,7 @@
|
||||||
USING: kernel alien.syntax math ;
|
USING: layouts combinators vocabs.loader ;
|
||||||
|
|
||||||
IN: unix.stat
|
IN: unix.stat
|
||||||
|
|
||||||
! FreeBSD 8.0-CURRENT
|
cell-bits {
|
||||||
|
{ 32 [ "unix.stat.freebsd.32" require ] }
|
||||||
C-STRUCT: stat
|
{ 64 [ "unix.stat.freebsd.64" require ] }
|
||||||
{ "__dev_t" "st_dev" }
|
} case
|
||||||
{ "ino_t" "st_ino" }
|
|
||||||
{ "mode_t" "st_mode" }
|
|
||||||
{ "nlink_t" "st_nlink" }
|
|
||||||
{ "uid_t" "st_uid" }
|
|
||||||
{ "gid_t" "st_gid" }
|
|
||||||
{ "__dev_t" "st_rdev" }
|
|
||||||
{ "timespec" "st_atim" }
|
|
||||||
{ "timespec" "st_mtim" }
|
|
||||||
{ "timespec" "st_ctim" }
|
|
||||||
{ "off_t" "st_size" }
|
|
||||||
{ "blkcnt_t" "st_blocks" }
|
|
||||||
{ "blksize_t" "st_blksize" }
|
|
||||||
{ "fflags_t" "st_flags" }
|
|
||||||
{ "__uint32_t" "st_gen" }
|
|
||||||
{ "__int32_t" "st_lspare" }
|
|
||||||
{ "timespec" "st_birthtimespec" }
|
|
||||||
! not sure about the padding here.
|
|
||||||
{ "__uint32_t" "pad0" }
|
|
||||||
{ "__uint32_t" "pad1" } ;
|
|
||||||
|
|
||||||
FUNCTION: int stat ( char* pathname, stat* buf ) ;
|
|
||||||
FUNCTION: int lstat ( char* pathname, stat* buf ) ;
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
USING: kernel alien.syntax math ;
|
||||||
|
IN: unix.stat
|
||||||
|
|
||||||
|
! OpenBSD 4.2
|
||||||
|
|
||||||
|
C-STRUCT: stat
|
||||||
|
{ "dev_t" "st_dev" }
|
||||||
|
{ "ino_t" "st_ino" }
|
||||||
|
{ "mode_t" "st_mode" }
|
||||||
|
{ "nlink_t" "st_nlink" }
|
||||||
|
{ "uid_t" "st_uid" }
|
||||||
|
{ "gid_t" "st_gid" }
|
||||||
|
{ "dev_t" "st_rdev" }
|
||||||
|
{ "int32_t" "st_lspare0" }
|
||||||
|
{ "timespec*" "st_atimespec" }
|
||||||
|
{ "timespec*" "st_mtimespec" }
|
||||||
|
{ "timespec*" "st_ctimespec" }
|
||||||
|
{ "off_t" "st_size" }
|
||||||
|
{ "int64_t" "st_blocks" }
|
||||||
|
{ "u_int32_t" "st_blksize" }
|
||||||
|
{ "u_int32_t" "st_flags" }
|
||||||
|
{ "u_int32_t" "st_gen" }
|
||||||
|
{ "int32_t" "st_lspare1" }
|
||||||
|
{ "timespec*" "st_birthtimespec" }
|
||||||
|
{ "int64_t" "st_qspare1" }
|
||||||
|
{ "int64_t" "st_qspare2" } ;
|
||||||
|
|
||||||
|
! FUNCTION: int stat ( char* pathname, stat* buf ) ;
|
||||||
|
FUNCTION: int lstat ( char* pathname, stat* buf ) ;
|
|
@ -0,0 +1,29 @@
|
||||||
|
USING: kernel alien.syntax math ;
|
||||||
|
IN: unix.stat
|
||||||
|
|
||||||
|
! OpenBSD 4.2
|
||||||
|
|
||||||
|
C-STRUCT: stat
|
||||||
|
{ "dev_t" "st_dev" }
|
||||||
|
{ "ino_t" "st_ino" }
|
||||||
|
{ "mode_t" "st_mode" }
|
||||||
|
{ "nlink_t" "st_nlink" }
|
||||||
|
{ "uid_t" "st_uid" }
|
||||||
|
{ "gid_t" "st_gid" }
|
||||||
|
{ "dev_t" "st_rdev" }
|
||||||
|
{ "int32_t" "st_lspare0" }
|
||||||
|
{ "timespec*" "st_atimespec" }
|
||||||
|
{ "timespec*" "st_mtimespec" }
|
||||||
|
{ "timespec*" "st_ctimespec" }
|
||||||
|
{ "off_t" "st_size" }
|
||||||
|
{ "int64_t" "st_blocks" }
|
||||||
|
{ "u_int32_t" "st_blksize" }
|
||||||
|
{ "u_int32_t" "st_flags" }
|
||||||
|
{ "u_int32_t" "st_gen" }
|
||||||
|
{ "int32_t" "st_lspare1" }
|
||||||
|
{ "timespec*" "st_birthtimespec" }
|
||||||
|
{ "int64_t" "st_qspare1" }
|
||||||
|
{ "int64_t" "st_qspare2" } ;
|
||||||
|
|
||||||
|
! FUNCTION: int stat ( char* pathname, stat* buf ) ;
|
||||||
|
FUNCTION: int lstat ( char* pathname, stat* buf ) ;
|
|
@ -0,0 +1,7 @@
|
||||||
|
USING: layouts combinators vocabs.loader ;
|
||||||
|
IN: unix.stat
|
||||||
|
|
||||||
|
cell-bits {
|
||||||
|
{ 32 [ "unix.stat.openbsd.32" require ] }
|
||||||
|
{ 64 [ "unix.stat.openbsd.64" require ] }
|
||||||
|
} case
|
|
@ -0,0 +1,29 @@
|
||||||
|
USING: alien.syntax ;
|
||||||
|
IN: unix.types
|
||||||
|
|
||||||
|
! OpenBSD 4.2
|
||||||
|
|
||||||
|
TYPEDEF: ushort __uint16_t
|
||||||
|
TYPEDEF: uint __uint32_t
|
||||||
|
TYPEDEF: int __int32_t
|
||||||
|
TYPEDEF: longlong __int64_t
|
||||||
|
|
||||||
|
TYPEDEF: int int32_t
|
||||||
|
TYPEDEF: int u_int32_t
|
||||||
|
TYPEDEF: longlong int64_t
|
||||||
|
TYPEDEF: ulonglong u_int64_t
|
||||||
|
|
||||||
|
TYPEDEF: __uint32_t __dev_t
|
||||||
|
TYPEDEF: __uint32_t dev_t
|
||||||
|
TYPEDEF: __uint32_t ino_t
|
||||||
|
TYPEDEF: __uint16_t mode_t
|
||||||
|
TYPEDEF: __uint16_t nlink_t
|
||||||
|
TYPEDEF: __uint32_t uid_t
|
||||||
|
TYPEDEF: __uint32_t gid_t
|
||||||
|
TYPEDEF: __int64_t off_t
|
||||||
|
TYPEDEF: __int64_t blkcnt_t
|
||||||
|
TYPEDEF: __uint32_t blksize_t
|
||||||
|
TYPEDEF: __uint32_t fflags_t
|
||||||
|
TYPEDEF: int ssize_t
|
||||||
|
TYPEDEF: int pid_t
|
||||||
|
TYPEDEF: int time_t
|
|
@ -10,6 +10,8 @@ os
|
||||||
{ "linux" [ "unix.types.linux" require ] }
|
{ "linux" [ "unix.types.linux" require ] }
|
||||||
{ "macosx" [ "unix.types.macosx" require ] }
|
{ "macosx" [ "unix.types.macosx" require ] }
|
||||||
{ "freebsd" [ "unix.types.freebsd" require ] }
|
{ "freebsd" [ "unix.types.freebsd" require ] }
|
||||||
|
{ "openbsd" [ "unix.types.openbsd" require ] }
|
||||||
|
{ "netbsd" [ "unix.types.netbsd" require ] }
|
||||||
[ drop ]
|
[ drop ]
|
||||||
}
|
}
|
||||||
case
|
case
|
||||||
|
|
Loading…
Reference in New Issue