466bc555fe
Also add fstat() and lstat(). I don't #define the constants for st_mode or d_type, but I provide enough to get the block size of a file and to list the names in a directory. Some fields of struct stat get truncated, see XXX in plat/osx/include/sys/stat.h. In struct dirent, the inode field might be d_ino or d_fileno. I picked d_ino because Apple's sys/dirent.h uses d_ino (but Apple's manual pages use d_fileno).
36 lines
604 B
Lua
36 lines
604 B
Lua
acklibrary {
|
|
name = "lib",
|
|
srcs = {
|
|
"./_exit.s",
|
|
"./close.s",
|
|
"./fstat.s",
|
|
"./getdirentries.s",
|
|
"./getpid.s",
|
|
"./gettimeofday.s",
|
|
"./ioctl.s",
|
|
"./kill.s",
|
|
"./lseek.s",
|
|
"./lstat.s",
|
|
"./mmap.s",
|
|
"./mprotect.s",
|
|
"./open.s",
|
|
"./read.s",
|
|
"./set_errno.s",
|
|
"./sigaction.s",
|
|
"./stat.s",
|
|
"./write.s",
|
|
"plat/linuxppc/libsys/trap.s",
|
|
"plat/osx/libsys/brk.c",
|
|
"plat/osx/libsys/creat.c",
|
|
"plat/osx/libsys/isatty.c",
|
|
"plat/osx/libsys/signal.c",
|
|
},
|
|
deps = {
|
|
"lang/cem/libcc.ansi/headers+headers",
|
|
"plat/osxppc/include+headers",
|
|
},
|
|
vars = {
|
|
plat = "osxppc"
|
|
}
|
|
}
|