unix.ffi: be more explicit about dirent64.

db4
John Benediktsson 2014-04-29 13:54:27 -07:00
parent 09dec78603
commit 5dd26a9066
2 changed files with 6 additions and 5 deletions

View File

@ -12,6 +12,6 @@ IN: io.directories.unix.linux
M: linux (directory-entries) ( path -- seq )
[
dirent <struct>
dirent64 <struct>
'[ _ _ next-dirent ] [ >directory-entry ] produce nip
] with-unix-directory ;

View File

@ -98,17 +98,18 @@ STRUCT: passwd
{ pw_dir c-string }
{ pw_shell c-string } ;
! dirent64
STRUCT: dirent
STRUCT: dirent64
{ d_ino ulonglong }
{ d_off longlong }
{ d_reclen ushort }
{ d_type uchar }
{ d_name char[256] } ;
ALIAS: dirent dirent64
FUNCTION: int open64 ( c-string path, int flags, int prot ) ;
FUNCTION: dirent* readdir64 ( DIR* dirp ) ;
FUNCTION: int readdir64_r ( void* dirp, dirent* entry, dirent** result ) ;
FUNCTION: dirent64* readdir64 ( DIR* dirp ) ;
FUNCTION: int readdir64_r ( void* dirp, dirent64* entry, dirent64** result ) ;
FUNCTION: ssize_t sendfile ( int out_fd, int in_fd, off_t* offset, size_t count ) ;