fix bootstrap errors, add missing files

erg 2009-05-07 16:53:32 -05:00
parent 021800a245
commit 608a967b7c
4 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,10 @@
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types io.directories.unix kernel system unix ;
IN: io.directories.unix.linux
M: unix find-next-file ( DIR* -- byte-array )
"dirent" <c-object>
f <void*>
[ readdir64_r 0 = [ (io-error) ] unless ] 2keep
*void* [ drop f ] unless ;

View File

@ -0,0 +1 @@
unportable

View File

@ -4,7 +4,7 @@ USING: accessors alien.c-types alien.strings combinators
continuations destructors fry io io.backend io.backend.unix continuations destructors fry io io.backend io.backend.unix
io.directories io.encodings.binary io.encodings.utf8 io.files io.directories io.encodings.binary io.encodings.utf8 io.files
io.pathnames io.files.types kernel math.bitwise sequences system io.pathnames io.files.types kernel math.bitwise sequences system
unix unix.stat ; unix unix.stat vocabs.loader ;
IN: io.directories.unix IN: io.directories.unix
: touch-mode ( -- n ) : touch-mode ( -- n )
@ -72,3 +72,5 @@ M: unix (directory-entries) ( path -- seq )
[ >directory-entry ] [ >directory-entry ]
produce nip produce nip
] with-unix-directory ; ] with-unix-directory ;
os linux? [ "io.directories.unix.linux" require ] when

View File

@ -94,7 +94,7 @@ C-STRUCT: passwd
{ "char*" "pw_shell" } ; { "char*" "pw_shell" } ;
! dirent64 ! dirent64
C-STRUCT: dirent64 C-STRUCT: dirent
{ "ulonglong" "d_ino" } { "ulonglong" "d_ino" }
{ "longlong" "d_off" } { "longlong" "d_off" }
{ "ushort" "d_reclen" } { "ushort" "d_reclen" }
@ -103,7 +103,7 @@ C-STRUCT: dirent64
FUNCTION: int open64 ( char* path, int flags, int prot ) ; FUNCTION: int open64 ( char* path, int flags, int prot ) ;
FUNCTION: dirent64* readdir64 ( DIR* dirp ) ; FUNCTION: dirent64* readdir64 ( DIR* dirp ) ;
FUNCTION: int readdir64_r ( void* dirp, dirent64* entry, dirent64** result ) ; FUNCTION: int readdir64_r ( void* dirp, dirent* entry, dirent** result ) ;
M: linux open-file [ open64 ] unix-system-call ; M: linux open-file [ open64 ] unix-system-call ;