]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: allow >=2**64 in traditional form
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 28 Jul 2025 18:24:38 +0000 (11:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Aug 2025 02:48:04 +0000 (19:48 -0700)
commit6439858056d9bc9dd7411df583e60854ace41d17
tree2bdcf71d4ac19867352f436800383380724243d7
parentae37265727ad5e6f43a4887e2d977e8ffb59ce65
tail: allow >=2**64 in traditional form

This better matches the treatment of POSIX form,
e.g., ‘tail +Nc’ is now like ‘tail -c +N’ even when N is large.
* src/tail.c: Don’t include xstrtol.h.
(parse_obsolete_option): Treat numbers greater than UINTMAX_MAX as
if they are UINTMAX_MAX.  Parse the number by hand with saturating
arithmetic; nowadays that’s simpler than using xstrtoumax.  There
is no need for a diagnostic now, as the error cannot happen any more.
* tests/tail/tail.pl (obs-plus-c3): New test.
src/tail.c
tests/tail/tail.pl