help-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird PATH_MAX discussion in mplayer's list. (Fwd: [MPlayer-dev-eng]


From: mike burrell
Subject: Re: weird PATH_MAX discussion in mplayer's list. (Fwd: [MPlayer-dev-eng] [PATCH] fix for unconditional use of PATH_MAX)
Date: Thu, 1 May 2003 17:33:58 -0600
User-agent: Mutt/1.4i

Robert Millan (zeratul2@wanadoo.es) said:
> On Thu, May 01, 2003 at 12:23:32PM -0600, mike burrell wrote:
> > 
> > First of all, your patch is not good.  It invokes undefined behaviour on
> > every platform without PATH_MAX that is not GNU.  Not good if you want to
> > promote portability, methinks.
> 
> see the thread, i pasted a code example that supports systems with
> specific limits but no PATH_MAX, using pathconf.

The problem was with getcwd(NULL, 0);  Passing NULL as the first argument to
getcwd() invokes undefined behaviour, even if the second argument is 0. 
Which makes it a bit curious why GNU decided to have that exact usage as an
extension....

> it isn't much pointful though, i never heard of a system without
> PATH_MAX other than GNU, and less of one that has specific limits.

Yes, very true.  Following standards is always fun, though.

-- 
 /"\                                                 m i k e   b u r r e l l
 \ /     ASCII RIBBON CAMPAIGN                                mikpos@shaw.ca
  X        AGAINST HTML MAIL,
 / \      AND NEWS TOO, dammit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]