[vlc-devel] vlc_loaddir always falis on Mac OSX
Naohiro KORIYAMA
nkoriyama at gmail.com
Tue Oct 11 00:34:14 CEST 2011
I put debug fprintf each lines to vlc_readdir and I found which
function set EADF to errno.
fpathconf(). always returns -1 (I don't know why...) and sets EBADF to
errno.Mac OSX has NAME_MAX macro (I WAS WRONG), so set NAME_MAX(255)
to len,but errno's value is still EBADF(9).
I think when len is set to NAME_MAX , also errno should be set to 0.
if (len == -1) {#ifdef NAME_MAX len = NAME_MAX; errno
= 0;#else errno = ENOMEM; return NULL; // OS is broken.
There is no sane way to fix this.#endif }
Maybe on other POSIX like sytems, fpathconf() returns not -1 and
notset EBADF to errno .
AFAIK no other error happened in vlc_readdir.
The link below are the part of debug log and debug
function.http://dl.dropbox.com/u/7574919/vlc.loghttp://dl.dropbox.com/u/7574919/vlc_readdir.c
--
KORIYAMA, Naohiro
nkoriyama at gmail.com
More information about the vlc-devel
mailing list