bug-gnulib
[Top][All Lists]
Advanced

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

Re: PATH_MAX on the Hurd


From: Bruno Haible
Subject: Re: PATH_MAX on the Hurd
Date: Sat, 6 Aug 2011 00:33:41 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Eric Blake wrote:
> > int a = PATH_MAX;
> 
> Shouldn't this be:
> 
> static int a[PATH_MAX];

Maybe. Or possibly:
  enum { a = PATH_MAX };

Are there cases when these three declarations don't all succeed and don't
all fail?

I'm not so familiar with the various classes of constant expressions.
Paul certainly knows better.

> do we also 
> want to enforce that it is usable as a preprocessor number, as in 
> something like:
> 
> #ifdef PATH_MAX
> # if !PATH_MAX
> #  error
> # endif
> #endif

I have no objection against that. It appears safe on all platforms.

Bruno
-- 
Cato Bontjes van Beek <http://en.wikipedia.org/wiki/Cato_Bontjes_van_Beek>



reply via email to

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