Add getdirentries() and stat() for Mac OS X.
authorGeorge Koehler <xkernigh@netscape.net>
Mon, 28 Nov 2016 19:32:49 +0000 (14:32 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Mon, 28 Nov 2016 19:32:49 +0000 (14:32 -0500)
commit466bc555fe1f9ce2686091367faabba97033c766
tree462a864c860d3a53f0228f53d73922a794d6dfda
parentb6b707d9df40d8bdebce51281d610f264f03e0d9
Add getdirentries() and stat() for Mac OS X.

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).
15 files changed:
plat/osx/include/build.lua
plat/osx/include/sys/dirent.h [new file with mode: 0644]
plat/osx/include/sys/stat.h [new file with mode: 0644]
plat/osx/include/sys/types.h
plat/osx/include/unistd.h
plat/osx386/libsys/build.lua
plat/osx386/libsys/fstat.s [new file with mode: 0644]
plat/osx386/libsys/getdirentries.s [new file with mode: 0644]
plat/osx386/libsys/lstat.s [new file with mode: 0644]
plat/osx386/libsys/stat.s [new file with mode: 0644]
plat/osxppc/libsys/build.lua
plat/osxppc/libsys/fstat.s [new file with mode: 0644]
plat/osxppc/libsys/getdirentries.s [new file with mode: 0644]
plat/osxppc/libsys/lstat.s [new file with mode: 0644]
plat/osxppc/libsys/stat.s [new file with mode: 0644]