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 ) M: linux (directory-entries) ( path -- seq )
[ [
dirent <struct> dirent64 <struct>
'[ _ _ next-dirent ] [ >directory-entry ] produce nip '[ _ _ next-dirent ] [ >directory-entry ] produce nip
] with-unix-directory ; ] with-unix-directory ;

View File

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