]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: prefer intmax_t to uintmax_t
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 30 Jul 2025 15:46:04 +0000 (08:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Aug 2025 02:48:05 +0000 (19:48 -0700)
commit0625370b7ae4f925a3d93847224c56cb5c6c9f64
tree8e989a337a02146ddf69a1a6028d8d7ab4b3f5b4
parentfee8859750fecde7e1446a7dd82edf0389e51f31
tail: prefer intmax_t to uintmax_t

Signed types let us debug better, by using -fsanitize=undefined.
* doc/local.mk (doc/constants.texi):
Adjust change from macro to enum.
* src/tail.c (COPY_TO_EOF, COPY_A_BUFFER)
(DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS):
Now enum constants, not macros.
(COPY_TO_EOF, COPY_A_BUFFER): Now negative, not positive.
(count_t): New typedef.  Use it instead of uintmax_t.
(COUNT_MAX): New macro; use it instead of UINTMAX_MAX.
(struct File_spec, max_n_unchanged_stats_between_opens)
(dump_remainder, file_lines, pipe_lines, pipe_bytes)
(start_bytes, start_lines, tail_forever, check_fspec)
(tail_forever_inotify, tail_bytes, tail_lines, tail, tail_file)
(parse_obsolete_option, parse_options, main):
Prefer count_t to uintmax_t.
doc/local.mk
src/tail.c