]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/stat/linux/32/32.factor
factor: rename files that are not loadable on mac, too
[factor.git] / basis / unix / stat / linux / 32 / 32.factor
1 USING: kernel alien.c-types alien.syntax math classes.struct
2 unix.time unix.types ;
3 IN: unix.stat
4
5 ! stat64
6 STRUCT: stat
7     { st_dev dev_t }
8     { __pad1 ushort }
9     { __st_ino __ino_t }
10     { st_mode mode_t }
11     { st_nlink nlink_t }
12     { st_uid uid_t }
13     { st_gid gid_t }
14     { st_rdev dev_t }
15     { __pad2 ushort[2] }
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     { st_ino ulonglong } ;
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 ;