]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/stat/linux/32/32.factor
Merge branch 'master' into experimental (untested!)
[factor.git] / basis / unix / stat / linux / 32 / 32.factor
1 USING: kernel alien.syntax math ;
2 IN: unix.stat
3
4 ! Ubuntu 8.04 32-bit
5
6 C-STRUCT: stat
7     { "dev_t"     "st_dev" }
8     { "ushort"    "__pad1"  }
9     { "ino_t"     "st_ino" }
10     { "mode_t"    "st_mode" }
11     { "nlink_t"   "st_nlink" }
12     { "uid_t"     "st_uid" }
13     { "gid_t"     "st_gid" }
14     { "dev_t"     "st_rdev" }
15     { "ushort"    "__pad2" }
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     { "ulong"     "unused4" }
23     { "ulong"     "unused5" } ;
24
25 FUNCTION: int __xstat  ( int ver, char* pathname, stat* buf ) ;
26 FUNCTION: int __lxstat ( int ver, char* pathname, stat* buf ) ;
27
28 :  stat ( pathname buf -- int ) 3 -rot __xstat ;
29 : lstat ( pathname buf -- int ) 3 -rot __lxstat ;