[MPlayer-dev-eng] [PATCH] replace glibc basename by macro to

Arpi arpi at thot.banki.hu
Wed Jan 15 02:36:36 CET 2003


Hi,

> > I noticed some time ago that --enable-menu fails to compile on Cygwin
> > because menu_pt.c #includes libgen.h that is part of glibc and not
> > available under Cygwin.  I therefore ripped the macro mp_basename out of
> > mplayer.c and put it in menu_pt.c instead of libgen.h.  It compiles, it
> > works.  I probably got it all wrong, so please tell me what I have to do
> > differently.  Anyway, here is the patch.
> 
> According to my docs's, basename() is POSIX (IEEE Std 1003.1-2001).
> IMHO (as I am Not an MPlayer Developer), it would be better practice
> to define basename() conditionally on #ifndef HAVE_LIBGEN_H, after
> adding the appropriate test to "configure".

agree...

or just use our impl. everywhere, then it will bevave the same way
everywhere. (at least linux manpage of dirname/basename mentions some
bugs around trailing '/' handling and other unclear issues.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu


More information about the MPlayer-dev-eng mailing list