In article <20161002111719.6e22f670 at X220.alogt.com>, erichsfreebsdlist
at alogt.com writes:
>'Host names are limited to {HOST_NAME_MAX} characters, not including
>the trailing null, currently 255.'
>
>which makes people assume that HOST_NAME_MAX is defined in unistd.h.
It should not make them assume that.
{SOME_LIMIT}, in curly braces, means the value of the limit,
determined in the usual POSIX way: by checking whether a macro is
defined, and if not, calling sysconf() to determine what the run-time
value of the limit is, and if sysconf() returns -1 with errno
unchanged, doing whatever makes sense when the system does not impose
any limit (which depends on the semantics of the limit in question).
Having a typographical convention avoids having to repeat the usual
description with all of its caveats every time a limit is referenced.
For most limits defined by POSIX, there is a macro _POSIX_LIMIT_NAME
which must be defined to a specific value set out in the standard, and
which indicates the minimum permissible value of the limit. This
value isn't necessarily useful for what any given program needs,
although it might serve as a reasonable guess.
-GAWollman