]> gitweb.factorcode.org Git - factor.git/blob - extra/unix/stat/linux/32/32.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / unix / stat / linux / 32 / 32.factor
1
2 USING: kernel alien.syntax math ;
3
4 IN: unix.stat
5
6 ! Ubuntu 8.04 32-bit
7
8 C-STRUCT: stat
9     { "dev_t"     "st_dev" }
10     { "ushort"    "__pad1"  }
11     { "ino_t"     "st_ino" }
12     { "mode_t"    "st_mode" }
13     { "nlink_t"   "st_nlink" }
14     { "uid_t"     "st_uid" }
15     { "gid_t"     "st_gid" }
16     { "dev_t"     "st_rdev" }
17     { "ushort"    "__pad2" }
18     { "off_t"     "st_size" }
19     { "blksize_t" "st_blksize" }
20     { "blkcnt_t"  "st_blocks" }
21     { "timespec"  "st_atim" }
22     { "timespec"  "st_mtim" }
23     { "timespec"  "st_ctim" }
24     { "ulong"     "unused4" }
25     { "ulong"     "unused5" } ;
26
27 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
29 FUNCTION: int __xstat  ( int ver, char* pathname, stat* buf ) ;
30 FUNCTION: int __lxstat ( int ver, char* pathname, stat* buf ) ;
31
32 :  stat ( pathname buf -- int ) 3 -rot __xstat ;
33 : lstat ( pathname buf -- int ) 3 -rot __lxstat ;