On 2025-07-30 04:18, Pádraig Brady wrote:
I'd have a slight preference for _not_ gating the isatty(STDOUT) check
on $POSIXLY_CORRECT.
We generally only use $POSIXLY_CORRECT to gate incompatible behavior.
Sure, but don't the GNU coding standards disagree with POSIX here? If we
follow the GNU coding standards with respect to stdout, then we need a
POSIXLY_CORRECT check.
Or are you suggesting that we disregard the coding standards and follow
POSIX instead? That would be a reasonable suggestion but we might want
to ask RMS about it.
While I'm bikeshedding :-), one other thought is that if POSIXLY_CORRECT
is not set we could also be compatible with FreeBSD, and output a bell
before the first page if -f is specified but -p is not. I suspect that
this is a more-useful approach (and could well be what System V did, and
we've merely exposed a bug in POSIX here).