[MPlayer-dev-eng] [patch 2/5] Dont hardcode filename length

Diego Biurrun diego at biurrun.de
Wed Jan 5 17:02:58 CET 2011


On Wed, Jan 05, 2011 at 03:51:56PM +0100, Clément Bœsch wrote:
> On Wed, Jan 05, 2011 at 03:40:02PM +0100, Tobias Diedrich wrote:
> > Tobias Diedrich wrote:
> > > Erik Auerswald wrote:
> > > > On Wed, Jan 05, 2011 at 01:06:59PM +0100, Diego Biurrun wrote:
> > > > > So relying on the existence of PATH_MAX is not a problem.
> > > > > Also, it is being used in other places already.
> > > > 
> > > > So nobody is using MPlayer on Debian/GNU Hurd. ;-)
> > > > 
> > > > All in all I don't see unconditionally using PATH_MAX as an improvement
> > > > over 255. For most (relevant) systems both will work fine most of the time.
> > > 
> > > Well, we had to change it because we ran into the 255 character
> > > limit.  Since PATH_MAX is already used in e.g. mplayer.c and other
> > > places I'm inclined to commit the patch as-is.
> > 
> > Oh, and there is one definitive advantage it brings:
> > If you want to go and introduce MP_PATH_MAX or something later, it's
> > easy to grep for PATH_MAX, so you're less likely to miss this one.
> > 
> 
> I'll apply this patch in a few hours. Yes PATH_MAX is better, even though
> it's not the correct "solution".

Tobias is an MPlayer oldtimer, he can commit himself, just so you know.

Diego


More information about the MPlayer-dev-eng mailing list