]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/stat/linux/64/64.factor
27a3835ea219c448d8aab7054ec939fa98571cb9
[factor.git] / basis / unix / stat / linux / 64 / 64.factor
1 USING: kernel alien.c-types alien.syntax math classes.struct
2 unix.time unix.types ;
3 IN: unix.stat
4
5 ! Ubuntu 7.10 64-bit
6
7 STRUCT: stat
8     { st_dev dev_t }
9     { st_ino ino_t }
10     { st_nlink nlink_t }
11     { st_mode mode_t }
12     { st_uid uid_t }
13     { st_gid gid_t }
14     { pad0 int }
15     { st_rdev dev_t }
16     { st_size off64_t }
17     { st_blksize blksize_t }
18     { st_blocks blkcnt64_t }
19     { st_atimespec timespec }
20     { st_mtimespec timespec }
21     { st_ctimespec timespec }
22     { __unused0 long[3] } ;
23
24 FUNCTION: int __xstat64  ( int ver, c-string pathname, stat* buf ) ;
25 FUNCTION: int __lxstat64 ( int ver, c-string pathname, stat* buf ) ;
26 FUNCTION: int __fxstat64 ( int ver, int fd, stat* buf ) ;
27
28 :  stat-func ( pathname buf -- int ) [ 1 ] 2dip __xstat64 ;
29 : lstat ( pathname buf -- int ) [ 1 ] 2dip __lxstat64 ;
30 : fstat ( fd buf -- int ) [ 1 ] 2dip __fxstat64 ;