[MPlayer-dev-eng] [PATCH] osd menu fielsel.c
Björn Sandell
biorn at dce.chalmers.se
Thu Nov 21 10:28:13 CET 2002
On Thu, 21 Nov 2002 07:23:02 +0100
Alban Bedel <albeu at free.fr> wrote:
> Hi Björn Sandell,
>
> on Tue, 19 Nov 2002 18:59:09 +0100 you wrote:
>
> >
> > Howdy,
> >
> > A patch to make menu_filesel.c a bit more portable. Tested on RedHat and
> > OpenBSD.
> Can you explain me what is not portable in this file (not that i don't believe you) ?
I'll try :-)
Include limitd.h to define PATH_MAX (tested on Solaris & OpenBSD)
Avoid defining functions within functions. This breaks (SIGSEGV) on OpenBSD and I
think it is because OpenBSD has a non-exec stack.
Maybe one should try to avoid scandir() also and use readdir() instead. From
'man scandir' on Solaris:
NOTES
Use of these interfaces should be restricted to only appli-
cations written on BSD platforms. Use of these interfaces
with any of the system libraries or in multi-thread applica-
tions is unsupported.
> And what is the use of this d_type thing instead of stat ?
Well, it seems unnessecary to do stat() to figure out something you already know,
and it makes it much easier to move the definition of compare() out of oper_dir().
Ok?
--
Björn Sandell DCE/DFS Sysadmin IT department
Chalmers University of Technology www.dce.chalmers.se
More information about the MPlayer-dev-eng
mailing list