]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/stat/macosx/macosx.factor
Create basis vocab root
[factor.git] / basis / unix / stat / macosx / macosx.factor
1
2 USING: kernel alien.syntax math ;
3
4 IN: unix.stat
5
6 ! Mac OS X ppc
7
8 C-STRUCT: stat
9     { "dev_t"      "st_dev" }
10     { "ino_t"      "st_ino" }
11     { "mode_t"     "st_mode" }
12     { "nlink_t"    "st_nlink" }
13     { "uid_t"      "st_uid" }
14     { "gid_t"      "st_gid" }
15     { "dev_t"      "st_rdev" }
16     { "timespec"   "st_atimespec" }
17     { "timespec"   "st_mtimespec" }
18     { "timespec"   "st_ctimespec" }
19     { "off_t"      "st_size" }
20     { "blkcnt_t"   "st_blocks" }
21     { "blksize_t"  "st_blksize" }
22     { "__uint32_t" "st_flags" }
23     { "__uint32_t" "st_gen" }
24     { "__int32_t"  "st_lspare" }
25     { "__int64_t"  "st_qspare0" }
26     { "__int64_t"  "st_qspare1" } ;
27
28 FUNCTION: int stat  ( char* pathname, stat* buf ) ;
29 FUNCTION: int lstat ( char* pathname, stat* buf ) ;
30
31 : stat-st_atim ( stat -- timespec ) stat-st_atimespec ;
32 : stat-st_mtim ( stat -- timespec ) stat-st_mtimespec ;
33 : stat-st_ctim ( stat -- timespec ) stat-st_ctimespec ;