bug-gnulib
[Top][All Lists]
Advanced

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

Re: PATH_MAX constant expression


From: Eric Blake
Subject: Re: PATH_MAX constant expression
Date: Mon, 20 Jun 2011 17:00:42 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

On 06/20/2011 04:34 PM, Bruno Haible wrote:
> I find it reasonable to use "#ifdef PATH_MAX" in front of every use of
> PATH_MAX, like POSIX requires.
> 
>> But later on in test-getcwd, we have code 
>> that does #ifndef PATH_MAX, which is no longer reachable because of our
>> guarantee that PATH_MAX is always defined in pathmax.h.
> 
> No, we don't want to guarantee a PATH_MAX on GNU/Hurd.
> 
> Here's a proposed patch:
> 
> 
> 2011-06-20  Bruno Haible  <address@hidden>
> 
>       pathmax: Never define PATH_MAX to a non-constant expression.
>       * lib/pathmax.h (PATH_MAX): Don't define in terms of pathconf.
>       * m4/pathmax.m4 (gl_PATHMAX): Don't test for pathconf.

Looks okay to me, but let's wait to see if anyone else also has an
opinion.  Let's also enhance doc/posix-headers/limits.texi to mention
the pathmax module and its (new) semantics of not interfering with Hurd.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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