Subject: Re: custom manpages at build time and cut(1) mention line limit
To: Jeremy C. Reed <>
From: Klaus Klein <>
List: tech-userlevel
Date: 02/18/2005 01:51:37
On Thursday, 17. February 2005 22:48, Jeremy C. Reed wrote:
> I see that cut only allows lines of up to _POSIX2_LINE_MAX in length.
> Should the cut.1 man page mention this by name _POSIX2_LINE_MAX, by its
> value (2048), or other reference to this limit?

This shouldn't be necessary, although cut.c is neither completely wrong
nor completely right about this.

_POSIX2_LINE_MAX is the minimum value for the {LINE_MAX} limit a
conforming implementation must provide.  In turn, a strictly
conforming application must not require a maximum input line length >
_POSIX2_LINE_MAX to be supported.  I imagine having a limits(7) manual
page would have some appeal, though.

Ideally cut should be using the {LINE_MAX} value as obtained by
sysconf(3), but with presently _POSIX2_LINE_MAX == LINE_MAX ==
sysconf(_SC_LINE_MAX) this is not a problem yet.  And {LINE_MAX}
being the relevant limit for this capability of cut isn't a complete
surprise. ;-)

> Do we ever have man pages dynamically generated at build time to place in
> values like _POSIX2_LINE_MAX?

I'm not aware of one.

- Klaus