Sylvain Beucler <[EMAIL PROTECTED]> wrote:

> Jim Meyering wrote:
> > For starters, in code intended to be portable, it's best not
> > to rely on PATH_MAX, if at all possible.  At a bare minimum,
> > don't use it as an array size, and don't try to allocate
> > PATH_MAX bytes from the heap.  On some systems, PATH_MAX
> > can be very large.  On the Hurd, it's not defined at all.

> Hmmm, I inherited such practices from the code I'm porting, that
> looked pretty convenient :/ Would you recommend *alloc'ing as needed
> and checking for ENAMETOOLONG instead?

Yes.


Reply via email to