[Top][All Lists]

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

Re: PATH_MAX on the Hurd

From: Paul Eggert
Subject: Re: PATH_MAX on the Hurd
Date: Fri, 05 Aug 2011 16:51:08 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110617 Thunderbird/3.1.11

On 08/05/2011 04:25 PM, Eric Blake wrote:
> What if we go with the array approach, but without risking
> overallocation problems?

Well again, it depends on what the test is for.
My impression is that a good deal of code wants PATH_MAX
because it wants to create an array of size
PATH_MAX.  If that's what we're testing for, then
the char array is the more-appropriate test.

If all we want to test is whether PATH_MAX is an integer
constant expression, never mind the value, then
I'd suggest something like "enum { foo = 0 * PATH_MAX };".
(PATH_MAX / PATH_MAX doesn't work if PATH_MAX is zero.)

reply via email to

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