Re: PATH_MAX constant expression

2011-06-24 Thread Jim Meyering
Bruno Haible wrote: >> Bruno's comment (in the text you elided) suggests intent to have >> pathmax.h leave PATH_MAX undefined on the Hurd: >> >> >> I find it reasonable to use "#ifdef PATH_MAX" in front of every use of >> >> PATH_MAX, like POSIX requires. >> >> With such a change, each of the a

Re: PATH_MAX constant expression

2011-06-23 Thread Bruno Haible
Hi Jim, > Bruno's comment (in the text you elided) suggests intent to have > pathmax.h leave PATH_MAX undefined on the Hurd: > > >> I find it reasonable to use "#ifdef PATH_MAX" in front of every use of > >> PATH_MAX, like POSIX requires. > > With such a change, each of the above uses would

Re: PATH_MAX constant expression

2011-06-21 Thread Jim Meyering
Eric Blake wrote: > [adding coreutils] > > On 06/20/2011 10:51 PM, Jim Meyering wrote: 2011-06-20 Bruno Haible 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_PATHMA

Re: PATH_MAX constant expression

2011-06-21 Thread Eric Blake
On 06/21/2011 03:50 AM, James Youngman wrote: > On Mon, Jun 20, 2011 at 11: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. > > I agree. > > I think it would be helpful if there were some automated way of > rem

Re: PATH_MAX constant expression

2011-06-21 Thread Eric Blake
[adding coreutils] On 06/20/2011 10:51 PM, Jim Meyering wrote: >>> 2011-06-20 Bruno Haible >>> >>> 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 pathcon

Re: PATH_MAX constant expression

2011-06-21 Thread James Youngman
On Mon, Jun 20, 2011 at 11: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. I agree. I think it would be helpful if there were some automated way of reminding people to do that though. Many people develop on sys

Re: PATH_MAX constant expression

2011-06-20 Thread Jim Meyering
Eric Blake wrote: > 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 >

Re: PATH_MAX constant expression

2011-06-20 Thread Eric Blake
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_MA

Re: PATH_MAX constant expression

2011-06-20 Thread Bruno Haible
Eric Blake wrote: > Actually, I agree with the first: > > > 2011-06-18 Bruno Haible > > > > pathmax: Ensure correct value for PATH_MAX on HP-UX. > > * lib/pathmax.h (PATH_MAX) [HP-UX]: Define to 1024. OK, I've committed it now. > But dislike the second: > > > 2011-06-18 Bruno Haibl