coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] maint: ensure PATH_MAX is set correctly


From: Eric Blake
Subject: Re: [PATCH] maint: ensure PATH_MAX is set correctly
Date: Thu, 22 Mar 2012 05:56:14 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

On 03/22/2012 05:47 AM, Pádraig Brady wrote:
>> > ACK, once you also modify bootstrap.conf to call out an explicit
>> > dependency on the 'pathmax' module (right now, we're getting it
>> > implicitly via transitive closure).
>> > 
> Cool thanks.
> Adjusting that led me to:
> http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/27183/focus=27269
> 
> Updated patch attached.
> 
> cheers,
> Pádraig.
> 

> +++ b/src/system.h
> @@ -40,7 +40,11 @@ you must include <sys/types.h> before including this file
>  
>  #include <unistd.h>
>  
> +/* limits.h must come before pathmax.h because limits.h on some systems
> +   undefs PATH_MAX, whereas pathmax.h may set PATH_MAX.  */
>  #include <limits.h>
> +
> +#include "pathmax.h"

pathmax.h includes <limits.h>, precisely so that you don't have to worry
about ordering between the two headers.  Therefore, your comments about
an ordering dependency aren't really accurate.

I'd be okay with the simpler:

#include <unistd.h>
#include <limits.h>

#include "pathmax.h"
#ifndef PATH_MAX
...


-- 
Eric Blake   address@hidden    +1-919-301-3266
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]