]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/stat/linux/64/64.factor
Merge branch 'master' into experimental
[factor.git] / basis / unix / stat / linux / 64 / 64.factor
1 USING: kernel alien.syntax math sequences unix
2 alien.c-types arrays accessors combinators ;
3 IN: unix.stat
4
5 ! Ubuntu 7.10 64-bit
6
7 C-STRUCT: stat
8     { "dev_t"     "st_dev" }
9     { "ino_t"     "st_ino" }
10     { "nlink_t"   "st_nlink" }
11     { "mode_t"    "st_mode" }
12     { "uid_t"     "st_uid" }
13     { "gid_t"     "st_gid" }
14     { "int"       "pad0" }
15     { "dev_t"     "st_rdev" }
16     { "off_t"     "st_size" }
17     { "blksize_t" "st_blksize" }
18     { "blkcnt_t"  "st_blocks" }
19     { "timespec"  "st_atimespec" }
20     { "timespec"  "st_mtimespec" }
21     { "timespec"  "st_ctimespec" }
22     { "long"      "__unused0" }
23     { "long"      "__unused1" }
24     { "long"      "__unused2" } ;
25
26 FUNCTION: int __xstat  ( int ver, char* pathname, stat* buf ) ;
27 FUNCTION: int __lxstat ( int ver, char* pathname, stat* buf ) ;
28
29 :  stat ( pathname buf -- int ) [ 1 ] 2dip __xstat ;
30 : lstat ( pathname buf -- int ) [ 1 ] 2dip __lxstat ;