Comment 19 for bug 421779

Revision history for this message
Luís Oliveira (luismbo) wrote : Re: [Bug 421779] Re: sb-posix tests fail on snow leopard (mac os 10.6)

On Fri, Jun 11, 2010 at 11:55 PM, Cyrus Harmon
<email address hidden> wrote:
> luis' patch is committed and the encoding bit even makes the sb-posix
> tests pass when the darwin-langinfo shim is removed, but that should be
> a separate bug.

Oops, the encoding bit seems to mask the root cause.

CL-USER> (let ((dir (sb-posix:opendir "/"))
               (sb-alien::*default-c-string-external-format* :latin-1))
           (unwind-protect
                (block dir-loop
                  (loop for dirent = (sb-posix:readdir dir)
                        until (sb-alien:null-alien dirent)
                        when (not (stringp (print
(sb-posix:dirent-name dirent))))
                          do (return-from dir-loop nil)
                        finally (return t)))
             (sb-posix:closedir dir)))

"."
"dbfseventsd"
" # ¤¬ "
" $"
""
""
"ee"
"00"
"I#"
""
"00"
"ores"
""
"eveloper"
"D#"
"ome"
""
""
" ("
"etwork"
""
"rivate"
""
""
""
"ser Guides And Information"
"nd Information"
""
"ar"
"olumes"
""
T

FWIW, Osicat's OSICAT-POSIX:READDIR works fine, but it calls
readdir_r() indirectly through a C wrapper.

--
Luís Oliveira
http://r42.eu/~luis/