Re: PATH_MAX and test-stat.h

2011-07-01 Thread Ludovic Courtès
Hello, k...@freefriends.org (Karl Berry) skribis: > I am aware that conceptually there is no PATH_MAX on Hurd and no > requirement for it to be a smallish constant, but it seems to me that > any real-world system has to define PATH_MAX as a reasonable constant > simply for compatibility with all

Re: PATH_MAX and test-stat.h

2011-06-20 Thread Bruno Haible
Eric Blake wrote: > 8908 Pathname Variable Values > 8909 The values in the following list may be constants within an > implementation or may vary from > 8910 one pathname to another. > ... > 8912 A definition of one of the symbolic constants in the following list > shall be omitted from the > 8913

Re: PATH_MAX and test-stat.h

2011-06-20 Thread Eric Blake
On 06/20/2011 03:21 PM, Bruno Haible wrote: > Eric Blake wrote: >> POSIX states that PATH_MAX, if defined, must be a compile-time constant. > > Please, where does it say this? I cannot find this statement in > . [Line numbers

Re: PATH_MAX and test-stat.h

2011-06-20 Thread Bruno Haible
Eric Blake wrote: > POSIX states that PATH_MAX, if defined, must be a compile-time constant. Please, where does it say this? I cannot find this statement in . Bruno -- In memoriam Neda Agha-Soltan

Re: PATH_MAX and test-stat.h

2011-06-20 Thread Eric Blake
On 06/18/2011 04:18 PM, James Youngman wrote: >> Should we guarantee that PATH_MAX is a constant expression (by modifying >> lib/pathmax.h), or change tests/test-stat.h to not assume it? > > It looks to me like POSIX doesn't state that PATH_MAX is a constant > expression. There are other values

Re: PATH_MAX and test-stat.h

2011-06-19 Thread Ralf Wildenhues
* James Youngman wrote on Sun, Jun 19, 2011 at 11:17:22PM CEST: > On Sun, Jun 19, 2011 at 7:49 AM, Ralf Wildenhues wrote: > > * James Youngman wrote on Sun, Jun 19, 2011 at 12:57:01AM CEST: > >> On Sat, Jun 18, 2011 at 11:24 PM, Karl Berry wrote: > >> >    I suspect that the most useful thing we c

Re: PATH_MAX and test-stat.h

2011-06-19 Thread James Youngman
On Sun, Jun 19, 2011 at 7:49 AM, Ralf Wildenhues wrote: > Hello, > > * James Youngman wrote on Sun, Jun 19, 2011 at 12:57:01AM CEST: >> On Sat, Jun 18, 2011 at 11:24 PM, Karl Berry wrote: >> >    I suspect that the most useful thing we can do in gnulib is define >> >    PATH_MAX to a non-constant

Re: PATH_MAX and test-stat.h

2011-06-18 Thread Ralf Wildenhues
Hello, * James Youngman wrote on Sun, Jun 19, 2011 at 12:57:01AM CEST: > On Sat, Jun 18, 2011 at 11:24 PM, Karl Berry wrote: > >    I suspect that the most useful thing we can do in gnulib is define > >    PATH_MAX to a non-constant expression on all platforms, > > > > And intentionally break loa

Re: PATH_MAX and test-stat.h

2011-06-18 Thread James Youngman
On Sat, Jun 18, 2011 at 11:24 PM, Karl Berry wrote: > IMHO ... > >    I suspect that the most useful thing we can do in gnulib is define >    PATH_MAX to a non-constant expression on all platforms, > > And intentionally break loads of existing code? > I am highly doubtful that that is "useful"; "p

Re: PATH_MAX and test-stat.h

2011-06-18 Thread Karl Berry
IMHO ... I suspect that the most useful thing we can do in gnulib is define PATH_MAX to a non-constant expression on all platforms, And intentionally break loads of existing code? I am highly doubtful that that is "useful"; "painful" sounds more accurate :). I am aware that conceptually

Re: PATH_MAX and test-stat.h

2011-06-18 Thread Paul Eggert
On 06/18/11 15:18, James Youngman wrote: > I suspect that the most useful thing we can do in gnulib is define > PATH_MAX to a non-constant expression on all platforms, even the ones > in which it is normally a constant expression. That goes a bit too far, I'd think. Some code assumes a constant P

Re: PATH_MAX and test-stat.h

2011-06-18 Thread James Youngman
On Sat, Jun 18, 2011 at 8:33 PM, Bruno Haible wrote: > Hi Eric, > > In pathmax.h one of the possible replacement values for PATH_MAX on systems > that don't define it (currently HP-UX and GNU/Hurd) is an expression > involving pathconf(). > > But tests/test-stat.h line 20 declares an array of size

PATH_MAX and test-stat.h

2011-06-18 Thread Bruno Haible
Hi Eric, In pathmax.h one of the possible replacement values for PATH_MAX on systems that don't define it (currently HP-UX and GNU/Hurd) is an expression involving pathconf(). But tests/test-stat.h line 20 declares an array of size PATH_MAX. So - at least with pre-C99 compilers - it is assuming t