cvs commit: src/usr.sbin/kldxref kldxref.c
bde at zeta.org.au
Wed Aug 9 21:51:27 UTC 2006
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ørgrav wrote:
>>> MAXPATHLEN should be spelled PATH_MAX.
>> Actually, MAXPATHLEN is better since it is honestly unportable. It works
> Just looked what SUSv3 says:
> It should be noted, however, that many of the listed limits
> are not invariant, and at runtime, the value of the limit
> may differ from those given in this header, for the following
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).
> The limit is pathname-dependent.
> The limit differs between the compile and runtime machines.
> For these reasons, an application may use the fpathconf(),
> pathconf(), and sysconf() functions to determine the actual
> value 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, ...
More information about the cvs-all