Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Aug 2006 07:51:21 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Yar Tikhiy <yar@comp.chem.msu.su>
Cc:        Dag-Erling Sm?rgrav <des@des.no>, Marcel Moolenaar <marcel@FreeBSD.org>, cvs-all@FreeBSD.org, src-committers@FreeBSD.org, cvs-src@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/kldxref kldxref.c
Message-ID:  <20060810073617.V16211@delplex.bde.org>
In-Reply-To: <20060808101524.GN54416@comp.chem.msu.su>
References:  <200608042128.k74LShD7052071@repoman.freebsd.org> <8664h6ci86.fsf@xps.des.no> <20060807133921.V6590@delplex.bde.org> <20060808101524.GN54416@comp.chem.msu.su>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-1527257990-1155160281=:16211
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Tue, 8 Aug 2006, Yar Tikhiy wrote:

> On Mon, Aug 07, 2006 at 01:59:30PM +1000, Bruce Evans wrote:
>> On Sun, 6 Aug 2006, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote:
>>> MAXPATHLEN should be spelled PATH_MAX.
>>
>> Actually, MAXPATHLEN is better since it is honestly unportable.  It work=
s
>> ...
> Just looked what SUSv3 says:
>
> =09It should be noted, however, that many of the listed limits
> =09are not invariant, and at runtime, the value of the limit
> =09may differ from those given in this header, for the following
> =09reasons:

It should say somewhere that the limits shall not be defined if they
are not invariant.  POSIX says this.  There are only a few limits
that are guaranteed to be compile-time constants (except for some
not very useful ones which give absolute minimum values).

>
> =09The limit is pathname-dependent.
>
> =09The limit differs between the compile and runtime machines.
>
> =09For these reasons, an application may use the fpathconf(),
                                           ^^^
> =09pathconf(), and sysconf() functions to determine the actual
> =09value of a limit at runtime.

It should say "must", or at least "should", since not using pathconf()
etc. won't work if the limit is undefined.

It's an implementation detail that PATH_MAX^WMAXPATHLEN is independent
of the file system (this is because everything goes through vfs_lookup()).
The related limit NAME_MAX is very fs-dependent.  FreeBSD bogusly defines
NAME_MAX, OPEN_MAX, CHILD_MAX, ...

Bruce
--0-1527257990-1155160281=:16211--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060810073617.V16211>