make a struct for dirents on linux, not a <c-object>

db4
Doug Coleman 2009-08-30 22:49:35 -05:00
parent 14973eacb5
commit d8be0561fb
1 changed files with 4 additions and 3 deletions

View File

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