[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATH_MAX with mingw
From: |
Jim Meyering |
Subject: |
Re: PATH_MAX with mingw |
Date: |
Sun, 26 Aug 2007 11:12:00 +0200 |
Sylvain Beucler <address@hidden> 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.