[MPlayer-dev-eng] Re: [PATCH] osd menu fielsel.c

Gábor Lénárt lgb at lgb.hu
Thu Nov 21 12:09:34 CET 2002


On Thu, Nov 21, 2002 at 09:56:22PM +1100, Daniel Pittman wrote:
> > man readdir
> > [...]
> > BUGS
> >        Field d_type is not implemented as of libc6 2.1 and will always
> >        return DT_UNKNOWN (0).
> > 
> > You should stat the file to get this information, AFAIK ...
> 
> I don't know of any platform that returns *wrong* information in the
> type field. So, to find out the type of something, test if the field is
> DT_UNKNOWN and stat if you have to.

Maybe ;-) However I even don't now that struct dirent has got member d_type
on EVERY systems (ie: is it part of any standard?) or not ... If no, some
#ifdef should be inserted into the code figured out by ./configure or so ...

- Gábor (larta'H)



More information about the MPlayer-dev-eng mailing list