2026-04-20  Pádraig Brady  <P@draigBrady.com>

	version 9.11
	* NEWS: Record release date.

2026-04-19  Paul Eggert  <eggert@cs.ucla.edu>

	doc: NEWS item for who systemd fix

	build: update gnulib submodule to latest

2026-04-17  Pádraig Brady  <P@draigBrady.com>

	yes: make operation independent of pipe size
	* src/yes.c (splice_write): Always drain what we've written
	to an internal pipe, so there is no possibility of vmsplice() blocking.
	I.e., be defensive in the case that fcntl() fails, and
	our default buffer size (currently 16kiB) is larger than the pipe.
	https://github.com/coreutils/coreutils/issues/253

2026-04-17  Bruno Haible  <bruno@clisp.org>

	tests: reinstate logname error verification
	* tests/misc/user.sh: Modify the "unshare -U logname" test, so that it
	does not fail on glibc versions (< 2.28, >= 2.38) that do a fallback
	lookup based on the tty.

2026-04-17  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure with dash
	* tests/date/date-locale-hour.sh: Just strip the char before the last x,
	assuming it's going to be the newline output by `locale`.
	dash doesn't support $'' within ${}.

2026-04-17  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest

	tests: Avoid accidental matching of the vendor field of $host, part 2
	* tests/local.mk (TESTS_ENVIRONMENT): Remove host_triplet.
	* tests/chgrp/basic.sh: Use $host_os instead of $host_triplet.
	* tests/misc/io-errors.sh: Likewise.

	tests: mktemp: test the behavior when writing to standard output fails
	* tests/mktemp/write-error.sh: New file.
	* tests/local.mk (all_tests): Add the test.

2026-04-16  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib to latest

2026-04-16  Collin Funk  <collin.funk1@gmail.com>

	tests: avoid a failure on musl
	* tests/misc/io-errors.sh: Allow a generic error string on musl since
	the first line is emitted immediately instead of being buffered as
	expected.
	Reported by Bruno Haible.

2026-04-16  Pádraig Brady  <P@draigBrady.com>

	build: fix build failure on AIX
	* m4/jm-macros.m4: AIX has a splice() function for TCP,
	so check for vmsplice() instead.
	* src/splice.h: Define HAVE_SPLICE if vmsplice available.
	Reported by Bruno Haible.

	test: avoid false failure on OpenBSD
	* tests/numfmt/numfmt.pl: Use standard getopt error map,
	needed on OpenBSD.
	Reported by Bruno Haible.

	tests: avoid false failure with hidden /proc on Guix
	* tests/stat/stat-mount.sh: Don't try our stat under unshare
	unless mount(8) exits gracefully.
	Reported by Bruno Haible.

	tests: avoid failure on Manjaro Linux
	* tests/misc/user.sh: Comment out part of test.
	Reported by Bruno Haible.

2026-04-16  Pádraig Brady  <P@draigBrady.com>

	cksum: fix --length validation on 32 bit platforms
	Fix an unreleased issue due to the recent change
	to using idx_t in commit v9.10-91-g02983e493

	* src/cksum.c (main): Limit the possible return to
	the range supported by idx_t.
	Reported by Bruno Haible.

2026-04-16  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure due to ulimit usage
	* tests/dd/no-allocate.sh: Run getlimits_ to ensure
	we have $SSIZE_MAX etc. available.  Also give some buffer
	for the configured ulimit to leave space for returns_ to work.

	tests: avoid failure on older Centos 7
	* tests/cp/sparse-perf.sh: Old Centos 7 can give EINVAL
	from SEEK_DATA on sparse files being copied from /dev/shm.
	Avoid this failure as it's not practical to fix.

	tests: fix false failure on Centos 7
	* tests/date/date-locale-hour.sh: Ensure `locale date_fmt`
	is propagated exactly, even when it contains trailing new lines,
	as was seen with Serbian locales on Centos 7.

2026-04-15  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib to latest

2026-04-15  Pádraig Brady  <P@draigBrady.com>

	tests: avoid intermittent false failures with ksh
	As noted in https://bugs.gnu.org/9089
	ksh gives intermittent ECONNRESET errors with closed pipes.
	This can be seen reliably on Linux with:
	ksh -c 'yes | (sleep .1; head -n10 >/dev/null)'

	* tests/misc/io-errors.sh: Avoid part of test on ksh.
	* tests/misc/write-errors.sh: Likewise.

2026-04-15  Pádraig Brady  <P@draigBrady.com>

	tests: use more accurate ulimit with $SHELL -c
	* tests/misc/write-errors.sh: Use a more accurate ulimit determination
	when we're using $SHELL -c.

	tests: avoid $SHELL -c "ulimit ..." pattern
	As described in commit v9.10-283-g5cb0cca3b
	avoid using ulimit with $SHELL -c, and explict
	invocation of the shell like that can require lots of memory,
	often due to loading the locale archive.
	* tests/basenc/bounded-memory.sh: Avoid $SHELL -c with ulimit.
	* tests/cut/bounded-memory.sh: Likewise.
	* tests/expand/bounded-memory.sh Likewise.
	* tests/pr/bounded-memory.sh Likewise.
	* tests/unexpand/bounded-memory.sh Likewise.
	* tests/fold/fold-zero-width.sh: Bring the ulimit bound
	down to the standard 6M over the determined limit.

	tests: fix false failure due to race
	* tests/misc/tty-eof.pl: Fix a race that commit v9.10-269-gf312af49a
	made more apparent, and resulted in intermittent failure like:
	"... (with input) didn't produce expected output".
	Now Instead of waiting for overlapping echo and output,
	just wait for EOF, and if received, use exp->before()
	to inspect the accumulated output.

2026-04-15  Lukáš Zaoral  <lzaoral@redhat.com>

	df: improve detection of duplicate entries
	Do not compare only with the latest entry for given device id but also
	all previously saved entries with the same id.

	* src/df.c (struct devlist): Add next_same_dev struct member.
	(filter_mount_list): Iterate over next_same_dev to find duplicates.
	* tests/df/skip-duplicates.sh: Add test cases.
	* NEWS: Mention the improvement.
	https://redhat.atlassian.net/browse/RHEL-5649

2026-04-12  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure under some shells
	Verified with:
	  make -j4 PREFERABLY_POSIX_SHELL=/bin/ksh SUBDIRS=. check

	* tests/fold/fold-zero-width.sh: Don't timeout $SHELL -c ...
	as the ulimit induces a failure in the subshell depending
	on the order of the allocations it does.  The main issue is
	disparity between the probed ulimit and that needed by $SHELL -c.
	Such subshells load the often very large locale archive, thus
	if there are any allocations done after the now too low ulimit is set,
	then the $SHELL command fails. Note we timeout fold rather than
	the whole pipeline so any 124 exit status is propagated.

2026-04-11  Pádraig Brady  <P@draigBrady.com>

	tests: validate error handling when reading multiple files
	* tests/misc/read-errors.sh: Validate that commands which read multiple
	files, read all files on error, and exit with appropriate status.

2026-04-11  Collin Funk  <collin.funk1@gmail.com>

	mktemp: prefer rmdir and unlink to remove
	This avoids the following behavior:

	    $ strace -e silence=exit -e trace=unlink,rmdir \
	        mktemp -d > /dev/full
	    unlink("/tmp/tmp.ZBuPmS9ZGD") = -1 EISDIR (Is a directory)
	    rmdir("/tmp/tmp.ZBuPmS9ZGD")  = 0
	    mktemp: write error: No space left on device

	In the above invocation we know that we created a directory, so we
	should not remove a regular file that must have been created by another
	process:

	    $ strace -e silence=exit -e trace=unlink,rmdir \
	        ./src/mktemp -d > /dev/full
	    rmdir("/tmp/tmp.hGbME1HmJr") = 0
	    mktemp: write error: No space left on device

	* src/mktemp.c (main): Prefer rmdir and unlink depending on whether we
	created a directory or regular file.
	* bootstrap.conf (gnulib_modules): Remove the remove module.

2026-04-11  Collin Funk  <collin.funk1@gmail.com>
	    Pádraig Brady  <P@draigBrady.com>

	cat: avoid redundant pipe creation and resizing
	* src/cat.c (splice_cat): Don't bother resizing input as it generally
	doesn't help perf, and also save an fstat per input. Don't close the
	intermediate pipe once created, unless there is an error reading from
	it.

2026-04-10  Pádraig Brady  <P@draigBrady.com>

	tests: validate command responsiveness
	* tests/misc/responsive.sh: Test commands that should output immediately
	upon receiving input, and that there is no unecessary buffering.
	* cfg.mk: Avoid false failure in sc_prohibit_test_backticks.
	* tests/local.mk: Reference the new test.

	tests: stat: ensure independence from /proc/
	* tests/stat/stat-mount.sh: Ensure stat -c '%a'
	is independent from /proc.
	https://github.com/coreutils/coreutils/pull/250

	tests: cut: ensure separate read paths checked
	* tests/misc/read-errors.sh: Use cut -b as that has a separate
	read path to cut -c.

2026-04-10  Bruno Haible  <bruno@clisp.org>

	tests: Avoid accidental matching of the vendor field of $host
	* tests/chgrp/basic.sh: Test $host_os, not $host_triplet.
	* tests/chown/separator.sh: Likewise.
	* tests/rm/r-root.sh: Likewise.
	* tests/tail/pipe-f.sh: Likewise.
	* tests/tail/tail-c.sh: Likewise.
	* tests/tee/tee.sh: Likewise.
	* tests/touch/dangling-symlink.sh: Likewise.

2026-04-10  Collin Funk  <collin.funk1@gmail.com>

	env: avoid locking standard output for each printed variable
	* src/env.c (main): Use fputs and putchar instead of printf.

	printenv: avoid locking standard output for each printed variable
	* src/printenv.c (main): Use fputs and putchar instead of printf.

2026-04-09  Pádraig Brady  <P@draigBrady.com>

	maint: remove last remaining assert()
	* src/split.c (bytes_chunk_extract): Prefer affirm to assert,
	as it allows for better static checking when compiling with -DNDEBUG.

	maint: move tty-eof.pl to misc directory
	* tests/tty/tty-eof.pl: Rename to ...
	* tests/misc/tty-eof.pl: ... this more general directory.
	* tests/local.mk: Adjust accordingly.

	tests: tty-eof.pl: address FIXME re hardcoded Ctrl-d
	* tests/tty/tty-eof.pl: Try to explicitly set EOF char to Ctrl-d
	in case it's different.

	tests: tty-eof.pl: make fully table driven
	* tests/tty/tty-eof.pl: Remove command specific logic,
	and adjust commands to support general input.
	Also add cut -b, as cut_bytes has its own read loop.

	tests: all: check empty tty input is handled appropriately
	* tests/tty/tty-eof.pl: Test all commands twice.
	Once with input and once with empty input.

	maint: cat: avoid coverity NULL dreference warning
	* src/cat.c (ensure_buf_size): Affirm we won't return NULL;

	cat: avoid memory allocation per file
	* src/cat.c (main): Only resize the allocated buffer when needed,
	which avoids per file heap manipulation and mmap/munmap syscalls.

	cat: fix splice() from empty input
	* src/cat.c (splice_cat): Ensure we don't retry a read() after
	splice() completes, as this is significant on a tty.

2026-04-09  oech3  <79379754+oech3@users.noreply.github.com>

	tests: tee: ensure intermittent data is handled
	* tests/tee/tee.sh: Add test case for input from pipe containing sleep.
	https://github.com/coreutils/coreutils/pull/247

2026-04-09  Collin Funk  <collin.funk1@gmail.com>

	maint: touch: prefer timespec_cmp
	* src/touch.c (main): Use timespec_cmp instead of comparing each member
	of the timespec.

2026-04-07  Pádraig Brady  <P@draigBrady.com>

	tests: date: fix false failure on OpenBSD 7.8
	* tests/date/date.pl: Set the max supported year to INT_MAX.
	Most systems support INT_MAX+1900, but mktime() on OpenBSD 7.8
	limits the passed tm_year to INT_MAX.
	Reported by Bruno Haible.

	tests: numfmt: avoid false failure on systems without long double
	* tests/numfmt/numfmt.pl: Move recently added test that depends
	on long double support to the appropriately guarded set.
	Also reduce the value to be in the definitely safe long double range.
	Reported by Bruno Haible.

2026-04-07  Pádraig Brady  <P@draigBrady.com>

	maint: cut: avoid discarded-qualifiers warnings
	Seen on GCC 15.2.1 with GLIBC 2.43 on Arch
	Not seen on GCC 15.2.1 on GLIBC 2.42 on Fedora

	* src/cut.c (search_bytes): Cast the return from memchr()
	to avoid const propagation.
	(find_field_delim): Adjust the return from strstr() similarly.
	https://github.com/coreutils/coreutils/issues/244

2026-04-07  Pádraig Brady  <P@draigBrady.com>

	tests: cat: avoid false failure on systems without splice
	* tests/cat/splice.sh: Ensure splice is called multiple times
	before we check specific invocation counts.
	On Linux kernel 5.10 for example, splice from /dev/zero
	returns EINVAL.

2026-04-07  Collin Funk  <collin.funk1@gmail.com>

	cat: use splice if operating on pipes or if copy_file_range fails
	On a AMD Ryzen 7 3700X system:

	    $ timeout 10 taskset 1 ./src/cat-prev /dev/zero \
	        | taskset 2 pv -r > /dev/null
	    [1.67GiB/s]
	    $ timeout 10 taskset 1 ./src/cat /dev/zero \
	        | taskset 2 pv -r > /dev/null
	    [9.03GiB/s]

	On a Power10 system:

	    $ taskset 1 ./src/yes | timeout 10 taskset 2 ./src/cat-prev \
	        | taskset 3 pv -r > /dev/null
	    [12.9GiB/s]
	    $ taskset 1 ./src/yes | timeout 10 taskset 2 ./src/cat \
	            | taskset 3 pv -r > /dev/null
	    [81.8GiB/s]

	* NEWS: Mention the improvement.
	* src/cat.c: Include isapipe.h, splice.h, and unistd--.h.
	(splice_cat): New function.
	(main): Use it.
	* src/local.mk (noinst_HEADERS): Add src/splice.h.
	* src/splice.h: New file, based on definitions from src/yes.c.
	* src/yes.c: Include splice.h.
	(pipe_splice_size): Use increase_pipe_size from src/splice.h.
	(SPLICE_PIPE_SIZE): Remove definition, moved to src/splice.h.
	* tests/cat/splice.sh: New file, based on some tests in
	tests/misc/yes.sh.
	* tests/local.mk (all_tests): Add the new test.

2026-04-07  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest
	For the Gnulib commit 2c480fa522 (mbrtowc, mbrtoc32: Silence -Wshadow
	warnings (regr. 2026-04-02)., 2026-04-06).

2026-04-06  Pádraig Brady  <P@draigBrady.com>

	build: cut: fix compilation error on non C23 compilers
	* src/cut.c (main): Add curly brackets around variable
	declaration in case label.
	Reported by Bruno Haible.

2026-04-06  Sylvestre Ledru  <sylvestre@debian.org>

	tests: date: add large year test
	* tests/date/date.pl: Add the test case.
	Add test case for https://github.com/uutils/coreutils/issues/9774
	to verify with large dates.
	https://github.com/coreutils/coreutils/pull/237

2026-04-06  Paul Eggert  <eggert@cs.ucla.edu>

	maint: revert “avoid pthread_sigmask lock”
	* configure.ac (GNULIB_SIGACTION_SINGLE_THREAD): Remove.
	This never worked (it was a misspelling) and the properly-spelled
	identifier (whose spelling has since been renamed) is useful
	mostly for programs like gzip that do not need Gnulib’s ‘lock’ module.
	For coreutils, which needs ‘lock’ for other reasons, it’s overkill.

	maint: avoid pthread_sigmask lock overhead
	This matters only for MS-Windows.
	* configure.ac (GNULIB_PTHREAD_SIGMASK_SINGLE_THREAD):
	Define this instead of defining GNULIB_SIGACTION_SINGLE_THREAD.
	The latter was a typo, and Gnulib has evolved anyway.

2026-04-06  Paul Eggert  <eggert@cs.ucla.edu>

	maint: simplify c32issep
	* src/system.h (c32issep): Avoid unnecessary ‘!!’.

2026-04-06  Sylvestre Ledru  <sylvestre@debian.org>

	tests: expr: add short-circuit tests with parenthesized branches
	* tests/expr/expr.pl: Add tests to verify that short-circuit
	evaluation of | and & correctly skips parenthesized dead branches,
	including nested parenthesized expressions containing division by zero.
	https://github.com/uutils/coreutils/pull/11395
	https://github.com/coreutils/coreutils/pull/238

	tests: split: verify non-UTF-8 bytes are preserved in filenames
	* tests/split/non-utf8.sh: New test to ensure that non-UTF-8 bytes
	in the prefix and --additional-suffix are preserved as-is in output
	filenames, rather than being replaced by UTF-8 replacement characters.
	* tests/local.mk: Register new test.
	https://github.com/uutils/coreutils/pull/11397
	https://github.com/coreutils/coreutils/pull/239

	tests: ln: add test for non-UTF-8 source names in target-dir mode
	* tests/ln/non-utf8-src.sh: New test ensuring ln handles source
	filenames containing non-UTF-8 bytes when linking into a target
	directory, for both hard links and symbolic links with -t.
	* tests/local.mk: Register the new test.
	https://github.com/uutils/coreutils/pull/11403
	https://github.com/coreutils/coreutils/pull/240

	test: od: verify -t f defaults to double precision
	* tests/od/od-float.sh: Add cases to ensure -t f = -t fD,
	and also verify the resulting number.
	https://github.com/uutils/coreutils/pull/11396
	https://github.com/coreutils/coreutils/pull/241

	tests: ls: add quoting-utf8 test for Unicode quotes in UTF-8 locales
	* tests/ls/quoting-utf8.sh: New test verifying that
	--quoting-style=locale and --quoting-style=clocale use Unicode
	left/right single quotation marks in UTF-8 locales, and that
	embedded apostrophes and double quotes are not escaped when the
	delimiters are different characters.
	Also check C locale fallback to ASCII quotes.
	* tests/local.mk: Reference the new test.
	https://github.com/coreutils/coreutils/pull/243

	tests: numfmt: cover GNU/uutils compatibility edge cases
	* tests/numfmt/numfmt.pl: Add tests exercising corner cases around
	negative-argument rejection, large integer precision, scientific
	notation rejection, '--from-unit' fractional precision, zero-padded
	format sign ordering, '--to-unit' prefix selection, and
	'--format=%.0f' with '--to=<scale>'.
	https://github.com/uutils/coreutils/pull/11668

2026-04-06  Pádraig Brady  <P@draigBrady.com>

	doc: document cut(1) multi-byte and interface consolidation
	This patch set updates cut(1) to be multi-byte aware.
	It also reduces interface divergence across implementations.

	multi-byte awareness was added to the existing -c, n, and -d options.
	Also considered for compatibility are the -w, -F, and -O options,
	as these are present on at least two other common implementations.

	= Interface / New functionality =

	    macOS,  i18n, uutils, Toybox, Busybox, GNU
	-c    x      x       x      x        x      x
	-n    x      x                              x
	-w    x              x                      x
	-F                          x        x      x
	-O                          x        x      x

	-c is needed anyway as specified by all, including POSIX.
	-n is needed also as specified by i18n/macOS/POSIX
	-w is somewhat less important, but seeing as it's
	on two other common platforms (and its functionality is
	provided on two more), providing it is worthwhile for compat.
	-F and -O are really just aliases to other options
	so trivial to add, and probably worthwhile for compatibility.

	Interface / functionality notes:

	There is a slight divergence between -n implementations.
	There was already a difference between FreeBSD and i18n, and
	we've aligned with the more sensible FreeBSD implementation.
	Note the i18n -n implementation is otherwise buggy in any case,
	so I doubt this will be a practical compatibility concern.
	Actually -n is specified by POSIX, and it matches FreeBSD.
	Specifically our -n will not output a character unless the
	byte range encompasses _the end_ of the multi-byte character.
	I.e. the -b is a limit that is not passed, and thus ensures
	we don't output overlapping characters for separate cut
	invocations that do not have overlapping byte ranges.

	-d <regex> from toybox is not implemented.
	That's edge case functionality IMHO and not well suited to cut(1).
	This functionality is supported by awk, and regex functionality
	is best restricted to awk I think.

	cut is a significant part of the i18n patch, so it will be good
	to avoid that downstream divergence.  Unfortunately there were
	no tests with the cut i18n implementation.
	Note the i18n cut implementation used fread() as so was
	not reponsive to new data < BUFSIZ, whereas this implementation
	uses read() and thus is responsive to data as it becomes available.

	= Performance =

	General performance notes:

	We prefer byte searching (with -d) as that can be much faster
	than character by character processing, and it's supported
	on single byte and UTF-8 charsets.  We also use byte searching
	with -w on uni-byte locales.
	This was seen to give up to 100x perf increase over the i18n patch.

	Where we do use per character processing, we avoid conversion to
	wide char when processing ASCII data (mcel provides this optimization).
	This was seen to give a 14x performance increase over the i18n patch.

	We prefer memchr() and strstr() as these are tuned for specific
	platforms on glibc, even if memchr2() or memmem()
	are algorithmically better.

	We maintain the important memory behavior
	of only buffering when necessary.

	Performance testing:

	There are _lots_ of combinations and optimziation opportunities.
	I performance tested this patch set with the following setup:

	$ yes | head -n10M > sl.in
	$ yes $(yes eeeaae | head -n10K | paste -s -d,) | head -n10K > ll.in
	$ yes $(yes eeeaae | head -n9 | paste -s -d,) | head -n1M > as.in
	$ yes $(yes éééááé | head -n9 | paste -s -d，) | head -n1M \
	  > mb.in

	$ for type in sl ll as mb; do
	    cat $type.in >/dev/null;
	    for imp in '' src/; do  # '' maps to the system i18n ver on Fedora
	      echo ============ "${imp:-i18n}" $type ==============;
	      for d in -d, -dc -d， -dç -w -b -c; do
	        fields='-f1 -f10 -f100'
	        test "$d" = "-b" && { fields='-b1 -b10 -b100'; d=''; }
	        test "$d" = "-c" && { fields='-c1 -c10 -c100'; d=''; }
	        for f in $fields; do
	          for loc in C C.UTF-8; do
	            # SKip -b for UTF-8 as no different
	            test "$loc" = C.UTF-8 && echo "$f" | grep -q -- -b \
	             && continue
	            # Skip multi-byte delimiter for C and not allowed
	            test "$loc" = C && test $(echo -n "$d" | wc -c) -ge 4 \
	             && continue
	            LC_ALL=$loc ${imp}cut $f $d /dev/null 2>/dev/null &&
	            hyperfine -m2 -M4 \
	             "LC_ALL=$loc ${imp}cut $f $d $type.in >/dev/null" ||
	            printf 'Benchmark 1: %s\n  unsupported\n\n' \
	             "LC_ALL=$loc ${imp}cut $f $d $type.in >/dev/null"
	          done;
	        done;
	      done;
	    done;
	  done

	After a little post-processing of the results, we get:

	-- cut-i18n

	| command         |       sl |       ll |       as |       mb |
	| --------------- | -------- | -------- | -------- | -------- |
	| C -f1 -d,       |  66.3 ms |  1.605 s | 145.9 ms | 366.4 ms |
	| UTF8 -f1 -d,    |  65.8 ms |  1.593 s | 145.8 ms | 370.0 ms |
	| C -f10 -d,      | 301.4 ms |  1.590 s | 161.8 ms | 126.7 ms |
	| UTF8 -f10 -d,   | 303.5 ms |  1.599 s | 161.8 ms | 124.6 ms |
	| C -f100 -d,     | 300.6 ms |  1.596 s | 162.1 ms | 126.7 ms |
	| UTF8 -f100 -d,  | 301.3 ms |  1.595 s | 162.0 ms | 124.9 ms |
	| C -f1 -dc       |  66.6 ms |  1.845 s | 179.1 ms | 365.7 ms |
	| UTF8 -f1 -dc    |  73.8 ms |  1.878 s | 179.1 ms | 363.1 ms |
	| C -f10 -dc      | 300.7 ms | 349.8 ms |  76.0 ms | 125.3 ms |
	| UTF8 -f10 -dc   | 300.4 ms | 347.2 ms |  75.7 ms | 124.8 ms |
	| C -f100 -dc     | 300.1 ms | 348.1 ms |  76.5 ms | 125.5 ms |
	| UTF8 -f100 -dc  | 300.8 ms | 348.7 ms |  76.4 ms | 125.8 ms |
	| UTF8 -f1 -d，   | 563.5 ms | 21.775 s |  1.963 s |  1.665 s |
	| UTF8 -f10 -d，  | 833.6 ms | 20.504 s |  2.022 s |  1.612 s |
	| UTF8 -f100 -d， | 825.2 ms | 20.448 s |  2.009 s |  1.616 s |
	| UTF8 -f1 -dç    | 563.7 ms | 21.827 s |  1.964 s |  2.319 s |
	| UTF8 -f10 -dç   | 825.3 ms | 21.713 s |  2.011 s |  2.248 s |
	| UTF8 -f100 -dç  | 831.6 ms | 20.505 s |  2.019 s |  2.276 s |
	| C -f1 -w        |        - |        - |        - |        - |
	| UTF8 -f1 -w     |        - |        - |        - |        - |
	| C -f10 -w       |        - |        - |        - |        - |
	| UTF8 -f10 -w    |        - |        - |        - |        - |
	| C -f100 -w      |        - |        - |        - |        - |
	| UTF8 -f100 -w   |        - |        - |        - |        - |
	| C -b1           |  60.8 ms |  1.596 s | 154.8 ms | 313.7 ms |
	| C -b10          |  51.6 ms |  1.594 s | 154.3 ms | 310.8 ms |
	| C -b100         |  51.4 ms |  1.594 s | 153.0 ms | 312.2 ms |
	| C -c1           |  60.7 ms |  1.597 s | 153.8 ms | 313.0 ms |
	| UTF8 -c1        | 526.5 ms | 14.662 s |  1.362 s |  1.573 s |
	| C -c10          |  51.8 ms |  1.591 s | 153.3 ms | 311.4 ms |
	| UTF8 -c10       | 436.9 ms | 14.450 s |  1.336 s |  1.563 s |
	| C -c100         |  51.0 ms |  1.593 s | 152.7 ms | 313.2 ms |
	| UTF8 -c100      | 426.7 ms | 14.429 s |  1.344 s |  1.551 s |

	-- src/cut

	| command         |       sl |       ll |       as |       mb |
	| --------------- | -------- | -------- | -------- | -------- |
	| C -f1 -d,       |   4.6 ms | 108.2 ms |  45.4 ms |  24.2 ms |
	| UTF8 -f1 -d,    |   4.8 ms | 108.4 ms |  45.4 ms |  24.5 ms |
	| C -f10 -d,      |   4.5 ms | 109.3 ms | 123.7 ms |  24.3 ms |
	| UTF8 -f10 -d,   |   4.9 ms | 114.1 ms | 124.1 ms |  24.5 ms |
	| C -f100 -d,     |   4.7 ms | 119.2 ms | 124.1 ms |  24.5 ms |
	| UTF8 -f100 -d,  |   4.8 ms | 120.0 ms | 125.1 ms |  24.5 ms |
	| C -f1 -dc       |   4.4 ms | 120.5 ms |  11.9 ms |  24.1 ms |
	| UTF8 -f1 -dc    |   4.9 ms | 120.5 ms |  12.1 ms |  24.6 ms |
	| C -f10 -dc      |   4.7 ms | 125.3 ms |  11.8 ms |  24.1 ms |
	| UTF8 -f10 -dc   |   4.8 ms | 126.7 ms |  12.0 ms |  24.4 ms |
	| C -f100 -dc     |   4.6 ms | 127.0 ms |  11.9 ms |  24.3 ms |
	| UTF8 -f100 -dc  |   4.7 ms | 126.4 ms |  12.0 ms |  24.4 ms |
	| UTF8 -f1 -d，   |   6.0 ms | 169.4 ms |  15.6 ms |  67.4 ms |
	| UTF8 -f10 -d，  |   6.1 ms | 173.9 ms |  15.6 ms | 237.2 ms |
	| UTF8 -f100 -d， |   6.1 ms | 174.0 ms |  15.6 ms | 237.8 ms |
	| UTF8 -f1 -dç    |   6.3 ms | 170.8 ms |  15.7 ms |  32.2 ms |
	| UTF8 -f10 -dç   |   6.0 ms | 172.9 ms |  15.9 ms |  32.1 ms |
	| UTF8 -f100 -dç  |   6.7 ms | 173.1 ms |  15.5 ms |  32.3 ms |
	| C -f1 -w        | 159.6 ms | 170.1 ms |  69.1 ms |  98.9 ms |
	| UTF8 -f1 -w     | 128.1 ms |  2.525 s | 246.5 ms |  1.086 s |
	| C -f10 -w       | 183.3 ms | 199.2 ms |  74.6 ms | 105.0 ms |
	| UTF8 -f10 -w    | 130.3 ms |  2.659 s | 276.5 ms |  1.099 s |
	| C -f100 -w      | 183.8 ms | 202.5 ms |  74.1 ms | 103.6 ms |
	| UTF8 -f100 -w   | 130.1 ms |  2.663 s | 276.6 ms |  1.097 s |
	| C -b1           |  65.0 ms | 110.2 ms |  22.4 ms |  35.6 ms |
	| C -b10          |  48.7 ms | 109.6 ms |  24.2 ms |  36.7 ms |
	| C -b100         |  48.7 ms | 110.6 ms |  19.0 ms |  36.6 ms |
	| C -c1           |  65.8 ms | 109.5 ms |  22.4 ms |  35.6 ms |
	| UTF8 -c1        |  63.2 ms |  1.130 s | 116.9 ms | 610.2 ms |
	| C -c10          |  48.7 ms | 109.8 ms |  24.3 ms |  36.8 ms |
	| UTF8 -c10       |  39.7 ms |  1.133 s | 118.7 ms | 610.0 ms |
	| C -c100         |  48.3 ms | 110.7 ms |  18.9 ms |  36.7 ms |
	| UTF8 -c100      |  39.4 ms |  1.141 s | 115.0 ms | 598.8 ms |

	In summary, compared to the i18n patch we're now as fast in all cases,
	and much faster in most cases.

	We can see the -f byte searching performing well,
	being 120x faster in the no matching delimiter case,
	to at least 3x faster in the matching delimiter case.

	When we resort to per character processing we also compare well,
	being 14x faster in the ASCII processing case
	(due to mcel short-circuiting the wide char conversion).
	Note the processing mb.in results above also show a 2x win
	in per character processing cases, but the i18n patch would have
	also picked that win up as it's achieved separately to this patch set:
	https://lists.gnu.org/r/coreutils/2026-03/msg00117.html

2026-04-06  Pádraig Brady  <P@draigBrady.com>

	tests: cut: add remaining tests to ensure 100% coverage
	* tests/cut/cut.pl: Add new tests to ensure
	`make coverage` shows 100% coverage for cut.c.

	tests: cut: expand GB18030 tests
	* tests/cut/mb-non-utf8.sh: Add more test cases.

2026-04-06  Paul Eggert  <eggert@cs.ucla.edu>

	maint: cut: refactor delimiter handling
	* src/cut.c: Use mcel_scanz() to parse in all cases,
	and avoid redundant storage of delimiter_length and
	the single byte delim.

2026-04-06  Pádraig Brady  <P@draigBrady.com>

	cut: -f: fix handling of multi-byte delimiters that span buffers
	* src/cut.c (cut_fields_bytesearch): Ensure up to delim_bytes -1
	is left for the next refill.
	* tests/cut/cut.pl: Add a test case.

	cut,fold,expand,unexpand: ensure we process all available characters
	* gl/lib/mbbuf.h: Adjust mbbuf_fill() to process full characters
	in the slop at the end of a read().  Previously valid characters
	in the last MCEL_LEN_MAX bytes were ignored until the next read().
	* src/cut.c (cut_fields_bytesearch): Adjust to the new naming.
	* NEWS: Mention the fold(1) responsiveness fix, which was
	improved with the change from fread() to read(),
	and completed with this patch.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: -b: avoid function calls in hot loop
	  $ time LC_ALL=C src/cut-before -b1 sl.in >/dev/null
	  real	0m0.115s

	  $ time LC_ALL=C src/cut-after -b1 sl.in >/dev/null
	  real	0m0.076s

	* src/cut.c (cut_bytes): Hoist the fileno() invariant outside the loop.
	Avoid memchr for very short lines.
	(search_bytes): Similar to copy_bytes() and write_bytes() helpers.
	Note adding code to probe 3 or 4 bytes resulted in worse register
	allocation.  I.e. slower operation even if the input was only 2 bytes.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: fix logic issue with field delim in last byte of buffer
	With field delimiter = line delimiter we need to know
	if there is any more data to be read, as field delimiter
	in the last byte of the file is treated differently.
	So reiterate the loop to ensure enough read()s to make
	the appropriate determination.

	cut: ensure responsive input processing
	* gl/lib/mbbuf.h (fill_buf): Switch from fread() to read()
	as the former retries read() internally to fill the buffer.
	* src/cut.c: Adjust accordingly, and avoid getc() interface entirely.
	* bootstrap.h: Depend explicitly on fseterr.  This is already depended
	on transitively, so should not introduce new build portability issues.

	maint: cut: rename line_in to bytes_in
	* src/cut.c: We're not reading a line, rather a buffer of bytes.
	Suggested by Collin Funk.

	tests: cut: add more multi-byte tests
	* tests/cut/cut.pl: Add more multi-byte combinations.

	cut: make the dependency on memchr2 explicit
	* bootstrap.conf: Remove now unused getndelim2, add memchr2.
	* src/cut.c: Remove now unused getndelim2.h.

	cut: combine cut_bytes_no_split and cut_characters
	per character based so merge.

	doc: cut: clarify that combining characters are not treated specially
	This is for consistency with other implementations and since the
	interface separates -b and -c it might in future support -g (graphemes).
	Normalizing content with a filter seems like the most appropriate
	approach anyway, as there are various normalizations possible including
	case etc. rather than baking that into every tool

	maint: cut: various code cleanups and comments
	* src/cut.c: Document some functions, and remove extraneous
	 abstractions.

	cut: support no delimiter match fast path with -s
	* src/cut.c (cut_fields_bytesearch): Just skip the data with -s.

	doc: cut: resintate and expand -d info
	* doc/coreutils.texi (cut invocation): Add back the -d description,
	and adjust for multi-byte support, and expand on specifying a NUL
	delimitier, and detail the behavior when the delimiter matches
	the line delimiter.

	maint: cut: cleanup context management for byte search
	* src/cut.c: Hoist at_eof into context so we're not
	querying it multiple times.  Also add a helper
	to explicitly init bytesearch_context.

	cut: optimize UTF-8 input with 0xF5-0xFF delimiters
	* src/cut.c (bytesearch_field_delim_ok): Expand the range
	of bytes that can be simply searched for. 0xF5-0xFF can't
	appear in valid UTF-8 characters, and so may be used as
	delimiters in UTF-8 input, so it's worth optimizing for.
	* tests/cut/cut.pl: Add a test case (mainly as documentation).

	doc: cut: clarify that -s suppressed lines with only trimmed spaces
	* doc/coreutils.texi (cut invocation): State explicitly that
	-s --whitespace-delimited=trimmed will suppress lines that
	do not have field separating blanks.

	doc: cut: mention the default -O used with -w
	* doc/coreutils.texi (cut invocation): Mention the default
	--output-delimiter is a TAB when matching runs of blanks in the input.

	maint: cut: simplify mbbuf_fill
	We can only byte search with uni-byte or utf-8.
	utf-8 implicitly can't false match a delimiter at buffer boundary.
	So don't worry about finding the exact utf8 boundary at end of buffer,
	rather just ensuring the buffer always starts with a valid character
	(by ensuring MCEL_LEN_MAX-1 moved to start of buffer on each refill).

	maint: refactor is_utf8_charset helper to system.h
	* src/cut.c: Move from here.
	* src/numfmt.c: Likeise.
	* src/system.h: To here.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: optimize per character memcpy
	$ time src/cut-before -f10 -w ll.in >/dev/null
	real	0m4.309s

	$ time src/cut-after -f10 -w ll.in >/dev/null
	real	0m3.136s

	* src/cut.c (cut_bytes): Add a new helper that avoids
	the memcpy call in the common case of adding characters to a buffer.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: refactor skip_line_remainder logic
	Simplify and optimize field exhaustion logic:

	$ time LC_ALL=C src/cut-before -f1 -dc as.in >/dev/null
	real	0m0.057s

	$ time LC_ALL=C src/cut-after -f1 -dc as.in >/dev/null
	real	0m0.023s

	* src/cut.c (cut_fields_bytesearch): Refactor.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	maint: cut simplify cut_fields_bytesearch
	refactor line delimiter output,
	and resetting of parse record state.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: enable fast path for all delimiter lengths
	1. Removed !have_pending_line from the fast path condition.
	This is safe because:
	  - field_1_n_bytes == 0 already ensures we haven't started
	    buffering field 1 content
	  - The fast path correctly continues any pending partial line
	    by writing raw bytes including the completing \n
	2. Added have_pending_line = false after the fast path write,
	since all lines up to the last \n are now complete.

	$ time src/cut.before -f1 -dç sl.in >/dev/null
	real	0m0.081s
	$ time src/cut.after -f1 -dç sl.in >/dev/null
	real	0m0.012s

	$ time src/cut.before -f10 -dç sl.in >/dev/null
	real	0m0.081s
	$ time src/cut.after -f10 -dç sl.in >/dev/null
	real	0m0.012s

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: optimize -f with -d longer than lines
	$ time src/cut.before -f1 -dç sl.in >/dev/null
	real	0m0.157s

	$ time src/cut.after -f1 -dç sl.in >/dev/null
	real	0m0.084s

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: optimize -b for short lines
	For a 40% performance increase it's worth reinstating the simple
	original cut_bytes() which avoids data copying and function calls.
	Once a longer line is encountered we defer to the buffered variant.

	$ time src/cut.before -b2 sl.in  >/dev/null
	real	0m0.101s

	$ time src/cut.after -b2 sl.in  >/dev/null
	real	0m0.060s

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: optimize per character field scanning
	Use specialized loops rather than branching per character,
	giving a 28% increase.

	$ time src/cut -f1 -w ll.in >/dev/null
	real	0m7.199s

	$ time src/cut -f1 -w ll.in >/dev/null
	real	0m5.204s

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: prefer c_isblank() to c32issep()
	12% perf increase with:

	$ time src/cut -f2 -w ll.in >/dev/null
	real	0m6.469s

	$ time src/cut -f2 -w ll.in >/dev/null
	real	0m5.689s

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: avoid fwrite calls for smaller amounts of data
	This is quite significant:

	yes abcdfeg | head -n1MB > big-file

	$ time src/cut-before -b1,3 big-file >/dev/null
	real	0m0.050s

	$ time src/cut-after -b1,3 big-file >/dev/null
	real	0m0.029s

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: optimize -b by avoiding per byte iteration
	Always memchr(line_delim) which is fast and allows:

	- skipping whole segments when the next selected byte is beyond them
	- skipping unselected prefixes in bulk
	- writing contiguous selected spans in bulk

	This wins for lines >= 4 characters,
	but is slower lines <= 3 characters, especially if selecting bytes 1-3.
	That is unusual though.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: optimize when no delimiter in input
	This is about 20x faster.
	Note we only do the delimiter search once per chunk,
	and it's usually quick as delimiters wouldn't be too far
	into the a chunk if present, so we don't bother
	to cache the found delimiter.

	tests: cut: ensure multi-byte delimiter is rejected in uni-byte locales
	tests/cut/cut.pl: Check the appropriate diagnostic is presented.

	cut: optimize -w for uni-byte case
	* src/cut.c: Limit search to SPACE and TAB

	doc: cut: reorder -s in texi
	Keep in alphabetical order.

	doc: cut: document the -w option
	* src/cut.c (usage): Mention blank characters are used to separate.
	* doc/coreutils.texi (cut invocation): Likewise.  Also describe
	the 'trimmed' argument and the relation to -F.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: refactor find_bytesearch_field_terminator to be stateful
	Allows better/simpler avoidance of repeated line/delim scans

	TODO: speed up our really slow cut_fields_mb_any.
	Compare for example:
	  time src/cut -w  -f1 ll.in >/dev/null #14s
	  time src/cut -d, -f1 ll.in >/dev/null #.1s
	Could adjust so that LC_ALL=C does memchr2(space,tab) ?

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: avoid repeated searchs for line_delim in the multi-byte delim case
	TODO: Refactor all this into find_bytesearch_field_terminator.
	Also handle in the delim_length==1 case.

	cut: refactor all byte search to find_bytesearch_field_terminator
	TODO: Perhaps also add search only fields mode
	to avoid rescans of very long lines

	cut: optimize -f when finished processing fields for a line
	TODO: simplify and compare perf

	cut: optimize -f for fhe common case of single byte delimiters
	* TODO: perf comparison

	cut: optimize -d '?' in UTF-8 case
	ensure all ascii delims are processed with byte search in UTF-8

	cut: merge cut_fields and cut_fields_bytesearch
	TODO: See why this is much slower:
	time LC_ALL=C.UTF-8 src/cut -f1 -dc as.in > /dev/null

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: refactor -f to byte search and character processing
	Not sure about this at all.
	Only worthwhile if can also remove cut_fields_line_delim.

	Refactored src/cut.c so the old UTF-8 byte-search path is now the
	general byte-search field engine for all safe byte-search cases:
	ordinary single-byte delimiters and valid UTF-8 delimiters. The old
	cut_fields path did not go away completely; it is now
	cut_fields_line_delim and is used only when the field delimiter equals
	the record delimiter, because -d $'\n' and -z -d '' have different
	semantics from normal line-based field splitting.

	As part of that, I also folded the duplicated “start selected field”
	logic into a shared helper, and renamed the byte-search helpers to match
	their broader use. The current dispatcher in src/cut.c is now:
	whitespace parser, then line- delimiter field mode, then byte-search
	field mode, then the decoded multibyte parser.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: fix 25% perf regression mentioned in previous change
	* src/cut.c: Prefer strstr() over memmem() as the former is
	optimized per platforma on GLIBC, where as the latter is only
	optimized for S390 as of glibc-2.42

	TODO: look at merging cut_fields and cut_fields_mb_utf8
	as they're both byte search

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: use bounded memory in utf8 mode when possible
	TODO: See why a bit slower than old code

	$ time src/cut.old -f1 -dç mb.in >/dev/null
	real	0m0.136s
	user	0m0.096s
	sys	0m0.039s

	$ time src/cut.new -f1 -dç mb.in >/dev/null
	real	0m0.170s
	user	0m0.139s
	sys	0m0.030s

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: add utf8 helper to mbbuf
	* gl/lib/mbbuf.h: To safely search a bounded buffer,
	without needed to have unbounded memory with getndelim2.

	TODO: rename mbbuf_utf8_safe_prefix to mbbuf_fill_utf8

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: faster utf8 processing
	TODO: improve to use bounded memory where possible

	cut: support -F as an alias for -f -w -O ' '
	To improve compatibility with toybox/busybox scripts.

	maint: cut: refactor buffered and ordinary field scanning
	* src/cut.c: Merge scan_mb_field and read_mb_field_to_buffer

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: support --whitespace-delimited=trimmed
	Support ignoring leading and trailing whitespace.
	E.g. this matches awk's default field splitting mode.

	* src/cut.c
	* tests/cut/cut.pl: Add test cases.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: support -O as an alias for --output-delimiter
	To improve compatibility with toybox/busybox scripts.

	* doc/coreutils.texi (cut invocation): Add -O description.
	* src/cut.c: Support -O as well as --output-delimiter
	* tests/cut/cut.pl: Adjust one case to use -O.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	doc: cut: adjust for multi-byte support
	* doc/coreutils.texi (cut invocation): Remove the note about
	-c being the same as -b.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: refactor multi-byte updates
	* src/cut.c: 160 fewer lines

	Helpers extracted (replacing repeated inline patterns):
	- write_line_delim(), write_pending_line_delim(), reset_item_line()
	  - line boundary code used by cut_bytes{,no_split}, cut_characters
	- write_selected_item()
	  - output-delimiter + write logic used by all three byte/char functions
	- reset_field_line()
	  - field line reset used by cut_fields_mb_any

	Field functions unified via cut_fields_mb_any(stream, whitespace_mode):
	- struct mbfield_parser encapsulates the whitespace vs.
	  fixed-delimiter state (saved char, mode flag)
	- mbfield_get_char() - dispatches to saved-char or direct read
	- mbfield_terminator()
	  - returns FIELD_{DATA,DELIMETER,LINE_DELIMITER} based on mode
	- read_mb_field_to_buffer()
	  - replaces the two duplicated first-field buffering loops
	- scan_mb_field(mbbuf, parser, pending, write_field)
	  - replaces the four duplicated field scan loops
	  (print+skip × two modes) with a single function and a write_field bool
	- cut_fields_mb and cut_fields_ws are now trivial wrappers

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: implement -n to avoid outputting partial characters
	Both the i18n patch and FreeBSD/macOS support this option.
	They do differ in behavior somewhat as the i18n patch
	may output more bytes than requested.

	  $ printf '\xc3\xa9b\n' | i18n-cut -n -b1
	  é

	There is also a bug in the i18n patch with multi-byte
	at the start of a line:

	  $ printf '\xc3\xa9b\n' | i18n-cut -n -b1-2
	  éb

	We follow the FreeBSD behavior since it seems more
	useful to have -b be a hard limit, rather than a soft limit.
	This also reduces the possibility of duplicate character output
	with separate cut invocations with non overlapping byte ranges.

	* src/cut.c (cut_bytes_no_split): A new function
	similar to cut_characters, to handle multi-byte characters
	with byte limit semantics.
	* tests/cut/cut.pl: Add test cases.

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	tests: cut: add a test for divergence from i18n patch
	* tests/cut/cut.pl: We don't fall back to byte mode
	upon invalid uni-byte delimiter.

	tests: cut: add case currently failing for coreutils-i18n patch
	* tests/cut/cut.pl: Test for extraneous character output with:
	printf 'aéb\n' | cut -s -d 'é' -f1 | od -tx1

	tests: cut: check multi-byte output delimiter
	* tests/cut/cut.pl: Add a test case.

	cut: adjust error message to be less specific
	* src/cut.c (main): Cater for both misplaced -w and -d.

	cut: implement -w,--whitespace-delimited
	* src/cut.c (cut_fields_ws): A new function handling both
	uni-byte and multi-byte cases.
	* tests/cut/cut.pl: Add a test cases.

	cut: support single byte -d with GB18030 input
	* src/cut.c
	* tests/cut/mb-non-utf8.sh
	* tests/local.mk

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: support single byte -d that may be part of multi-byte
	Note this is a slight divergence from the i18n patch
	as that switched to uni-byte for any single byte delimiter
	that is not valid multi-byte.

	That results in possibly splitting in the middle of
	a valid multi-byte character.

	Instead we only split on a single byte when they're
	not part of a multi-byte character.

	* src/cut.c

2026-04-05  Pádraig Brady  <P@draigBrady.com>

	cut: support multi-byte field delimiters
	* src/cut.c
	* tests/cut/cut.pl

	cut: support multi-byte input with -c
	* src/cut.c
	* tests/cut/cut.pl

	maint: cut: refactor output calls
	* src/cut.c (cut_fields): Refactor calls to fwrite() and putchar()

	tests: cut: ensure no unecessary buffering
	* tests/misc/write-errors.sh: Ensure we write output when possible.

	doc: cut: reorder --complement alphabetically in help
	* src/cut.c (usage): Move placement of --comlement description.
	* doc/coreutils.texi (cut invocation): Likewise.

	doc: cut: clarify description of -b and -c
	* src/cut.c (usage): State the arguments are positions,
	in case users may think they were values.

	build: update to latest gnulib
	Pick up mbrto{c32,wc} optimizations on UTF-8 on GLIBC.
	Note configure.ac defines the required GNULIB_WCHAR_SINGLE_LOCALE.
	This speeds up wc -m by 2.6x, when processing non ASCII chars,
	and will similarly speed up per character processing
	in the impending cut multi-byte implementation.
	* NEWS: Mention the wc -m speed improvement.

2026-04-04  Collin Funk  <collin.funk1@gmail.com>

	basename: avoid duplicate strlen calls on the suffix
	    $ ltrace -c ./src/basename-prev -s a $(seq 100000) > /dev/null
	    % time     seconds  usecs/call     calls      function
	    ------ ----------- ----------- --------- --------------------
	     50.00   30.030316          75    400000 strlen
	    [...]
	    $ ltrace -c ./src/basename -s a $(seq 100000) > /dev/null
	    % time     seconds  usecs/call     calls      function
	    ------ ----------- ----------- --------- --------------------
	     42.88   22.413953          74    300001 strlen
	    [...]

	* src/basename.c (remove_suffix, perform_basename): Add a length
	argument for the suffix and use it instead of strlen.
	(main): Calculate the suffix length. Refactor code to avoid calling
	perform_basename in multiple places.

2026-04-03  Paul Eggert  <eggert@cs.ucla.edu>

	date: simplify -u by not calling putenv
	* src/date.c (TZSET): Remove; no longer needed.
	(main): Simplify -u’s implementation by passing "UTC0" to tzalloc,
	rather than by setting TZ in the environment and then calling getenv.
	The old way of doing things dates back to before we had tzalloc.
	* configure.ac (LOCALTIME_CACHE): Remove; no longer needed.

2026-04-01  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: avoid sigaction lock overhead
	* configure.ac (GNULIB_SIGACTION_SINGLE_THREAD):
	Define to avoid unnecessary locking in Gnulib sigaction.  See:
	https://lists.gnu.org/r/bug-gnulib/2026-04/msg00008.html

	maint: avoid Gnulib modules mbiter, mbiterf
	* bootstrap.conf (avoided_gnulib_modules): Avoid mbiter and
	mbiterf, for the same reason we avoid mbuiter and mbuiterf: these
	modules are not needed because (due to mcel-prefer) we use mcel in
	preference to mbiter/mbiterf/mbuiter/mbuiterf.

	build: update gnulib submodule to latest

2026-04-01  oech3  <79379754+oech3@users.noreply.github.com>

	tests: dd: ensure memory exhaustion is handled gracefully
	* tests/dd/no-allocate.sh: Ensure we exit 1 upon mem allocation failure.
	Also check other buffer size edge cases.
	https://github.com/uutils/coreutils/issues/11436
	https://github.com/uutils/coreutils/issues/11580
	https://github.com/coreutils/coreutils/pull/235

2026-04-01  Pádraig Brady  <P@draigBrady.com>

	tests: dd: avoid false failure with no controlling terminal
	* tests/dd/misc.sh: test -w /dev/tty is not a strong enough check,
	we need to actually open /dev/tty to ensure it's available.
	It's not available under setsid for example.

2026-03-31  oech3  <79379754+oech3@users.noreply.github.com>

	tests: dd: check that erroneous seeks are not done in output
	* tests/dd/misc.sh: Add test case for of=/dev/tty.
	The same occurs for /dev/stdout, but that varies
	in the test hardness so is best avoided.
	https://github.com/coreutils/coreutils/pull/234

2026-03-30  oech3  <79379754+oech3@users.noreply.github.com>

	tests: coreutils: ensure empty arg is diagnosed
	* tests/misc/coreutils.sh: Add a test case.
	https://github.com/coreutils/coreutils/pull/232

2026-03-29  Collin Funk  <collin.funk1@gmail.com>

	date: avoid calling putenv multiple times unnecessarily
	Adding environment variables can become quite expensive in some
	admittedly unlikely situations.

	    $ for i in $(seq 10000); do export A$i=A$i; done
	    $ time ./src/date-prev -u $(yes -- -u | head -n 100000)
	    Sun Mar 29 01:59:49 AM UTC 2026

	    real	0m3.753s
	    user	0m3.684s
	    sys	0m0.050s
	    $ time ./src/date -u $(yes -- -u | head -n 100000)
	    Sun Mar 29 02:00:00 AM UTC 2026

	    real	0m0.061s
	    user	0m0.022s
	    sys	0m0.045s

	* src/date.c (main): Only add TZ=UTC0 to the environment once.

2026-03-28  Collin Funk  <collin.funk1@gmail.com>

	maint: remove unnecessary return statements
	* src/env.c (initialize_signals): Remove return at the end of the
	function.
	* src/who.c (print_runlevel): Likewise.

	who: avoid locking standard output for each user with the -q option
	* src/who (list_entries_who): Prefer putchar and fputs to printf.
	Simplify separator tracking.

	doc: tty: mention the removal of the -s option from POSIX
	* doc/coreutils.texi (tty invocation): Mention that POSIX.1-2001 removed
	the -s option and that portable scripts can redirect standard out to
	/dev/null instead.

2026-03-27  oech3  <79379754+oech3@users.noreply.github.com>

	tests: env/env.sh: improve portability
	* tests/env/env.sh: Make more portable by avoiding references to our
	build dir,  and avoiding names that may cause false matches in
	multi-call binaries.
	https://github.com/coreutils/coreutils/pull/216

2026-03-25  Pádraig Brady  <P@draigBrady.com>

	od: suppress address output on read error
	We don't output an address for `od missing` or `od --strings .`,
	so be consistent and suppress the address for `od .`.

	* src/od.c (dump): Only output an address if no errors
	or the offset is non zero.

2026-03-25  oech3  <79379754+oech3@users.noreply.github.com>

	tests: od: ensure -j1 /dev/null succeeds
	Users may be using this to convert bases.

	* tests/od/od-j.sh: Add a test case.
	https://github.com/coreutils/coreutils/pull/228

2026-03-25  Collin Funk  <collin.funk1@gmail.com>

	tests: truncate: don't rely on errno being EISDIR
	* tests/truncate/multiple-files.sh: Only check that an error is printed
	instead of an exact message.
	Reported by Bruno Haible.

2026-03-24  oech3  <79379754+oech3@users.noreply.github.com>

	tests: yes: support more zero-copy related syscalls
	* tests/misc/yes.sh: Disable other related zero-copy syscalls
	to ensure better testing of future or other implementations.
	https://github.com/coreutils/coreutils/pull/227

2026-03-24  Collin Funk  <collin.funk1@gmail.com>

	maint: remove some unnecessary casts
	* src/sort.c (begfield, limfield): Remove size_t casts.

2026-03-23  Sylvestre Ledru  <sylvestre@debian.org>

	tests: cut: add test for -z with NUL delimiter and -s flag
	* tests/cut/cut.pl (zerot-7): New test.
	Identified https://github.com/uutils/coreutils/pull/11394
	https://github.com/coreutils/coreutils/pull/226

	tests: tr: add test for invalid character class name
	* tests/tr/tr.pl (invalid-class): New test.
	Identified : https://github.com/uutils/coreutils/pull/11398
	https://github.com/coreutils/coreutils/pull/225

2026-03-23  Chris Down  <chris@chrisdown.name>

	sort: speed up keyed field sorting significantly using memchr
	When sort is invoked with an explicit field separator with `-t SEP`,
	begfield() and limfield() scan for the separator to locate boundaries.
	Right now the implementation there uses a loop that iterates over bytes
	one by one, which is not ideal since we must scan past many bytes of
	non-separator data one byte at a time.

	Let's replace each of these loops with memchr(). On glibc systems,
	memchr() uses SIMD to scan 16 bytes per step (NEON on aarch64) or 32
	bytes per step (AVX2 on x86_64), rather than 1 byte at a time, so any
	field longer than a handful of bytes stands to benefit quite
	significantly.

	Using the following input data:

	  awk 'BEGIN {
	      srand(42)
	      for (i = 1; i <= 500000; i++)
	          printf "%*d,%*d,%d\n", 4+int(rand()*9), 0,
	                                 4+int(rand()*9), 0, int(rand()*10000)
	  }' > short_csv_500k

	  awk 'BEGIN {
	      for (i = 1; i <= 500000; i++)
	          printf "%100d,%100d,%d\n", 0, 0, int(rand()*10000)
	  }' > wide_csv_500k

	One can benchmark with:

	  hyperfine --warmup 10 --runs 50 \
	    "LC_ALL=C sort_before -t, -k3,3n short_csv_500k > /dev/null" \
	    "LC_ALL=C sort_after -t, -k3,3n short_csv_500k > /dev/null"

	  hyperfine --warmup 10 --runs 50 \
	    "LC_ALL=C sort_before -t, -k3,3n wide_csv_500k > /dev/null" \
	    "LC_ALL=C sort_after -t, -k3,3n wide_csv_500k > /dev/null"

	  hyperfine --warmup 10 --runs 50 \
	    "LC_ALL=C sort_before wide_csv_500k > /dev/null" \
	    "LC_ALL=C sort_after wide_csv_500k > /dev/null"

	The results on i9-14900HX x86_64 with -O2:

	  sort -t, -k3,3n (500K lines, 4-12 byte short fields):
	    Before: 123.1 ms    After: 108.1 ms    (-12.2%)

	  sort -t, -k3,3n (500K lines, 100 byte wide fields):
	    Before: 243.5 ms    After: 165.9 ms    (-31.9%)

	  sort (default, no -k, 500K lines):
	    Before: 141.6 ms    After: 141.8 ms    (unchanged)

	And on M1 Pro aarch64 with -O2:

	  sort -t, -k3,3n (500K lines, 4-12 byte short fields):
	    Before: 98.0 ms     After: 92.3 ms     (-5.8%)

	  sort -t, -k3,3n (500K lines, 100 byte wide fields):
	    Before: 240.8 ms    After: 183.0 ms    (-24.0%)

	  sort (default, no -k, 500K lines):
	    Before: 145.6 ms    After: 145.6 ms    (unchanged)

	Looking at profiling, the improvement is larger on x86_64 in these runs
	because glibc's memchr uses AVX2 to scan 32 bytes per step versus 16
	bytes per step with NEON on aarch64.

2026-03-22  Collin Funk  <collin.funk1@gmail.com>

	maint: fix an incomplete sentence
	* tests/pwd/argument.sh: Fix the test description.
	Reported by G. Branden Robinson.

	tests: pwd: test the behavior when given an argument
	* tests/pwd/argument.sh: New file.
	* tests/local.mk (all_tests): Add the new test.

2026-03-21  Collin Funk  <collin.funk1@gmail.com>

	tac: avoid unnecessary standard output buffering
	This has removes a tiny amount of overhead:

	    $ seq 10000000 > input
	    $ perf stat -e cpu-clock --repeat 1000 taskset 1 ./src/tac \
	        input 2>&1 > /dev/null | grep -F 'seconds time'
	              0.095707 +- 0.000223 seconds time elapsed  ( +-  0.23% )
	    $ perf stat -e cpu-clock --repeat 1000 taskset 1 ./src/tac-prev \
	        input 2>&1 > /dev/null | grep -F 'seconds time'
	             0.1009378 +- 0.0000995 seconds time elapsed  ( +-  0.10% )

	* src/tac.c (output): Use full_write instead of fread since we already
	buffer the output ourselves.

2026-03-21  Collin Funk  <collin.funk1@gmail.com>

	tests: rm: fix a test that would sometimes hang
	* tests/rm/dash-hint.sh: Add the file name argument to grep, as I
	intended when adding this test.

2026-03-21  Collin Funk  <collin.funk1@gmail.com>

	tac: promptly diagnose write errors
	This patch also fixes a bug where 'tac' would print a vague error on
	some inputs:

	    $ seq 10000 | ./src/tac-prev > /dev/full
	    tac-prev: write error
	    $ seq 10000 | ./src/tac > /dev/full
	    tac: write error: No space left on device

	In this case ferror (stdout) is true, but errno has been set back to
	zero by a successful fclose (stdout) call.

	* src/tac.c (output): Call write_error() if fwrite fails.
	* tests/misc/io-errors.sh: Check that 'tac' prints a detailed write
	error.
	* NEWS: Mention the improvement.

2026-03-21  Pádraig Brady  <P@draigBrady.com>

	tests: support checking for specific write errors
	* tests/misc/io-errors.sh: Support checkout for a specific error
	in commands that don't run indefinitely.  Currently all the explicitly
	listed commands output a specific error and do not need to be tagged.

2026-03-21  Collin Funk  <collin.funk1@gmail.com>

	tests: nl: check that all files are processed
	* tests/nl/multiple-files.sh: New file.
	* tests/local.mk (all_tests): Add the new test.

2026-03-20  Collin Funk  <collin.funk1@gmail.com>

	test: truncate: improve the test added in the previous commit
	* tests/truncate/multiple-files.sh: Check that nothing is printed to
	standard output and that standard error has the correct error.

	tests: truncate: check that all files are processed
	* tests/truncate/multiple-files.sh: New file.
	* tests/local.mk (all_tests): Add the new test.

2026-03-18  Collin Funk  <collin.funk1@gmail.com>

	sort,split,yes: ensure pipe and pipe2 don't open standard descriptors
	* bootstrap.conf (gnulib_modules): Add pipe2-safer.
	* cfg.mk (sc_require_unistd_safer): New rule for 'make syntax-check'.
	* gl/lib/fd-reopen.c: Include unistd--.h instead of unistd.h.
	* src/sort.c: Include unistd--.h.
	* src/split.c: Likewise.
	* src/yes.c: Likewise.

2026-03-16  Pádraig Brady  <P@draigBrady.com>

	tests: dd: fix false failure on NetBSD 10
	* tests/dd/partial-write.sh: Skip the test if
	nothing written at all, as was seen on NetBSD 10.
	Reported by Bruno Haible.

	tests: ls: fix false failure on FreeBSD
	* tests/ls/non-utf8-hidden.sh: Avoid sorting in ls, to avoid:
	ls: cannot compare file names ...: Illegal byte sequence
	seen on FreeBSD 14.
	Reported by Bruno Haible.

2026-03-16  Collin Funk  <collin.funk1@gmail.com>

	maint: tee: remove an affirm call to silence coverity
	* src/iopoll.c (write_wait): Don't check that an unsigned integer is
	always great than or equal to zero since that is always true.

	wc: make sure input buffer for neon 'wc -l' is aligned
	* src/wc_neon.c (wc_lines_neon): Use alignas.

2026-03-15  Collin Funk  <collin.funk1@gmail.com>

	tee: prefer file descriptors over streams
	We disable buffering on the streams anyways, so we were effectively
	calling the write system call previously despite using streams.

	* src/iopoll.h (fclose_wait, fwrite_wait): Remove declarations.
	(close_wait, write_wait): Add declarations.
	* src/iopoll.c (fwait_for_nonblocking_write, fclose_wait, fwrite_wait):
	Remove functions.
	(wait_for_nonblocking_write): New function based on
	fwait_for_nonblocking_write.
	(close_wait): New function based on fclose_wait.
	(write_wait): New function based on fwrite_wait.
	* src/tee.c: Include fcntl--.h. Don't include stdio--.h.
	(get_next_out): Operate on file descriptors instead of streams.
	(fail_output): Likewise. Remove clearerr call since we no longer call
	fwrite on stdout.
	(tee_files): Operate on file descriptors instead of streams. Remove
	calls to setvbuf.

2026-03-14  Collin Funk  <collin.funk1@gmail.com>

	timeout: don't exit immediately if the parent is the init process
	* src/timeout.c (main): Save the process ID before creating a child
	process. Check if the result of getppid is different than the saved
	process ID instead of checking if it is 1.
	* tests/timeout/init-parent.sh: New file.
	* tests/local.mk (all_tests): Add the new test.
	* NEWS: Mention the bug fix. Also mention that this change allows
	'timeout' to work when reparented by a subreaper process instead of
	init.

2026-03-13  Pádraig Brady  <P@draigBrady.com>

	doc: fix missing '=' in texi option descriptions
	* doc/coreutils.texi (cut invocation, fold invocation):
	Fix missing '=' before option parameters.

2026-03-12  Pádraig Brady  <P@draigBrady.com>

	dd: always diagnose partial writes on write failure
	* src/dd.c (dd_copy): Increment the partial write count upon failure.
	* tests/dd/partial-write.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/80583

	doc: clarify a recent NEWS item
	* NEWS: It was ambiguous as to whether we quoted a range of
	observered throughputs.  Clarify this was the old and new
	throughput on a single test system.

2026-03-11  Collin Funk  <collin.funk1@gmail.com>

	doc: NEWS: adjust 'wc -l' aarch64 benchmark after recent commit
	After commit e0190a9d1 (wc: improve aarch64 Neon optimization for
	'wc -l', 2026-03-09), on a Ampere eMAG machine:

	    $ yes | head -n 10000000000 > input
	    $ (time ./src/wc -l input)
	    10000000000 input

	    real	0m3.447s
	    user	0m1.533s
	    sys	0m1.913s
	    $ (export GLIBC_TUNABLES='glibc.cpu.hwcaps=-ASIMD,-AVX2,-AVX512F'; \
	       time ./src/wc -l input)
	    10000000000 input

	    real	0m15.758s
	    user	0m14.039s
	    sys	0m1.720s

	* NEWS: Mention the improved benchmark.

2026-03-11  Collin Funk  <collin.funk1@gmail.com>

	tests: rm: check for hints when running 'rm -foo'
	* tests/rm/dash-hint.sh: New file.
	* tests/local.mk (all_tests): Add the new test.

2026-03-10  Pádraig Brady  <P@draigBrady.com>

	maint: adjust to placate coverity
	* src/system.h (c32issep): Adjust to more standard layout.

2026-03-10  Pádraig Brady  <P@draigBrady.com>

	yes: use a zero-copy implementation via (vm)splice
	A good reference for the concepts used here is:
	https://mazzo.li/posts/fast-pipes.html
	We don't consider huge pages or busy loops here,
	but use vmsplice(), and splice() to get significant speedups:

	  i7-5600U-laptop $ taskset 1 yes | taskset 2 pv > /dev/null
	  ... [4.98GiB/s]
	  i7-5600U-laptop $ taskset 1 src/yes | taskset 2 pv > /dev/null
	  ... [34.1GiB/s]

	  IBM,9043-MRX $ taskset 1 yes | taskset 2 pv > /dev/null
	  ... [11.6GiB/s]
	  IBM,9043-MRX $ taskset 1 src/yes | taskset 2 pv > /dev/null
	  ... [175GiB/s]

	Also throughput to file (on BTRFS) was seen to increase significantly.
	With a Fedora 43 laptop improving from 690MiB/s to 1.1GiB/s.

	* bootstrap.conf: Ensure sys/uio.h is present.
	This was an existing transitive dependency.
	* m4/jm-macros.m4: Define HAVE_SPLICE appropriately.
	We assume vmsplice() is available if splice() is as they
	were introduced at the same time to Linux and glibc.
	* src/yes.c (repeat_pattern): A new function to efficiently
	duplicate a pattern in a buffer with memcpy calls that double in size.
	This also makes the setup for the existing write() path more efficient.
	(pipe_splice_size): A new function to increase the kernel pipe buffer
	if possible, and use an appropriately sized buffer based on that (25%).
	(splice_write): A new function to call vmplice() when outputting
	to a pipe, and also splice() if outputting to a non-pipe.
	* tests/misc/yes.sh: Verify the non-pipe output case,
	(main): Adjust to always calling write on the minimal buffer first,
	then trying vmsplice(), then falling back to write from bigger buffer.
	and the vmsplice() fallback to write() case.
	* NEWS: Mention the improvement.

2026-03-10  Pádraig Brady  <P@draigBrady.com>

	all: use more consistent blank character determination
	* src/system.h (c32issep): A new function that is essentially
	iswblank() on GLIBC platforms, and iswspace() with exceptions elsewhere.
	* src/expand.c: Use it instead of c32isblank().
	* src/fold.c: Likewise.
	* src/join.c: Likewise.
	* src/numfmt.c: Likewise.
	* src/unexpand.c: Likewise.
	* src/uniq.c: Likewise.
	* NEWS: Mention the improvement.

2026-03-10  Pádraig Brady  <P@draigBrady.com>

	cksum: fix tagged output on 32 bit platforms
	Fix an unreleased issue due to the recent change
	to using idx_t in commit v9.10-91-g02983e493

	* src/cksum.c (output_file): Cast the idx_t before passing to printf.

2026-03-10  Collin Funk  <collin.funk1@gmail.com>

	wc: improve aarch64 Neon optimization for 'wc -l'
	    $ yes abcdefghijklmnopqrstuvwxyz | head -n 200000000 > input
	    $ time ./src/wc-prev -l input
	    200000000 input

	    real	0m1.240s
	    user	0m0.456s
	    sys	0m0.784s
	    $ time ./src/wc -l input
	    200000000 input

	    real	0m0.936s
	    user	0m0.141s
	    sys	0m0.795s

	* configure.ac: Use unsigned char for the buffer to avoid potential
	compiler warnings. Check for the functions being used in src/wc_neon.c
	after this patch.
	* src/wc_neon.c (wc_lines_neon): Use vreinterpretq_s8_u8 to convert 0xff
	into -1 instead of bitwise AND instructions into convert it into 1.
	Perform the pairwise addition and lane extraction once every 8192 bytes
	instead of once every 64 bytes.
	Thanks to Lasse Collin for spotting this and reviewing a draft of this
	patch.

2026-03-09  Pádraig Brady  <P@draigBrady.com>

	tests: expand: fix false failure on various systems
	* tests/expand/mb.sh: Use $LOCALE_FR_UTF8 rather than
	hardcoding "en_US.UTF-8".
	* tests/unexpand/mb.sh: Likewise.
	Reported by Bruno Haible.

	build: update to latest gnulib
	* src/ls.c: Adjust for renamed acl permissions member.

2026-03-08  Collin Funk  <collin.funk1@gmail.com>

	maint: remove duplicate names from THANKS
	* .mailmap: Prefer the most recently used email address from each commit
	author.

2026-03-08  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer memset_explicit to explicit_bzero
	The explicit_bzero function is a common extension, but memset_explicit
	was standardized in C23. It will likely become more portable in the
	future, and Gnulib provides an implementation if needed.

	* bootstrap.conf (gnulib_modules): Add memset_explicit. Remove
	explicit_bzero.
	* gl/lib/randint.c (randint_free): Use memset_explicit instead of
	explicit_bzero.
	* gl/lib/randread.c (randread_free_body): Likewise.

2026-03-07  Lukáš Zaoral  <lzaoral@redhat.com>

	expand,unexpand: support multi-byte input
	* src/expand.c: Use mbbuf to support multi-byte input.
	* src/unexpand.c: Likewise.
	* tests/expand/mb.sh: New multi-byte test.
	* tests/unexpand/mb.sh: Likewise.
	* tests/local.mk: Reference new tests.
	* NEWS: Mention the improvement.

2026-03-07  Weixie Cui  <cuiweixie@gmail.com>

	maint: shred: fix typo in comment
	* src/shred.c: Fix "then" -> "than" in comment.

2026-03-06  Weixie Cui  <cuiweixie@gmail.com>

	maint: dd: fix typo in comment
	* src/dd.c: Fix "that that" -> "that the" in comment.

2026-03-06  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest

	build: update gnulib submodule to latest

2026-03-05  Collin Funk  <collin.funk1@gmail.com>

	maint: touch: reduce variable scope
	* src/touch.c (main): Declare variables where they are used instead of
	at the start of the function.

	maint: chown,chgrp: reduce variable scope
	* src/chown-core.c (describe_change, restricted_chown)
	(change_file_owner, chown_files): Declare variables where they are used
	instead of at the start of the function.
	* src/chown.c (main): Likewise.

	install: allow the combination of --compare and --preserve-timestamps
	* NEWS: Mention the improvement.
	* src/install.c (enum copy_status): New type to let the caller know if
	the copy was performed or skipped.
	(copy_file): Return the new type instead of bool. Reduce variable scope.
	(install_file_in_file): Only strip the file if the copy was
	performed. Update the timestamps if the copy was skipped.
	(main): Don't error when --compare and --preserve-timestamps are
	combined.
	* tests/install/install-C.sh: Add some test cases.

2026-03-04  Pádraig Brady  <P@draigBrady.com>

	cksum: use more defensive escaping for --check
	cksum --check is often the first interaction
	users have with possibly untrusted downloads, so we should try
	to be as defensive as possible when processing it.

	Specifically we currently only escape \n characters in file names
	presented in checksum files being parsed with cksum --check.
	This gives some possibilty of dumping arbitrary data to the terminal
	when checking downloads from an untrusted source.
	This change gives these advantages:

	  1. Avoids dumping arbitrary data to vulnerable terminals
	  2. Avoids visual deception with ansi codes hiding checksum failures
	  3. More secure if users copy and paste file names from --check output
	  4. Simplifies programmatic parsing

	Note this changes programmatic parsing, but given the original
	format was so awkward to parse, I expect that's extremely rare.
	I was not able to find example in the wild at least.
	To parse the new format from from shell, you can do something like:

	  cksum -c checksums | while IFS= read -r line; do
	    case $line in
	      *': FAILED')
	        filename=$(eval "printf '%s' ${line%: FAILED}")
	        cp -v "$filename" /quarantine
	        ;;
	    esac
	  done

	This change also slightly reduces the size of the sum(1) utility.
	This change also apples to md5sum, sha*sum, and b2sum.

	* src/cksum.c (digest_check): Call quotef() instead of
	cksum(1) specific quoting.
	* tests/cksum/md5sum-bsd.sh: Adjust accordingly.
	* doc/coreutils.texi (cksum general options): Describe the
	shell quoting used for problematic file names.
	* NEWS: Mention the change in behavior.
	Reported by: Aaron Rainbolt

2026-03-04  Pádraig Brady  <P@draigBrady.com>

	maint: tests: refactor uses of bad_unicode()
	* init.cfg: Use 0xFF rather than 0xC3 everywhere.
	* tests/fold/fold-characters.sh: Reuse bad_unicode().
	* tests/tac/tac-locale.sh: Likewise.

2026-03-04  Pádraig Brady  <P@draigBrady.com>

	fold: fix output truncation with 0xFF bytes in input
	On signed char platforms, 0xFF was converted to -1
	which matches MBBUF_EOF, causing fold to stop processing.

	* NEWS: Mention the bug fix.
	* gl/lib/mbbuf.h: Avoid sign extension on signed char platforms.
	* tests/fold/fold-characters.sh: Adjust test case.
	Reported at https://src.fedoraproject.org/rpms/coreutils/pull-request/20

2026-03-04  Sylvestre Ledru  <sylvestre@debian.org>

	tests: date: add timezone conversion test
	*tests/date/date.pl: Add the test case.
	Add test case for https://github.com/uutils/coreutils/issues/10800
	to verify `date -u -d '10:30 UTC-05'` converts to 15:30 UTC.

	tests: date: add edge cases for modifiers
	* tests/date/date.pl: Add the test case.
	Add test cases for https://github.com/uutils/coreutils/issues/10957

	tests: cut: add test case for newline delimiter with -s flag
	* tests/cut/cut.pl: Add a new test case.
	https://github.com/coreutils/coreutils/pull/211

2026-03-03  oech3  <79379754+oech3@users.noreply.github.com>

	tests: mktemp: ensure mktemp does not depend on getrandom and ASLR
	* tests/mktemp/mktemp-misc.sh: Add new test.
	* tests/local.mk: Reference new test.
	https://github.com/coreutils/coreutils/pull/206

2026-03-03  Pádraig Brady  <P@draigBrady.com>

	maint: tests: decouple debug output determination
	* tests/misc/warning-errors.sh: Simply check there is output
	to stderr before checking that output induces an error.

2026-03-03  Collin Funk  <collin.funk1@gmail.com>

	tests: avoid false test failure when using address sanitizer
	* tests/misc/warning-errors.sh: Skip commands which have been built with
	sanitizers, since standard error will not be closed and checked for
	errors.
	Reported by Bruno Haible.

	tests: avoid failure on systems without an optimized 'cksum' or 'wc -l'
	* tests/misc/warning-errors.sh: Expect 'wc' and 'cksum' to exit
	successfully if there is not an optimized 'wc -l' implementation or
	CRC32 implementation.
	Reported by Bruno Haible.

2026-03-02  oech3  <79379754+oech3@users.noreply.github.com>

	tests: shuf: ensure memory exhaustion is handled gracefully
	* tests/shuf/shuf.sh: Ensure we exit 1 upon failure
	to allocate memory.
	https://github.com/uutils/coreutils/issues/11170
	https://github.com/coreutils/coreutils/pull/209

2026-03-02  Sylvestre Ledru  <sylvestre@debian.org>

	test: cp: add test for non-UTF8 directory names
	Missing test identified here:
	 https://github.com/uutils/coreutils/pull/11148

	* tests/cp/non-utf8-name.sh: Add a new test to cover this case.
	https://github.com/coreutils/coreutils/pull/207

2026-03-01  Paul Eggert  <eggert@cs.ucla.edu>

	du: fflush after outputting a line
	* src/du.c (print_size): Resurrect the fflush call, since there
	can be significant delay between output lines.

2026-03-01  Collin Funk  <collin.funk1@gmail.com>

	tests: wc,du: add additional --files0-from test cases
	* tests/wc/wc-files0-from.pl ($limits): New variable.
	(@Tests): Prefer the error strings from getlimits over writing them by
	hand. Add test cases for --files0-from listing missing files and
	duplicate files.
	* tests/du/files0-from.pl ($limits): New variable.
	(@Tests): Prefer the error strings from getlimits over writing them by
	hand. Add test cases for --files0-from listing missing files. Add tests
	for --files0-from listing duplicate files with and without the -l option
	also in use.

2026-02-28  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest
	* po/POTFILES.in: Remove recently added lib/cygpath.c dependency after
	gnulib commit 2a893de047 (filesystem-remote: New module., 2026-02-28).

2026-02-28  Sylvestre Ledru  <sylvestre@debian.org>

	tests: ls: treat invalid UTF-8 paths starting with a dot as hidden
	* tests/ls/non-utf8-hidden.sh: Add the test case.
	https://github.com/uutils/coreutils/pull/11135
	https://github.com/coreutils/coreutils/pull/202

2026-02-28  Sylvestre Ledru  <sylvestre@debian.org>

	tests: ln: verify that -f and -i override each other
	Identified here:
	<https://github.com/uutils/coreutils/pull/11129>

	* tests/ln/misc.sh: Add the check.
	 https://github.com/coreutils/coreutils/pull/199

2026-02-28  Sylvestre Ledru  <sylvestre@debian.org>

	test: ln: verify backup suffix path traversal prevention
	missing test detected thanks to:
	https://github.com/uutils/coreutils/pull/11149

	* tests/ln/backup-suffix-traversal.sh: Add a test.
	https://github.com/coreutils/coreutils/pull/208

2026-02-28  Pádraig Brady  <P@draigBrady.com>

	maint: fix typo in previous test
	* tests/shuf/shuf.sh: Use non varying $ret rather than $?

2026-02-28  oech3  <79379754+oech3@users.noreply.github.com>

	tests: shuf: ensure we handle unsupported getrandom syscall gracefully
	* tests/shuf/shuf.sh: Check we fail normally or succeed where
	the getrandom syscall is not available.
	https://github.com/coreutils/coreutils/pull/205

2026-02-28  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib to latest
	* NEWS: Mention the more encompassing remoteness check for df.
	* po/POTFILES.in: Add new lib/cygpath.c dependency.

2026-02-28  Collin Funk  <collin.funk1@gmail.com>

	du: avoid locking and flushing standard output
	This results in a noticeable increase in performance:

	    $ yes /dev/null | head -n 10000000 | tr '\n' '\0' \
	        | time --format=%E ./src/du-prev -l --files0-from=- > /dev/null
	    0:20.40
	    $ yes /dev/null | head -n 10000000 | tr '\n' '\0' \
	        | time --format=%E ./src/du -l --files0-from=- > /dev/null
	    0:16.57

	* src/du.c (print_size): Prefer putchar and fputs which may be unlocked
	unlike printf. Prefer ferror to fflush.

2026-02-28  Paul Eggert  <eggert@cs.ucla.edu>

	stat: handle %%%N too
	* src/stat.c (main): Fix incorrect counting of '%'s before 'N'.
	* tests/stat/stat-fmt.sh: Test for the bug.

	id: avoid unnecessary buffer flushing
	* src/groups.c (main):
	* src/id.c (main, print_stuff):
	Don’t flush stdout before testing for write error.
	Do the test only when in a loop, as a one-shot will
	test for write error soon anyway.

	cksum: prefer signed int
	* src/cksum.c (min_digest_line_length, digest_hex_bytes)
	(digest_length, md5_sum_stream, sha1_sum_stream)
	(sha224_sum_stream, sha256_sum_stream, sha384_sum_stream)
	(sha512_sum_stream, sha2_sum_stream, sha3_sum_stream)
	(blake2b_sum_stream, sm3_sum_stream, problematic_chars)
	(filename_unescape, valid_digits, bsd_split_3)
	(algorithm_from_tag, split_3, digest_file, output_file)
	(b64_equal, hex_equal, digest_check, main):
	* src/cksum_avx2.c (cksum_avx2):
	* src/cksum_avx512.c (cksum_avx512):
	* src/cksum_crc.c (cksum_fp_t, cksum_slice8, crc_sum_stream)
	(crc32b_sum_stream, output_crc):
	* src/cksum_pclmul.c (cksum_pclmul):
	* src/cksum_vmull.c (cksum_vmull):
	* src/sum.c (bsd_sum_stream, sysv_sum_stream, output_bsd, output_sysv):
	Prefer signed to unsigned int where either will do.
	This allows better checking with -fsanitize=undefined.
	It should also help simplify future patches, so that they
	needn’t worry whether comparisons like ‘i < len - 2’ will misbehave.

2026-02-27  Collin Funk  <collin.funk1@gmail.com>

	stat: don't check QUOTING_STYLE when --printf %%N is used
	* NEWS: Mention the fix.
	* src/stat.c (main): Only check QUOTING_STYLE if there is a %N that is
	not preceded by a percentage sign.
	* tests/stat/stat-fmt.sh: Add some test cases.

	id: promptly diagnose write errors
	* NEWS: Mention the improvement.
	* src/id.c (print_stuff): Call fflush for each listed user to check for
	write errors.
	* tests/misc/io-errors.sh: Add an invocation of 'id'.

	groups: promptly diagnose write errors
	* NEWS: Mention the improvement.
	* src/groups.c (main): Call fflush for each listed user to check for
	write errors.
	* tests/misc/io-errors.sh: Add an invocation of 'groups'.

2026-02-26  Pádraig Brady  <P@draigBrady.com>

	tests: ensure failure to write warnings is handled gracefully
	* tests/misc/warning-errors.sh: Add a new test to ensure
	failure to write warnings is diagnosed in the exit status.
	* tests/local.mk: Reference the new test.

2026-02-26  oech3  <79379754+oech3@users.noreply.github.com>

	tests: shuf: ensure randomization doesn't depend solely on ASLR
	* tests/shuf/shuf.sh: Use setarch --addr-no-randomize to disable
	ASLR, and show the output is still random.
	https://github.com/coreutils/coreutils/pull/198

2026-02-26  Pádraig Brady  <P@draigBrady.com>

	maint: fix description of tests/misc/io-errors.sh
	* tests/misc/io-errors.sh: Promptness is checked in
	write-errors.sh, not this test.

2026-02-25  oech3  <79379754+oech3@users.noreply.github.com>

	tests: nice: ensure a particular adjustment is disallowed
	* tests/nice/nice-fail.sh: Ensure "1+2-3" is disallowed.
	https://github.com/coreutils/coreutils/pull/197

2026-02-25  Pádraig Brady  <P@draigBrady.com>

	tests: factor,numfmt: verify embedded NUL handling
	* tests/factor/factor.pl: Verify that embedded NULs
	on stdin terminate the _number_.
	* tests/numfmt/numfmt.p: Verify that embedded NULs
	on stdin terminate the _line_.
	https://github.com/coreutils/coreutils/pull/196

2026-02-24  Pádraig Brady  <P@draigBrady.com>

	tests: fix "Hangup" termination of non-interactive runs
	This avoids the test harness being terminated like:
	  make[1]: *** [Makefile:24419: check-recursive] Hangup
	  make[3]: *** [Makefile:24668: check-TESTS] Hangup
	  make: *** [Makefile:24922: check] Hangup
	  make[2]: *** [Makefile:24920: check-am] Hangup
	  make[4]: *** [Makefile:24685: tests/misc/usage_vs_refs.log] Error 129
	  ...

	This happened sometimes when the tests were being run non interactively.
	For example when run like:

	  setsid make TESTS="tests/timeout/timeout.sh \
	   tests/tail/overlay-headers.sh" SUBDIRS=. -j2 check

	Note the race window can be made bigger by adding a sleep
	after tail is stopped in overlay-headers.sh

	The race can trigger the kernel to induce its job control
	mechanism to prevent stuck processes.
	I.e. where it sends SIGHUP + SIGCONT to a process group
	when it determines that group may become orphaned,
	and there are stopped processes in that group.

	* tests/tail/overlay-headers.sh: Use setsid(1) to keep the stopped
	tail process in a separate process group, thus avoiding any kernel
	job control protection mechanism.
	* tests/timeout/timeout.sh: Use setsid(1) to avoid the kernel
	checking the main process group when sleep(1) is reparented.
	Fixes https://bugs.gnu.org/80477

2026-02-23  Collin Funk  <collin.funk1@gmail.com>

	doc: tee: avoid the use of gpg cleartext signatures in an example
	Cleartext signatures have many gotchas. Therefore, the use of detached
	signatures is recommended where possible. See:
	<https://gnupg.org/blog/20251226-cleartext-signatures.html>.

	* doc/coreutils.texi (tee invocation): Adjust gpg invocation to produce
	a detached signature.

2026-02-23  oech3  <79379754+oech3@users.noreply.github.com>

	tests: whoami, logname: verify error handling
	* tests/df/no-mtab-status-masked-proc.sh: Tweak unshare check.
	* tests/local.mk: Reference new test.
	* tests/misc/user.sh: Add new test using unshare -U, to verify
	that whoami and logname diagnose failure correctly.
	https://github.com/coreutils/coreutils/pull/195

2026-02-22  Collin Funk  <collin.funk1@gmail.com>

	doc: stty: mention the -g does not save the terminal window size
	* doc/coreutils.texi (stty invocation): Mention that 'stty -g' does not
	save the terminal window size as allowed by POSIX.1-2024.

	tests: shuf: check that write errors are promptly diagnosed
	* tests/misc/write-errors.sh: Add a shuf invocation that would run
	forever if write errors weren't diagnosed.

2026-02-22  Collin Funk  <collin.funk1@gmail.com>

	shuf: avoid locking standard output when using --input-range
	Here is the throughput before this patch:

	    # write_permuted_numbers
	    $ ./src/shuf-prev -i 0-100000000 | pv -r > /dev/null
	    [ 153MiB/s]

	    # write_random_numbers
	    $ timeout 10 ./src/shuf-prev -i 0-100000 -r | pv -r > /dev/null
	    [78.6MiB/s]

	Here is the throughput after this patch:

	    # write_permuted_numbers
	    $ timeout 10 ./src/shuf -i 0-100000000 | pv -r > /dev/null
	    [ 308MiB/s]

	    # write_random_numbers
	    $ timeout 10 ./src/shuf -i 0-100000 -r | pv -r > /dev/null
	    [ 196MiB/s]

	* NEWS: Mention the performance improvement.
	* src/shuf.c (write_permuted_numbers, write_random_numbers): Prefer
	fputs and fputc which may be unlocked over printf which locks standard
	output.

2026-02-21  Collin Funk  <collin.funk1@gmail.com>

	tests: chmod: test that chmod(2) is always called
	* tests/chmod/only-op.sh: New file.
	* tests/local.mk (all_test): Add the new test.

2026-02-20  Collin Funk  <collin.funk1@gmail.com>

	maint: printf: prefer static initialization
	* src/printf.c (main): Remove unnecessary initialization.

	maint: fmt: prefer static initialization
	* src/fmt.c (prefix, max_width): Initialize variables.
	(main): Remove unnecessary initializations.

	maint: sort: prefer static initialization
	* src/sort.c (main): Remove unnecessary initialization.

	maint: df: prefer static initialization
	* src/df.c (human_output_opts, grand_fsu): Initialize variables.
	(main): Remove unnecessary initializations.

	maint: split: prefer static initialization
	* src/split.c (outbase, infile): Initialize variables.
	(main): Remove unnecessary initializations.

	maint: tail: prefer static initialization
	* src/tail.c (count_lines, line_end): Initialize variables.
	(main): Remove unnecessary initializations.

	maint: csplit: prefer static initialization
	* src/csplit.c (prefix, remove_files): Initialize variables.
	(main): Remove unnecessary initializations.

	maint: comm: prefer static initialization
	* src/comm.c (only_file_1, only_file_2, both): Initialize variables.
	(main): Remove unnecessary initializations.

	maint: wc: prefer static initialization
	* src/wc.c (main): Remove unnecessary initializations.

	maint: tac: prefer static initialization
	* src/tac.c (separator, separator_ends_record, sentinel_length):
	Initialize variables.
	(main): Remove unnecessary initializations.

	maint: join: prefer static initialization
	* src/join.c (print_pairables): Initialize variable.
	(main): Remove unnecessary initializations.

	maint: cut: prefer static initialization
	* src/cut.c (main): Remove unnecessary initializations.

	maint: seq: prefer static initialization
	* src/seq.c (separator): Initialize variable.
	(main): Remove unnecessary initializations.

	maint: paste: prefer static initialization
	* src/paste.c (main): Remove unnecessary initializations.

	maint: install: prefer static initialization
	* src/install.c (main): Remove unnecessary initializations.

	maint: chmod: prefer static initialization
	* src/chmod.c (main): Remove unnecessary initializations.

	maint: head: prefer static initialization
	* src/head.c (line_end): Initialize variable.
	(main): Remove unnecessary initializations.

	maint: ln: prefer static initialization
	* src/ln.c (main): Remove unnecessary initializations.

	maint: nl: prefer static initialization
	* src/nl.c (main): Remove unnecessary initialization.

	maint: touch: prefer static initialization
	* src/touch.c (main): Remove unnecessary initializations.

	maint: fold: prefer static initialization
	* src/fold.c (main): Remove unnecessary initializations.

	maint: tee: prefer static initialization
	* src/tee.c (main): Remove unnecessary initializations.

	maint: rmdir: prefer static initialization
	* src/rmdir.c (main): Remove unnecessary initialization.

	maint: tty: prefer static initialization
	* src/tty.c (main): Remove unnecessary initialization.

2026-02-19  Pádraig Brady  <P@draigBrady.com>

	maint: tests: DRY a recent change
	* tests/pwd/pwd-long.sh: Adjust so complicated command is not repeated.

2026-02-19  Collin Funk  <collin.funk1@gmail.com>

	wc: add aarch64 Neon optimization for wc -l
	Here is an example of the performance improvement:

	    $ yes abcdefghijklmnopqrstuvwxyz | head -n 100000000 > input
	    $ time ./src/wc-prev -l < input
	    100000000

	    real	0m0.793s
	    user	0m0.630s
	    sys	0m0.162s
	    $ time ./src/wc -l < input
	    100000000

	    real	0m0.230s
	    user	0m0.065s
	    sys	0m0.164s

	* NEWS: Mention the performance improvement.
	* gnulib: Update to the latest commit.
	* configure.ac: Check the the necessary intrinsics and functions.
	* src/local.mk (noinst_LIBRARIES) [USE_NEON_WC_LINECOUNT]: Add
	src/libwc_neon.a.
	(src_libwc_neon_a_SOURCES, wc_neon_ldadd, src_libwc_neon_a_CFLAGS)
	[USE_NEON_WC_LINECOUNT]: New variables.
	(src_wc_LDADD) [USE_NEON_WC_LINECOUNT]: Add $(wc_neon_ldadd).
	* src/wc.c [USE_NEON_WC_LINECOUNT]: Include sys/auxv.h and asm/hwcap.h.
	(neon_supported) [USE_NEON_WC_LINECOUNT]: New function.
	(wc_lines) [USE_NEON_WC_LINECOUNT]: Use neon_supported and
	wc_lines_neon.
	* src/wc.h (wc_lines_neon): Add declaration.
	* src/wc_neon.c: New file.
	* doc/coreutils.texi (Hardware Acceleration): Document the "-ASIMD"
	hwcap and the variable used in ./configure to override detection of Neon
	instructions.
	* tests/wc/wc-cpu.sh: Also add "-ASIMD" to disable the use of Neon
	instructions.

2026-02-18  Pádraig Brady  <P@draigBrady.com>

	tests: use system ENOTEMPTY message
	* tests/mv/dir2dir.sh: Map system specific messages.
	* tests/rm/d-2.sh: Likewise.

	maint: tests: avoid ERANGE specific handling
	* tests/fmt/base.pl: Verify ERANGE is diagnosed.
	* tests/od/od.pl: Adjust determination of ERANGE.

	maint: tests: avoid ELOOP specific handling
	* tests/du/long-sloop.sh: Adjust determination of ELOOP.

	maint: tests: avoid ENOSPC specific handling
	* tests/csplit/csplit-io-err.sh: Adjust determination of ENOSPC.
	* tests/csplit/split-io-err.sh: Likewise.
	* tests/fold/fold-zero-width.sh: Verify full ENOSPC message.
	* tests/tac/tac-continue.sh: Likewise.
	* tests/misc/io-errors.sh: Likewise.
	* tests/misc/write-errors.sh: Likewise.

	tests: use system ENOSPC message
	* tests/head/head-write-error.sh: Verify ENOSPC is output.
	* tests/misc/yes.sh: Likewise.

	tests: use system ENOTSUP message
	* tests/cp/cp-mv-enotsup-xattr.sh: Don't hardcode "Operation not
	supported".
	* tests/cp/cp-a-selinux.sh: Likewise.

	maint: tests: avoid ENOTSUP specific handling
	* tests/mv/mv-exchange.sh: Use ENOTSUP rather than
	transforming variations.

	tests: use system EACCES message
	* tests/chgrp/no-x.sh: Don't harcode "Permission denied".
	* tests/chmod/no-x.sh: Likewise.
	* tests/du/inacc-dest.sh: Likewise.
	* tests/du/no-x.sh: Likewise.
	* tests/misc/nohup.sh: Likewise.
	* tests/mv/part-fail.sh: Likewise.
	* tests/mv/perm-1.sh: Likewise.
	* tests/rm/fail-eacces.sh: Likewise.
	* tests/rm/rm1.sh: Likewise.
	* tests/rm/rm2.sh: Likewise.
	* tests/rm/unread2.sh: Likewise.
	* tests/rm/unreadable.pl: Likewise.

	maint: tests: avoid AIX specific EACCES handling
	* tests/rm/inaccessible.sh: Remove AIX specific handling.
	* tests/cp/fail-perm.sh: Likeise.  Also remove confusing
	EPERM/HPUX mentions.
	* tests/misc/sync.sh: Don't hardcode EISDIR and EACCES.

	maint: tests: avoid EPERM/EACCES specific handling
	* tests/Coreutils.pm: Remove associated comment.
	* tests/mv/sticky-to-xpart.sh: Use $EACCES and $EPERM.
	* tests/rm/fail-2eperm.sh: Likewise.
	* tests/touch/not-owner.sh: Likewise.

	maint: tests: avoid EPERM specific handling
	* tests/dd/fail-ftruncate-fstat.sh: Use $EPERM rather than
	mapping specific strings to the Linux $EPERM.
	* tests/mkdir/smack-no-root.sh: Use $EPERM rather than hardcoding.

2026-02-18  Collin Funk  <collin.funk1@gmail.com>

	maint: expr: reduce variable scope
	* src/expr.c (mbs_logical_cspn, main, trace, docolon, eval7, eval6)
	(eval5, eval4, eval3, eval2, eval1, eval): Declare variables where they
	are used instead of at the start of the function.

2026-02-17  Pádraig Brady  <P@draigBrady.com>

	tests: pwd: ensure our getcwd fallback is tested
	* tests/pwd/pwd-long.sh: Avoid the getcwd syscall,
	to ensure our fallback getcwd code is exercised.
	* NEWS: Mention the recent bug fix in pwd.

2026-02-16  Chris Down  <chris@chrisdown.name>

	pwd: fix heap buffer overflow in file_name_prepend
	file_name_prepend works by right-aligning path data in a growing buffer.
	When the buffer is too small, it then allocates a new buffer via
	xpalloc() and copies existing data to the end of the new buffer.

	Unfortunately, the memcpy destination is computed as buf + p->n_alloc -
	n_free, but xpalloc has already updated p->n_alloc to the new (larger)
	allocation size while n_free still reflects the old state. This places
	the data at too high an offset, writing past the end of the buffer.

	Update to properly calculate the destination offset.

	Fixes: v9.5-171-g61ab25c35 ("pwd: prefer xpalloc to xnrealloc")

2026-02-15  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2026-02-14  Collin Funk  <collin.funk1@gmail.com>

	maint: seq,who: prefer xasprintf
	* src/seq.c (main): Use xasprintf instead of asprintf followed by a
	check if the allocation fails.
	* src/who.c (print_line): Likewise.

	maint: seq: reduce variable scope
	* src/seq.c (long_double_format, print_numbers, main): Declare variables
	where they are used instead of at the start of the function.

	tests: date: check that options can follow the format string
	* tests/date/date.pl (@Tests): Add the test case.

2026-02-12  Pádraig Brady  <P@draigBrady.com>

	doc: relax github issue/pull-request instructions
	Be more accepting of github issues and pull-requests.
	Be a bit less verbose in info provided.

2026-02-12  oech3  <79379754+oech3@users.noreply.github.com>

	tests: sort: ensure --batch-size=(rlimit+1) fails
	* tests/sort/sort-merge-fdlimit.sh: Add test case.
	https://github.com/coreutils/coreutils/pull/182

	tests: coreutils: remove redundant validity check
	* tests/misc/coreutils.sh: Remove the check for non-empty coreutils.h,
	as the existing `print_ver_ coreutils` is sufficient to determine
	support for single binary mode.
	https://github.com/coreutils/coreutils/pull/189

	tests: cp: ensure --debug output failure is diagnosed
	* tests/cp/debug.sh: cp diagnostics are written to stdout,
	so ensure output errors are diagnosed.
	https://github.com/coreutils/coreutils/pull/192

	tests: arch: add option parsing check
	* tests/misc/arch.sh: Ensure -- to indicate end of options is accepted.
	https://github.com/coreutils/coreutils/pull/191

2026-02-12  Pádraig Brady  <P@draigBrady.com>

	tests: date: check dotted EU dates in combination
	* tests/date/date.pl: Add other date elements
	to ensure abbreviated dotted dates are parsed appropriately.
	Corresponds to gnulib commit 451042cb76

	build: update gnulib to latest

2026-02-10  Pádraig Brady  <P@draigBrady.com>

	tests: determine errno string more efficiently
	* tests/misc/read-errors.sh: Use getlimits_ determined EIO error string,
	rather than inferring the string from bash's output.
	See https://bugs.gnu.org/80353

	tests: getlimits: output error strings
	* src/getlimits.c (main): Iterate over defined errnos,
	and output shell compatible error strings.
	* tests/Coreutils.pm: Adjust so shell quotes are stripped.

2026-02-10  Collin Funk  <collin.funk1@gmail.com>

	maint: pinky: reduce variable scope
	* src/pinky.c (create_fullname, idle_string, print_entry)
	(print_long_entry, main): Declare variables where they are used instead
	of at the start of the function. Initialize variables where they are
	declared.

2026-02-09  Pádraig Brady  <P@draigBrady.com>

	maint: remove extraneous code from test
	* tests/misc/usage_vs_refs.sh: Remove copy and paste slop.
	* tests/local.mk: Fix indentation.

2026-02-09  Collin Funk  <collin.funk1@gmail.com>

	nl: support multi-byte section delimiters
	* NEWS: Mention the improvement.
	* src/nl.c: Include mcel.h.
	(DEFAULT_SECTION_DELIMITERS): Resize to fit 2 multi-byte characters.
	(section_del_len): New variable.
	(check_section): Compare against section_del_len instead of 2.
	(main): Support multi-byte characters for the -d option.
	* tests/nl/multibyte.sh: New file.
	* tests/nl/nl.sh: New file, moved from tests/misc/nl.sh.
	* tests/local.mk (all_tests): Add the new test. Adjust the existing
	tests file name.
	* cfg.mk (exclude_file_name_regexp--sc_space_tab): Adjust Adjust the
	existing tests file name.

2026-02-08  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure with dash or ksh
	* tests/misc/read-errors.sh: Avoid dash or ksh as they
	do _not_ print an error message upon EIO from read.
	Fixes https://bugs.gnu.org/80353

2026-02-08  Gabriel  <gnu@gabriels.cloud>

	date: add tests and NEWS for dd.mm.yy support
	* NEWS: Mention the new feature.
	* tests/date/date.pl: Add test cases.

2026-02-08  Pádraig Brady  <P@draigBrady.com>

	build: update to latest gnulib
	* gnulib: Update to pick up support for dd.mm.yy format
	in parse-datetime.

2026-02-08  Sam James  <sam@gentoo.org>

	build: fix --enable-single-binary=hardlinks with dash
	With dash as /bin/sh, you get the error
	```
	checking for sys/capability.h... yes
	./configure: 95775: test: no: unexpected operator
	checking for working fork... yes
	```

	* configure.ac: Use '=' in test for equality, not '==',
	for POSIX shell compatibility.
	* NEWS: Mention the build fix.

2026-02-07  oech3  <79379754+oech3@users.noreply.github.com>

	tests: ptx: ensure bad unicode is supported
	* tests/ptx/ptx-overrun.sh: Ensure bad_unicode() is processed.

2026-02-07  Sylvestre Ledru  <sylvestre@debian.org>

	tests: cp: ensure read-only dir perms preserved
	* tests/cp/readonly-dir.sh: Add new test.
	* tests/local.mk: Reference new test.
	Identified here https://github.com/uutils/coreutils/issues/7961

2026-02-07  Collin Funk  <collin.funk1@gmail.com>

	doc: NEWS: mention the recent kill documentation fix
	* NEWS: Mention that the kill documentation now has the anchors expected
	by 'kill --help'.

2026-02-06  Collin Funk  <collin.funk1@gmail.com>

	tests: fold: check that all files are processed
	* tests/fold/multiple-files.sh: New file.
	* tests/local.mk (all_tests): Add the test.

	tests: nl: check that all files are processed
	* tests/misc/nl.sh: Add a test case.

2026-02-06  Dr. David Alan Gilbert  <dave@treblig.org>

	maint: unexpand: remove dead store
	The assign to next_tab_column in the backspace branch is never
	read; in fact it's always written and then read solely inside the
	blank branch.

	Move the declaration of 'next_tab_column' down into the blank
	branch, and remove its assignment in the backspace branch.

	Spotted by the 'infer' static checker.

	* src/unexpand.c (unexpand): Remove dead store of next_tab_column.

2026-02-06  oech3  <79379754+oech3@users.noreply.github.com>

	tests: ptx: add a robustness test case
	* tests/ptx/ptx-overrun.sh: Ensure input is processed without issue.
	https://github.com/coreutils/coreutils/pull/184

2026-02-06  Pádraig Brady  <P@draigBrady.com>

	doc: pr: use -COLS consistently
	Help this back from release as would break a couple of translations.

	* src/pr.c: Use COLS rather than COLUMN consistently
	in comments and usage().

2026-02-06  Collin Funk  <collin.funk1@gmail.com>

	doc: kill: adjust documentation to produce html anchors for --help
	* doc/coreutils.texi (kill invocation): Adjust documentation to use the
	@optItem macros.
	Fixes https://bugs.gnu.org/80339
	Fixes https://github.com/coreutils/coreutils/issues/185

2026-02-05  Pádraig Brady  <P@draigBrady.com>

	maint: remove local maintainer-makefile adjustment
	* gl/top/maint.mk.diff: Remove as the fix is now in gnulib.
	* gl/local.mk: Remove the diff reference.

	maint: update gnulib to latest

2026-02-05  Pádraig Brady  <P@draigBrady.com>

	build: propagate $SHELL to makeinfo-wrapper.sh
	A user that had an environment with SHELL=/usr/bin/fish
	reported the following when trying to build info docs:

	  build-aux/missing (line 4): Unsupported use of '='. In fish

	* doc/local.mk: Propagate make's SHELL to our
	makeinfo wrapper, so that the substituted ${SHELL}
	uses a compatible shell from the Makefile.

2026-02-05  Collin Funk  <collin.funk1@gmail.com>

	tests: df: check that --sync always calls sync before statfs
	* tests/df/sync.sh: New file.
	* tests/local.mk (all_tests): Add the test.

	stat,df: remove an unnecessary alloca
	* src/find-mount-point.c (find_mount_point): Don't call ASSIGN_STRDUPA
	on the result of dir_name.

2026-02-04  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.10
	* NEWS: Record release date.

2026-02-02  Pádraig Brady  <P@draigBrady.com>

	maintainer-makefile: propagate MAKEINFO to gendocs
	Make this change temporarily in coreutils.
	Move to gnulib after v9.10 is released.

	* top/maint.mk (web-manual): Propagate MAKEINFO explicitly,
	rather than requiring it exported in the environment,
	which can be awkward on Solaris make for example.

2026-02-02  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure sync'ing busy systems
	* tests/misc/sync.sh: Increase the timeout to 60s,
	and restrict the case to when RUN_VERY_EXPENSIVE_TESTS=yes.

2026-01-31  Pádraig Brady  <P@draigBrady.com>

	doc: improve highlighting of dd --help translations
	* src/system.h (oputs_): Ensure we're not matching '-' in
	translated descriptions.  Also support highlighting only
	dd "foo=bar" when the description is separated with a single space.

2026-01-30  Pádraig Brady  <P@draigBrady.com>

	maint: avoid prohibit-const-char syntax check failure
	* src/copy.c: Avoid prohibit-const-char failure,
	newly triggered by the (correct) recent adjustment.

	doc: move xgettext: hint to the correct translated string
	* src/fmt.c (usage): Move comment down to the newly separated string.
	Discussed in https://github.com/coreutils/coreutils/issues/178

2026-01-28  Paul Eggert  <eggert@cs.ucla.edu>

	maint: space between ‘char’ and ‘*’

2026-01-28  Collin Funk  <collin.funk1@gmail.com>

	tests: date: test that %% in the string is not replaced
	* tests/date/percent-percent.sh: New file.
	* tests/local.mk (all_tests): Add it.

2026-01-27  Pádraig Brady  <P@draigBrady.com>

	doc: improve highlighting of single spaced translations
	* src/system.h (oputs_): Translations sometimes use a single space
	between an option and its description.  They only do this though
	for long options since they result in less available screen space.
	Therefore be more strict with option matching once we've encountered
	a long option, which supports the more varied formats often
	associated with short options.

2026-01-27  Collin Funk  <collin.funk1@gmail.com>

	maint: avoid syntax-check failure
	* man/date.x: Add a copyright header to fix sc_copyright_check.
	Reported by Bruno Haible.

	tests: tac: test --regex with anchors in the separator
	* tests/tac/tac.pl (@Tests): Add a few test cases.

2026-01-26  Paul Eggert  <eggert@cs.ucla.edu>

	doc: fit in 80 columns

	doc: fix date(1) synopses etc
	Font problem reported by Michael Aramini via Alejandro Colomar
	<https://bugs.gnu.org/80258>.  This patch also fixes some
	longstanding confusion with date synopses.
	* src/date.c (usage): Do not imply that only -u can be used with
	MMDDhhmm..., and do not put misleading brackets around the latter.

2026-01-25  Collin Funk  <collin.funk1@gmail.com>

	tests: mktemp: export LC_ALL
	* tests/mktemp/bad-unicode.sh: Run this test case using multiple
	locales.

2026-01-25  Pádraig Brady  <P@draigBrady.com>

	doc: support TAB as a delimiter between --option and description
	* src/system.h (oputs_): Treat a single TAB as an option delimiter.
	Some zh translations use this delimiter format.

2026-01-24  Collin Funk  <collin.funk1@gmail.com>

	tests: chgrp: allow a numeric user id to be printed
	* tests/chgrp/from.sh: If 'id' cannot find a user name for user id 1,
	expect the user id to be printed in the message of 'chgrp'.
	Reported by Bruno Haible.

2026-01-24  Pádraig Brady  <P@draigBrady.com>

	tail: fix EINTR handling on older systems
	tail(1) could fail with an "Interrupted system call"
	diagnostic, on some systems like Centos 5 (Linux 2.6.18).
	This was seen with tests/tail/overlay-headers.sh
	which sends SIGCONT, which should not induce a failure.

	* src/tail.c (tail_forever_inotify): Retry the poll()
	upon receiving a non terminating signal, and the syscall
	is not automatically restarted by the system.
	* NEWS: Mention the bug fix.
	Reported by Bruno Haible.

2026-01-24  Collin Funk  <collin.funk1@gmail.com>

	tests: avoid failures if 'ulimit -n' cannot set file descriptor limits
	This fixes test failures seen on Haiku.

	* tests/ls/recursive.sh: Run 'ls' even if ulimit fails.
	* tests/split/r-chunk.sh: Run 'split' even if ulimit fails.
	* tests/sort/sort-merge-fdlimit.sh: Skip test if 'ulimit -n' cannot set
	file descriptor limits.
	Reported by Bruno Haible.

2026-01-24  Pádraig Brady  <P@draigBrady.com>

	tests: dd: avoid EPERM false failure on Solaris
	* tests/dd/fail-ftruncate-fstat.sh: Also map the "Not owner"
	error for EPERM seen on earlier Solaris 11 releases.
	Reported by Bruno Haible.

	doc: nproc: mention OpenMP env vars in --help
	* src/nproc.c (usage): Clarify the impact of 'OMP_NUM_THREADS'
	and 'OMP_THREAD_LIMIT' in --help and the man page.
	Also mention that nproc(1) will always return > 0.
	Fixes https://bugs.gnu.org/80243

	build: update to latest gnulib
	* gnulib:
	  - getdelim, getline: Don't replace these functions on glibc
	  - selinux: fix link errors with termux

2026-01-24  Bruno Haible  <bruno@clisp.org>

	tests: recognize SELinux support on Android
	* init.cfg (require_selinux_): Also try to see if 'mount' lists the
	selinuxfs.

2026-01-24  Pádraig Brady  <P@draigBrady.com>

	tests: stty: avoid false failure if resizing terminal
	* tests/stty/stty-row-col.sh: Skip the test if we detect terminal
	resizing.  Also more robustly restore the original size.

2026-01-24  Collin Funk  <collin.funk1@gmail.com>

	tests: readlink: avoid a false failure on Haiku
	* tests/readlink/readlink-posix.sh: Allow the "A" in "Argument" to be
	capitalized in return value of strerror (EINVAL).

	doc: NEWS: add a missing quotation mark
	* NEWS: Add a closing quotation mark.

2026-01-23  Pádraig Brady  <P@draigBrady.com>

	tests: usage_vs_refs.sh: fix false failure with Alpine
	* tests/misc/usage_vs_refs.sh: Fix missing escape on literal {,
	required by busybox grep.
	Reported by Bruno Haible.

2026-01-22  Egmont Koblinger  <egmont@gmail.com>

	doc: dir,vdir: add dircolors(1) reference to man pages
	* man/dir.x: Add dircolors(1) to "SEE ALSO" section.
	* man/vdir.x: Likewise.

2026-01-22  Pádraig Brady  <P@draigBrady.com>

	doc: dir,vdir: fix anchor refs from --help
	* src/system.h (oputs_): Map from dir,vdir to ls.

2026-01-22  Egmont Koblinger  <egmont@gmail.com>

	doc: stat: fix highlighting of --format
	* src/stat.c (usage): Add missing comma after -c.

2026-01-22  Pádraig Brady  <P@draigBrady.com>

	doc: NEWS: minor adjustments
	* NEWS: Fix typos, and move item to more appropriate section.

	doc: pr: fix --help output output
	* src/pr.c (usage): Use consistent alignment with -J,
	and highlight --pages using oputs().

	doc: help2man: handle leading '+' in options
	* man/help2man: Fix indentation of options with leading '+'.

	tests: fix false failure with pr -COLS
	* tests/misc/usage_vs_getopt.sh: Fix false failure induced
	by commit v9.9-239-ga06f0cf67

2026-01-22  Pádraig Brady  <P@draigBrady.com>

	doc: use TERM=dumb rather than HELP_NO_MARKUP to disable markup
	This is a more standard mechanism to disable markup.

	* src/system.h (oputs_): Logic change to honor TERM=dumb,
	rather than HELP_NO_MARKUP=something.
	* doc/coreutils.texi: Adjust the description for --help.
	* man/local.mk: Ensure TERM is set to something,
	so that man pages have links included.
	* man/viewman: Just honor users $TERM.
	* tests/misc/getopt_vs_usage.sh: Remove env var complication,
	as TERM is unset automatically.
	* tests/misc/usage_vs_refs.sh: Likewise.
	* NEWS: Adjust the change in behavior note.

2026-01-21  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure with non standard path
	* tests/misc/usage_vs_refs.sh: Properly quote arguments
	to avoid false failure with paths containing spaces etc.

	tests: avoid infinite loop in dd failure edge case
	* tests/tee/tee.sh: If dd failed, then tee would spin
	writing to the fifo forever, so add a timeout protection.
	This was noticed with `export LD_PRELOAD=libasan.so.8`
	with a non ASAN build, which induced a failure in dd invocations.

	tests: avoid false failure with sanitizer builds
	* init.cfg (sanitizer_build_): Add a helper to detect if a program
	is built against a sanitizer.
	* tests/df/no-mtab-status-masked-proc.sh: Skip if a sanitizer build.

	stat,tail: sync with latest Linux file systems
	* src/stat.c (human_fstype): Add "guest-memfd".
	* NEWS: Mention the improvement.

	tests: avoid false failure on setgid dir
	* tests/misc/mknod.sh: Skip a portion of the test
	in the edge case of setgid directories.

2026-01-21  Pádraig Brady  <P@draigBrady.com>

	ls: --hyperlink: switch to more standard delimiters
	* src/ls.c (quote_name): Use ST (ESC \) rather than BEL,
	as that's the only terminator mentioned in at least
	ECMA-48, DEC STD 070, and EK-VT520-RM.
	* NEWS: Mention the change in behavior.
	* tests/ls/hyperlink.sh: Adjust accordingly.

	Suggested by Egmont Koblinger.

2026-01-21  Pádraig Brady  <P@draigBrady.com>

	tests: ensure there is an anchor for each --help option
	* tests/misc/usage_vs_refs.sh: A new test to correlation options
	listed in --help, and anchors referenced in the texinfo (html) manual.
	* tests/local.mk: Add the new test.

	doc: NEWS: describe the --help markup configuration options
	* NEWS: Mention build and runtime config options.

	doc: adjust --help hyperlinks to more standard format
	* src/system.h (oputs_): Use ST rather than BEL.

	doc: add commentary on details of --help references
	* src/system.h: Mention why we don't bother with (the overhead of)
	hostnames in these URLs, and why --help,--version link are special.

	doc: cp: group related -HLP descriptions
	* src/cp (usage): The -HLP options are close
	in functionality and close alphabetically, so describe together.
	* doc/coreutils.texi (cp invocation): Likewise.

	doc: cp: document --keep-directory-symlink in correct location
	* src/cp.c (usage): Move to alphabetically in list.
	* doc/coreutils.texi (mv invocation): Move description from here ...
	(cp invocation): ... to here.

	doc: ls: document --block-size in the manual
	* doc/coreutils.texi (ls invocation): Document --block-size

	doc: who: document --users in manual
	* doc/coreutils.texi (who invocation): Mention that --users
	is equivalent to -u.
	* src/who.c (usage): Mention -u shows idle time.

	doc: id: document -a in manual
	* doc/coreutils.texi (id invocation): Mention this option is ignored.

	doc: more indexing fixes in manual
	* doc/coreutils.texi: Add missing anchors.
	* src/pr.c (Usage): Adjust to use -COLS, to avoid a clash
	with the additional anchor added to the manual.
	Also markup the --columns option as done for other options.
	* tests/split/line-bytes.sh: Also fix --lines-bytes typo here.

2026-01-21  Egmont Koblinger  <egmont@gmail.com>

	doc: tty: fix indexing in texinfo
	* doc/coreutils.texi: Fix recently introduced typo.
	* THANKS.in: Remove as now committed to the repo.

2026-01-21  Pádraig Brady  <P@draigBrady.com>

	doc: make legacy digest utility --help reference cksum nodes
	* src/system.h (oputs_): Map md5sum etc. to cksum urls,
	as we only have cksum anchors in the manual to avoid
	creating anchors for all of the legacy digest utilities.

	doc: tweak tests to avoid false failure with --help
	* tests/df/df-output.sh: Use a more relaxed match.
	* tests/du/inodes.sh: Likewise.

	doc: all: use option highlighting and more standard alignment
	Adjust all utils to:
	  - Have a separate translation per option
	  - Use either oputs() or oprintf(), instead of fputs() or printf().
	  - Use more standard alignment as discussed in previous commits.
	  - Various tweaks to descriptions.

	doc: readlink: improve option ordering in texinfo
	* doc/coreutils.texi (readlink invocation): Order -q,-s alphabetically.

	doc: chcon: use more standard -HLP desciptions
	* src/chcon.c (usage): Use emit_symlink_recurse_options ("-P").

	doc: highlight -HLP options
	* src/system.h (emit_symlink_recurse_options): Highlight -HLP,
	for chmod, chcon etc.

	doc: put --help and --version descriptions on separate line
	* src/system.h: This aligns the output with the option
	description format used in most commands

	doc: ls: put option description on separate line to option
	* src/ls.c (usage): This is less constrained when writing comments,
	and more consistent in output alignment.  There is less delineation
	between options and descripts, but given options are highlighted
	by default now, this is a more appropriate format to use.
	Note consistently showing description on the line following the option,
	avoids any issue with the user needing to visually line up
	the option with a description far to the right.
	Note this format more closely aligns with that used in man pages.

2026-01-21  Pádraig Brady  <P@draigBrady.com>

	doc: viewman: a new helper to quickly view formatted man pages
	Use like: man/viewman ls

	* man/viewman: Generate man page on the fly, and view.

2026-01-21  Pádraig Brady  <P@draigBrady.com>

	doc: help2man: account for undisplayed markup in indenting calculations
	* man/help2man: This is significant with the indented line
	following the dd bs=BYTES "option" at least.

	doc: help2man: convert all hyperlinks, not just ones in --options
	* man/help2man: Make the (--?) part of the match optional.
	Note we still extract the dashes, to support the existing
	option matching logic in help2man.

	doc: help2man: support alternate format OSC hyperlinks
	* man/help2man: The BEL terminator format was already supported.
	Add support for ESC + backslash terminator.  Also split out
	and document the regular expression.

	doc: help2man: convert OSC hyperlinks
	* man/help2man: Convert OSC hyperlinks to roff \X escapes,
	which will be converted back to OSC hyperlinks when
	the man page is displayed on the terminal.
	Note formatting is removed from hyperlinked text by default,
	thus relying on how the terminal highlights hyperlinks,
	but --bold-refs is honored in this case, in which hyperlinked
	text will be marked up as bold, which matches the default
	markup used for non hyperlinked options.

	doc: help2man: recognise option description with smaller indent
	* man/help2man: Allow for a smaller indented option description.
	This smaller indentation is present in timeout --help output,
	so now the line spacing in timeout.1 is more consistent.
	Also having the description on a separate line with
	a smaller indentation, is a more general way to present
	option descriptions (and what the man page formatting uses already).
	We'll be changing many utilities, especially with longer multi-line
	descriptions to this new format.

	doc: help2man: strip ANSI codes
	* man/help2man: With these ANSI codes, output is corrupted,
	so it's best to strip these, which allows --help to
	outputting formatting and hyperlinks by default.

	doc: support highlighting printf formatted options
	* src/system.h (oprintf): Add a printf wrapper that
	calls oputs_() to markup the formatted text.

	doc: support more general option matching
	* src/system.h: Support "-p DIR, --tmpdir[=DIR]" option.
	Previously only the "-p" was highlighted.
	Support highlighting dd option syntax (no '-').
	Support test(1) "FILE1 -nt FILE2" syntax.

	doc: parse any whitespace as an option/description delimiter
	* src/system.c (oputs_): Use isspace() rather than hardcoding.
	Note we don't use c_isspace() as we need to support anything
	coming from translations.

	doc: optimize logic to disable SGR output in --help
	* src/system.h (oputs_): Simplify processing if neither
	MANUAL_URL or BOLD_MAN_REFS is defined.  Also ensure
	we only lookup the HELP_NO_MARKUP env var once per process.

	doc: move oputs() to system.h to support all commands
	* src/ls.c: Move non ls specific helper to ...
	* src/system.h: ... here.

	doc: support a configurable manual url
	* configure.ac: Support ./configure --enable-manual-url=...
	* src/ls.c (oputs): Adjust accordingly.

	doc: --help: --disable-bold-man-page-references configures bold refs
	* configure.ac: Adjust help text for --disable-bold-man-page-references,
	and also define BOLD_MAN_REFS.
	* src/ls.c (oputs): Output bold iff BOLD_MAN_REFS is defined.

	doc: ls: support styling and links in --help output
	* src/ls.c (oputs): A new function that wraps puts(),
	but also highlights the --option-text portion, and
	adds links to the appropriate part of the online manual.
	(usage): Call oputs() rather than puts().
	* doc/coreutils.texi (--help): Document new HELP_NO_MARKUP env var,
	which can be used in the edge case one wants to suppress ansi escapes.
	* tests/misc/getopt_vs_usage.sh: Use HELP_NO_MARKUP to ensure the
	test continues to pass.

	tests: test: ensure whitespace ignored when parsing numbers
	* tests/test/test.pl: Add a test case.

2026-01-21  Pádraig Brady  <P@draigBrady.com>

	cksum: use more accurate program name in single binary mode
	Following commit v9.9-109-gcd5229222

	* src/cksum.c (PROGRAM_NAME): In legacy mode, i.e., when built
	as a single binary, set the PROGRAM_NAME dynamically based on
	the selected digest type.  This is significant in --help
	to ensure the correct texinfo node is referenced, and in
	--version to ensure the correct utility name is output.

2026-01-20  Collin Funk  <collin.funk1@gmail.com>

	tests: dd: avoid a false test failure on Solaris 11.4
	* tests/dd/fail-ftruncate-fstat.sh: Replace the message used by Solaris
	11.4 for strerror (EPERM) with the one we expect.

2026-01-19  Collin Funk  <collin.funk1@gmail.com>

	tests: sync: check that all files are processed even when errors occur
	* tests/misc/sync.sh: Add the test case.

	tests: sync: also test that -d and -f don't block on a FIFO
	* tests/misc/sync.sh: Check 'sync fifo' with no arguments, -d, and -f
	separately. Only perform the check for -f if RUN_EXPENSIVE_TESTS=yes
	since it may be expensive.

2026-01-19  Pádraig Brady  <P@draigBrady.com>

	build: update to latest gnulib
	* gnulib: Update to latest.
	* NEWS: Mention the bug fix.
	https://github.com/coreutils/coreutils/issues/176

2026-01-18  oech3  <79379754+oech3@users.noreply.github.com>

	tests: env.sh: avoid multi-call binary considerations
	A simpler fix than commit v9.9-4-g3b6efd555
	which is less dependent on the exact behavior
	of a multi-call binary.

	* tests/env/env.sh: Use a local script rather than 'true'.
	which may be a symlinked multi-call binary.
	https://github.com/coreutils/coreutils/pull/174

2026-01-18  Collin Funk  <collin.funk1@gmail.com>

	doc: post process html with non-GNU make programs
	* .gitignore (/build-aux/makeinfo-wrapper.sh):
	* Makefile.am (EXTRA_DIST): Remove build-aux/makeinfo-wrapper.sh.
	* build-aux/makeinfo-wrapper.sh.in: New file, renamed from
	build-aux/makeinfo-wrapper.sh and modified to use @MAKEINFO@ instead of
	makeinfo.
	* cfg.mk (MAKEINFO): Remove variable.
	* configure.ac: Add build-aux/makeinfo-wrapper.sh as a configure file.
	* doc/local.mk (MAKEINFO): Define to
	$(abs_top_builddir)/build-aux/makeinfo-wrapper.sh.
	(AM_MAKEINFOFLAGS): Move over some values from the previous MAKEINFO
	definition.

2026-01-18  Pádraig Brady  <P@draigBrady.com>

	tests: strace: consider splice a "read" syscall
	* tests/cksum/cksum-c.sh: Add 'splice' to the injection set.
	* tests/misc/read-errors.sh: Likewise.
	From https://github.com/coreutils/coreutils/pull/167

2026-01-18  Pádraig Brady  <P@draigBrady.com>

	maint: prefer NULL to nullptr
	NULL is best for C as discussed at:
	https://bugs.gnu.org/66221#53

	* bootstrap.conf: Remove dependency on nullptr.
	* s/nullptr/NULL/.

2026-01-18  Pádraig Brady  <P@draigBrady.com>

	doc: add more redirections from legacy *sum to cksum
	*  doc/coreutils.texi (md5sum invocation, sha1sum invocation,
	b2sum invocation, sha2 utilities): Mention these are legacy interfaces,
	and reference 'cksum invocation'.
	*  src/cksum.c (usage): Likewise.
	*  man/md5sum.x: Redirect to cksum, rather than individual utils.
	*  man/sha1sum.x: Likewise.

	tests: use `command -v` to identify binary
	* tests/misc/coreutils.sh: Be more flexibile by using `command -v`
	to identify the binary to be executed, rather than linking
	directly to the built binary.

2026-01-18  Collin Funk  <collin.funk1@gmail.com>

	build: fix error building html documentation from tarball
	Reported by Egmont Koblinger <egmont@gmail.com> in
	<https://lists.gnu.org/r/coreutils/2026-01/msg00111.html>.

	* Makefile.am (EXTRA_DIST): Add build-aux/makeinfo-wrapper.sh.

2026-01-17  Collin Funk  <collin.funk1@gmail.com>

	tests: avoid a test hang on AIX
	* init.cfg (uses_strace_): New function.
	(require_strace_): Use it.
	tests/cksum/cksum-c.sh: Likewise.
	tests/misc/read-errors.sh: Likewise.

	build: update gnulib submodule to latest

2026-01-17  Pádraig Brady  <P@draigBrady.com>

	maint: remove sc_prohibit_NULL syntax check
	* cfg.mk: NULL is fine and good in C as per:
	https://bugs.gnu.org/66221#53

	build: update gnulib submodule to latest

2026-01-17  Collin Funk  <collin.funk1@gmail.com>

	maint: pacify another gcc -Wzero-as-null-pointer-constant warning
	* src/uptime.c (print_uptime): Add a timezone_t cast to zero. Don't use
	nullptr since timezone_t is not a standardized and may be defined to
	something other than a pointer.

2026-01-16  Paul Eggert  <eggert@cs.ucla.edu>

	maint: spelling fixes

	build: update gnulib submodule to latest

	maint: pacify gcc -Wzero-as-null-pointer-constant
	* src/basenc.c (long_options):
	* src/chcon.c (change_file_context):
	* src/copy.c (is_ancestor):
	* src/env.c (build_argv):
	* src/expr.c (nomoreargs):
	* src/factor.c (mp_no_factors):
	* src/ls.c (long_options, main):
	* src/selinux.c (defaultcon, restorecon_private):
	* src/shred.c (dopass):
	* src/shuf.c (long_opts):
	* src/tac.c (output):
	* src/test.c (term):
	* src/uniq.c (check_file): Do not use ‘0’ as a null pointer
	constant.  Although it is typically valid C, there are exceptions
	(e.g., stdarg) and it a bit cleaner to be consistent.  This patch
	uses NULL, not nullptr, as I have second thoughts about nullptr;
	see <https://bugs.gnu.org/66221#53>.

2026-01-16  Collin Funk  <collin.funk1@gmail.com>

	build: fix link errors with multi-call binary and 'cksum' excluded
	* src/local.mk (src_ls_LDADD, src_seq_LDADD, src_md5sum_LDADD)
	(src_sha1sum_LDADD, src_sha224sum_LDADD, src_sha256sum_LDADD)
	(src_sha384sum_LDADD, src_sha512sum_LDADD): Set to
	$(src_cksum_LDADD).
	Reported at https://github.com/coreutils/coreutils/issues/172

2026-01-15  Pádraig Brady  <P@draigBrady.com>

	all: with multi-call binary, only process options for known names
	Setup
	  $ ln -nsf src/coreutils foo

	Before
	  $ ./foo; echo $?
	  foo: unknown program ‘foo’
	  Try './foo --help' for more information.
	  1
	  ./foo --version; echo $?
	  coreutils (GNU coreutils) 9.9.172-01993
	  0

	After
	  $ ./foo; echo $?
	  coreutils: unknown program 'foo'
	  1
	  $ ./foo --version; echo $?
	  coreutils: unknown program 'foo'
	  1

	* src/coreutils.c (main): Don't process options if
	we don't know they're intended for the multi-call binary.
	Otherwise `foo --version` would return true, even though
	foo was symlinked to the multi-call binary, but not supported.
	* tests/misc/coreutils.sh: Add test cases.
	* NEWS: Mention the change in behavior.

2026-01-15  Pádraig Brady  <P@draigBrady.com>

	doc: paste: give a CSV generation example
	* doc/coreutils.texi (paste invocation): Provide an example
	to comma separate data.

2026-01-14  Pádraig Brady  <P@draigBrady.com>

	build: paste: fix build failure with C99
	GCC 10.2 gave the following error:
	"error: a label can only be part of a statement
	 and a declaration is not a statement"

	* src/fold.c (fold_file): Add a ";" to avoid C2X specific syntax.

2026-01-14  Collin Funk  <collin.funk1@gmail.com>

	maint: avoid syntax-check failure from previous commit
	* src/copy-file-data.c (sparse_copy): Use nullptr instead of NULL.

2026-01-13  Paul Eggert  <eggert@cs.ucla.edu>

	cat: don’t treat copy_file_range EFBIG as fatal
	* src/cat.c (copy_cat):
	* src/copy-file-data.c (sparse_copy):
	Don’t treat EFBIG as a reportable error from copy_file_range.
	If the input is at EOF and the output position is 2**63 - 1,
	copy_file_range (ifd, NULL, ofd, NULL, 2146435072, 0)
	incorrectly fails with EFBIG.  Problem observed on Ubuntu 25.10
	x86-64 with Linux kernel 6.17.0-8-generic #8-Ubuntu.
	I am too lazy to report this kernel bug or add a coreutils test case.

	build: update gnulib submodule to latest

	cp: copy-file-data.c commentary fixes
	* src/copy-file-data.c: Update commentary to match code better.

2026-01-13  Pádraig Brady  <P@draigBrady.com>

	tests: ensure utilities correctly diagnose read errors
	* tests/misc/read-errors.sh: Ensure each utility calls a
	read system call as requested.  Not doing so (say by avoiding
	reading from a directory) is a layering violation.
	Also ensure we diagnose the particular error encountered.

	fmt: correctly diagnose read errors
	* src/fmt.c (fmt): Pass errno to error() so that
	the particular error is diagnosed.
	* NEWS: Mention the improvement.

	paste: support multi-byte delimiters
	* src/paste.c (collapse_escapes): This is the central --delimiters
	parsing function, so adjust to handle multi-byte chars with
	mcel_scanz().  Populate a delimiters length array to support
	characters of differing lengths.
	(paste_serial): Use the delimiters length array to output
	the appropriate delimiter.
	(paste_parallel): Likewise.
	* tests/paste/multi-byte.sh: A new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the improvement.

2026-01-13  oech3  <79379754+oech3@users.noreply.github.com>

	tests: nice: ensure large values are clamped
	* tests/nice/nice.sh: Ensure integers > UINTMAX_MAX are supported.
	From https://github.com/coreutils/coreutils/pull/170

2026-01-13  Collin Funk  <collin.funk1@gmail.com>

	maint: ptx: place long options without short options after CHAR_MAX
	* src/ptx.c (FORMAT_OPTION): New constant.
	(long_options): Use FORMAT_OPTION instead of 10.
	(main): Likewise.

2026-01-12  Dmitry V. Levin  <ldv@altlinux.org>

	tests: cksum: use more general strace syscall injection
	* tests/cksum/cksum-c.sh: Match "read" with a regex
	to match any of the read syscall variants.

2026-01-12  Pádraig Brady  <P@draigBrady.com>

	tests: paste -d: test supported escape sequences
	* tests/misc/paste.pl: Test all supported POSIX and GNU
	backslash escape sequences.

	doc: paste: add more detail on operation and options
	* src/paste.c (usage): Mention how lines are processed
	with and without the -s option.  Also mention that -d
	supports backslash escapes.
	* doc/coreutils.texi (paste invocation): Likewise.
	Also detail the backslash escapes, noting which are non-POSIX.

2026-01-12  Collin Funk  <collin.funk1@gmail.com>

	maint: ptx: reuse octhexdigits macros instead of redefining them
	* src/ptx.c: Include octhexdigits.h.
	(HEXTOBIN, ISODIGIT, OCTTOBIN): Remove macros.
	(unescape_string): Use the macros from octhexdigits.h instead of the
	removed macros.

2026-01-11  Pádraig Brady  <P@draigBrady.com>

	tests: date: test nested parenthesis comment handling
	* tests/date/date.pl: Add test cases.
	Suggested by Sylvestre Ledru.

	doc: runcon: use more accurate synopsis format
	* src/runcon.c (usage): Align synopsis with format
	used in other commands.
	* doc/coreutils.texi (runcon invocation): Likewise.

2026-01-11  oech3  <79379754+oech3@users.noreply.github.com>

	tests: cksum: ensure --check handles I/O errors
	* tests/cksum/cksum-c.sh: Use strace to inject EIO upon read(),
	and verify it's handled appropriately.
	From https://github.com/coreutils/coreutils/pull/167

2026-01-11  Pádraig Brady  <P@draigBrady.com>

	tests: cksum: ensure --check diagnoses read errors
	* tests/misc/read-errors.sh: Add a test case.
	Discussed in https://github.com/coreutils/coreutils/pull/167

2026-01-11  Pádraig Brady  <P@draigBrady.com>

	build: support 'dist' and 'syntax-check' targets without libselinux
	Following on from commit v9.8-60-g8ba47d09a ...
	Without libselinux installed, runcon and chcon stub binaries
	will not be built by default.  We separate these utilities out
	to a separate "not built unless appropriate" class, so that
	we can add these to EXTRA_MANS so that the 'check-x-vs-1'
	target doesn't fail, and the 'dist' target includes
	these man pages.

	* build-aux/gen-lists-of-programs.sh: Separate out
	build_if_appropriate_progs, and propagate that through
	to no_install_progs_default which populates EXTRA_MANS.
	* src/local.mk: Separate out build_if_appropriate__progs
	for clarity and consistency.

2026-01-11  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest mainly to pull in selinux module fixes.
	* NEWS: Mention the build fix to honor --with-selinux building
	stub chcon and runcon binaries on systems without libselinux.

2026-01-10  Collin Funk  <collin.funk1@gmail.com>

	cksum: promptly diagnose write errors
	* src/cksum.c (output_file, digest_check): Check if standard output has
	it's error flag set after printing.
	* tests/misc/write-errors.sh: Add a test case that would previously run
	forever.
	* NEWS: Mention the improvement. Reorder alphabetically.

2026-01-10  Pádraig Brady  <P@draigBrady.com>

	maint: remove redundant processing in a test
	* tests/misc/write-errors.sh: This was a no-op anyway
	due to inadequate escaping.  Also document the escaping requirement.

	du: promptly diagnose write errors
	* src/du.c (print_size): Call write_error() if can't flush.
	* tests/misc/write-errors.sh: Add a test case.
	* NEWS: Mention the improvement.

	wc: promptly diagnose write errors
	* src/wc.c (write_counts): Call write_error() if any pending errors.
	* tests/misc/write-errors.sh: Add a test case.
	* NEWS: Mention the improvement.

2026-01-09  Collin Funk  <collin.funk1@gmail.com>

	readlink,realpath: promptly diagnose write errors
	The 'readlink' and 'realpath' programs have an uncommon case where they
	can run for a very long time. When canonicalizing file names longer than
	PATH_MAX, we have to call 'openat' for each directory up the tree until
	we reach root which takes a long time. Here is an example of the current
	behavior:

	    $ mkdir -p $(yes a/ | head -n $((32 * 1024)) | tr -d '\n')
	    $ while cd $(yes a/ | head -n 1024 | tr -d '\n'); do :; \
	        done 2>/dev/null
	    $ pwd | tr '/' '\n' | wc -l
	    32771
	    $ env time --format=%E readlink -f $(yes . | head -n 5) > /dev/full
	    readlink: write error: No space left on device
	    Command exited with non-zero status 1
	    0:59.72
	    $ env time --format=%E realpath $(yes . | head -n 5) > /dev/full
	    realpath: write error: No space left on device
	    Command exited with non-zero status 1
	    1:00.32

	It is better to exit as soon as there is an error writing to standard
	output:

	    $ env time --format=%E readlink -f $(yes . | head -n 5) > /dev/full
	    readlink: write error: No space left on device
	    Command exited with non-zero status 1
	    0:11.88
	    $ env time --format=%E realpath $(yes . | head -n 5) > /dev/full
	    realpath: write error: No space left on device
	    Command exited with non-zero status 1
	    0:12.04

	* src/readlink.c (main): Check if standard output has it's error flag
	set after printing a file name.
	* src/realpath.c (process_path): Likewise.
	* NEWS: Mention the improvement.

2026-01-08  Pádraig Brady  <P@draigBrady.com>

	cksum: validate options more consistently
	We disallow `cksum --tag --check` which is fine,
	but the error should be consistent with md5sum,
	and less confusing, as it currently mentions
	"--binary" and "--text" which weren't specified.

	We disallow `cksum --tag --text` which is fine,
	but we should also disallow `cksum --text --tag`.

	We should honor an explicit --binary (output *)
	with this combination of options:
	cksum --binary --tag --untagged -a md5 /dev/null

	Note this also makes both of `cksum -a md5` and
	`cksum --tag -a md5` consistently use binary mode
	when reading from a tty on systems like MinGW
	where O_BINARY is set.

	* src/cksum.c (main): Adjust --text,--binary
	and --tag,--untagged option processing.
	* tests/cksum/cksum-a.sh: Add test cases.
	* tests/cksum/cksum-c.sh: Likewise.
	* NEWS: Mention the improvement.
	Fixes https://github.com/coreutils/coreutils/issues/163

2026-01-08  Pádraig Brady  <P@draigBrady.com>

	tests: chmod: fix false failure in recent test
	* tests/chmod/partial-fail.sh: Test readablility of mode 0 files
	independently, to avoid false failure, e.g., when run as root.
	Reported by Bruno Haible.

2026-01-08  Pádraig Brady  <P@draigBrady.com>

	tests: tail/overlay-headers.sh: fix various issues
	* tests/tail/overlay-headers.sh (cleanup_): Ensure we send SIGCONT
	to the tail process, otherwise we would hang if the test is terminated
	while the tail process is in stopped state.
	(wait4stopped_): A new function to ensure tail is in the stopped state
	before we start writing to the monitored files.
	Also remove "---disable-inotify" from $fastpoll so we actually
	test the inotify code (where supported).
	Also remove the timeout(1) wrapper, so we actually suspend tail(1).

	Reported by Bruno Haible on macOS 26

2026-01-08  Pádraig Brady  <P@draigBrady.com>

	fmt: interpret -w as an inclusive maximum
	This aligns with `fold -w` and BSD `fmt` implementations.

	* src/fmt.c (fmt_paragraph): Check len <= max_width.
	* tests/fmt/width.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the change in behavior.
	Addresses part of https://bugs.gnu.org/79497

2026-01-08  Sylvestre Ledru  <sylvestre@debian.org>

	tests: date: test parenthesis comment handling
	* tests/date/date.pl: Add the check.

2026-01-07  Collin Funk  <collin.funk1@gmail.com>

	maint: organize mktemp tests in a subdirectory
	* tests/misc/mktemp.pl: Moved to tests/mktemp/mktemp.pl.
	* tests/local.mk (all_tests): Adjust the file name.

	tests: mktemp: add tests for invalid Unicode options
	* init.cfg (bad_unicode): New function, copied from
	tests/fold/fold-characters.sh with the NUL removed.
	* tests/fold/fold-characters.sh (bad_unicode): Rename to
	bad_unicode_with_nul. Reformat long line.
	* tests/mktemp/bad-unicode.sh: New test.
	* tests/local.mk (all_tests): Add the new test.

2026-01-06  Pádraig Brady  <P@draigBrady.com>

	copy: protect against infinite loop due to pathological race
	Consider:

	1. In infer_scantype():
	    - SEEK_DATA returns 0
	      - hole punched at 0
	    - SEEK_HOLE returns 0 (now a hole)
	    - Cache scan_inference->hole_start = 0
	2. In lseek_copy():
	      - data written at 0
	    - ext_start = 0, use cached hole_start = 0
	    - ext_len = 0
	    - now loop doesn't progress

	* src/copy-file-data.c (lseek_copy): Apply a more defensive check
	to ensure we only use the cached offsets in SCAN_INFERENCE once.
	This protects against an infinite loop where an extent (at SRC_POS)
	flip flops between data and hole extent while infer_scantype()
	and lseek_copy() are inspecting it.  I.e. ensure we use SEEK_HOLE
	to progress the copy.

2026-01-06  Pádraig Brady  <P@draigBrady.com>

	tests: cp: fix always skipped nfs-removal-race.sh
	* tests/cp/nfs-removal-race.sh: This test was invalid since v8.32
	as we now use fstatat() rather than stat().  Also since commit
	v9.0-66-ge2daa8f79 we leverage the errno from open(O_DIRECTORY)
	to avoid a stat, so pass --no-target-directory to ensure fstatat()
	is called.
	Discussed in https://github.com/coreutils/coreutils/pull/161

2026-01-06  Christopher Illarionova  <drydench@amazon.com>

	tests: cp: support glibc 2.33+ in nfs-removal-race test
	glibc 2.33 removed __xstat, making stat() a direct symbol. This test
	previously only intercepted __xstat, causing it to skip on modern glibc
	with 'LD_PRELOAD was ineffective'.

	Changes:
	- Intercept both __xstat (glibc < 2.33) and stat (glibc >= 2.33)
	- Only mark 'preloaded' when stat is called on destination 'd',
	  ensuring the test verifies cp actually stats the destination

2026-01-06  Pádraig Brady  <P@draigBrady.com>

	doc: tr: warn about shell quoting [:classes:]
	* src/tr.c (usage): Warn about avoiding shell globbing.
	* doc/coreutils.texi (character arrays): Likewise.
	Suggested by Daniel Dallos.

2026-01-05  Pádraig Brady  <P@draigBrady.com>

	ptx: implement -t to change default width to 100
	Align the -t implementation with the Heirloom project.

	* src/ptx.c (usage): Describe -t, and also mention
	the default width is 72 when not used.
	* doc/coreutils.texi (ptx invocation): Likewise.
	(main): Override the default width if -t is specified.
	* tests/ptx/ptx.pl: Add test cases.
	* NEWS: Mention the change in behavior.

2026-01-05  Christopher Illarionova  <drydench@amazon.com>

	tests: stty: add require_controlling_input_terminal_ to bad-speed test
	The bad-speed test runs 'stty ispeed 9600' without a --file argument,
	which requires a controlling terminal. Without it, stty fails early with
	'Inappropriate ioctl for device' before reaching cfsetispeed, causing
	the test to skip with a misleading 'LD_PRELOAD interception failed'
	message.

	* tests/stty/bad-speed.sh: Add require_controlling_input_terminal_
	to match the other stty tests (stty.sh, stty-pairs.sh, stty-row-col.sh,
	stty-invalid.sh) which all require a controlling terminal.
	From https://github.com/coreutils/coreutils/pull/160

2026-01-04  Collin Funk  <collin.funk1@gmail.com>

	maint: mknod: reduce variable scope
	* src/mknod.c (main): Declare variables where they are used instead of
	at the start of a block. Prefer signed integers to unsigned integers.

	maint: mkfifo: reduce variable scope
	* src/mkfifo.c (main): Declare variables where they are used instead of
	at the start of a block.

2026-01-04  Pádraig Brady  <P@draigBrady.com>

	copy: fix possible infinite loop with SEEK_HOLE
	Commit v9.8-95-g4c0cf3864 intended to initialize
	ext_start to src_pos, as was described at:
	https://lists.gnu.org/r/coreutils/2025-11/msg00035.html
	However ipos was inadvertently used, which is only
	valid the first time through the loop.

	* src/copy-file-data.c (lseek_copy): Use scan_inference->hole_start
	only with the initial offset passed to lseek_copy().
	* NEWS: Mention the bug fix.
	Reported at https://github.com/coreutils/coreutils/issues/159

2026-01-03  Pádraig Brady  <P@draigBrady.com>

	tests: chmod: ensure failure upon partial success
	* tests/chmod/partial-fail.sh: Add new test.
	* tests/local.mk: Reference new test.
	Discussed at https://github.com/uutils/coreutils/issues/9790

2026-01-03  oech3  <79379754+oech3@users.noreply.github.com>

	tests: split: ensure directories not replaced
	* tests/split/split-io-err.sh: Add a test case.
	From https://github.com/coreutils/coreutils/pull/158

2026-01-03  Collin Funk  <collin.funk1@gmail.com>

	doc: NEWS: mention du performance improvement on the Lustre file system
	Reported by Tim Day <timday@amazon.com> in
	<https://bugs.gnu.org/80106>.

	* NEWS: Mention the improvement after gnulib commit 578b8d7dc5.

2026-01-02  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest
	* bootstrap: Update using './bootstrap --bootstrap-sync'.
	* tests/sample-test: Adjust to use the single most recent year.

	maint: prefer c_isblank to an equivalent macro
	* src/cksum.c (ISWHITE): Remove macro.
	(bsd_split_3, algorithm_from_tag, split_3): Use c_isblank instead of
	ISWHITE.

	tests: df: don't depend on bash
	* tests/df/no-mtab-status-masked-proc.sh: Invoke $SHELL instead of
	'bash'.

2026-01-01  Collin Funk  <collin.funk1@gmail.com>

	maint: run 'make update-copyright'

2026-01-01  Sylvestre Ledru  <sylvestre@debian.org>

	tests: mv: check broken symlink cross-filesystem move
	Identified here:
	<https://github.com/uutils/coreutils/issues/8586>

	* tests/mv/mv-special-2.sh: Add the check.

2026-01-01  oech3  <79379754+oech3@users.noreply.github.com>

	tests: df: hide /proc without using LD_PRELOAD
	* tests/df/no-mtab-status-masked-proc.sh: A new test similar
	to no-mtab-status.sh but should work with static builds.
	* tests/local.mk: Reference the new test.
	https://github.com/coreutils/coreutils/pull/156

	tests: add LD_PRELOAD free alternative for nproc-quota.sh
	* tests/nproc/nproc-quota-systemd.sh: Add a new root test.
	* tests/local.mk: Reference the new test.

	tests: extend csplit-io-err.sh for directory
	* tests/csplit/csplit-io-err.sh: Add a test case
	to ensure a directory is _not_ replaced.

2025-12-31  Sylvestre Ledru  <sylvestre@debian.org>

	tests: du: check -l (--count-links) without -a flag
	Identified here:
	<https://github.com/uutils/coreutils/issues/9871>

	* tests/du/hard-link.sh: Add the check.

2025-12-30  Collin Funk  <collin.funk1@gmail.com>

	tests: env: check that real-time signals can be ignored
	* tests/env/env-signal-handler.sh: Test that --ignore-signal with no
	options also ignores real-time signals. Test that real-time signals can
	be ignored by explicitly listing them.

2025-12-28  Collin Funk  <collin.funk1@gmail.com>

	tests: kill: check that real-time signals are listed
	* tests/misc/kill.sh: Call getlimits_. Check for RTMIN and RTMAX in the
	output of 'kill -l' if the system defines SIGRTMIN and SIGRTMAX.

	getlimits: print SIGRTMIN and SIGRTMAX
	* src/getlimits.c (SIGRTMIN): Define to zero if signal.h does not define
	this constant.
	(SIGRTMAX): Define to SIGRTMIN - 1 if signal.h does not define this
	constant.
	(main): Print SIGRTMIN and SIGRTMAX.

	maint: commit-msg: add 'getlimits' as a supported tag
	* scripts/git-hooks/commit-msg (@valid): Add getlimits.

2025-12-27  oech3  <79379754+oech3@users.noreply.github.com>

	tests: split: verify operation in the presence of I/O errors
	* tests/split/split-io-err.sh: A new test to verify that with I/O
	errors, we leave existing files but don't continue.
	* tests/local.mk: Reference the new test.

2025-12-27  Pádraig Brady  <P@draigBrady.com>

	tests: check I/O error handling with /dev/full and closed pipes
	* tests/misc/io-errors.sh: Verify that all commands diagnose write
	errors, and handle a closed pipe appropriately.
	* tests/local.mk: Reference the new test.

	sort: fix SIGPIPE handling
	* src/sort.c (main): Don't override handler for SIGPIPE
	(which we did since commit v9.9-34-ge63131b32),
	since we've explicit handling for SIGPIPE.
	Also move ignoring of SIGPIPE until after
	--help and --version are processed.

2025-12-27  oech3  <79379754+oech3@users.noreply.github.com>

	tests: consolidate csplit-io-err tests
	* tests/csplit/csplit-io-err.sh: Replace this LD_PRELOAD test with...
	* tests/csplit/csplit-io-err-2.sh: This more general test,
	that leverages /dev/full.
	* tests/local.mk: Remove tests/csplit/csplit-io-err-2.sh.

2025-12-26  oech3  <79379754+oech3@users.noreply.github.com>

	tests: csplit: check writing to /dev/full
	* tests/csplit/csplit-io-err-2.sh: Add a new test.
	* tests/local.mk: Reference new test.

2025-12-25  Collin Funk  <collin.funk1@gmail.com>

	dd: don't continue copying when ftruncate fails using seek= and of=
	* src/dd.c (main): Reduce the scope of exit_status. Exit immediately if
	ftruncate fails.
	* tests/dd/fail-ftruncate-fstat.sh: New test.
	* tests/local.mk (all_tests): Add the new test.
	* NEWS: Mention the bug fix.

2025-12-25  Pádraig Brady  <P@draigBrady.com>

	doc: document the date(1) bug with empty format directives
	* NEWS: Mention the bug fix.

	build: update gnulib to latest

2025-12-25  Collin Funk  <collin.funk1@gmail.com>

	tests: date: improve locale tests
	* tests/date/date-locale-hour.sh: Test that the default format of 10
	random supported locales is the same as 'locale date_fmt'.

2025-12-22  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure due to ulimit on aarch64
	* tests/cut/cut-huge-range.sh: Add an extra 1MiB headroom,
	which was seen with aarch64.
	Reported at https://bugzilla.redhat.com/2424302

	maint: tests/cut/cut-huge-range.sh: remove stale comment
	* tests/cut/cut-huge-range.sh: expr supports bignums,
	so remove stale comment relating to previous non expr adjustment.

	numfmt: fix dropped custom suffix when failing to parse
	* src/numfmt.c (process_suffixed_number): Restore custom suffix
	upon failure to parse number.
	* tests/numfmt/numfmt.pl: Add test cases.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.debian.org/1094581

2025-12-21  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer enums over macros for sources used for multiple programs
	* src/chown.h (enum chown_modes): New type.
	(CHOWN_CHOWN, CHOWN_CHGRP): Define as an enum instead of a macro.
	* src/chown-chgrp.c (chown_mode): Use "enum chown_modes" instead of
	"int".
	* src/chown-chown.c (chown_mode): Likewise.
	* src/ls.h (enum ls_modes): New type.
	(LS_LS, LS_MULTI_COL, LS_LONG_FORMAT): Define as an enum instead of a
	macro.
	* src/ls-dir.c (ls_mode): Use "enum ls_modes" instead of "int".
	* src/ls-ls.c (ls_mode): Likewise.
	* src/ls-vdir.c (ls_mode): Likewise.
	* src/uname.h (enum uname_modes): New type.
	(UNAME_UNAME, UNAME_ARCH): Define as an enum instead of a macro.
	* src/uname-arch.c (uname_mode): Use "enum uname_modes" instead of
	"int".
	* src/uname-uname.c (uname_mode): Likewise.

2025-12-20  Collin Funk  <collin.funk1@gmail.com>

	doc: prefer UTF-8 characters in texinfo sources
	* doc/coreutils.texi (Introduction): Use ç instead of @,{c}.
	(Character arrays): Use ö instead of @"o. Use Ł instead of @L{}.
	(Formatting file timestamps): Use ä instead of @"a.

2025-12-20  Pádraig Brady  <P@draigBrady.com>

	doc: ls: fix recent typo for -F option in texinfo
	* doc/coreutils.texi (ls invocation): Add a missing hyphen
	that was inadvertently dropped in the recent adjustments.

	tests: runcon: avoid false success
	* tests/runcon/runcon-compute.sh: Ensure runcon runs,
	since the main test is a negative one.

2025-12-19  Pádraig Brady  <P@draigBrady.com>

	doc: split,tac: document $TMPDIR usage
	Following commit v9.3-92-g1b86b70dd
	$TMPDIR is part of the interface and an important behavioral
	characteristic of a command, which should be documented.

	* doc/coreutils.texi (split invocation): Mention $TMPDIR is honored.
	(tac invocation): Likewise.
	* src/split.c (usage): Likewise.
	* src/tac.c (usage): Likewise.

2025-12-17  Collin Funk  <collin.funk1@gmail.com>

	doc: tee: prefer cksum in examples
	* doc/coreutils.texi (tee invocation): Use 'cksum' with '-a sha2' and
	'-a sha3' instead of md5sum and sha1sum in examples.

2025-12-16  Pádraig Brady  <P@draigBrady.com>

	tests: mv: check moving named sockets is supported
	* tests/mv/mv-special-2.sh: Use python to create a named socket,
	and ensure it's copied across file systems.

2025-12-15  Collin Funk  <collin.funk1@gmail.com>

	tests: date: add another locale test case
	On a GNU/Linux system, we have the following:

	    $ LC_ALL=en_US.UTF-8 date -u -d 1:00
	    Sun Dec 14 01:00:00 AM UTC 2025
	    $ LC_ALL=en_US.UTF-8 locale date_fmt
	    %a %b %e %r %Z %Y
	    $ LC_ALL=en_US.UTF-8 locale t_fmt_ampm
	    %I:%M:%S %p

	    $ LC_ALL=nl_NL.UTF-8 date -u -d 1:00
	    zo 14 dec 2025  1:00:00 UTC
	    $ LC_ALL=nl_NL.UTF-8 locale date_fmt
	    %a %e %b %Y %k:%M:%S %Z

	We respect the locales preference for a leading zero or leading space in
	single digit hours.

	* tests/date/date-locale-hour.sh: Check that the locales preference for
	leading zeros or spaces in single digit hours is used.

2025-12-15  Pádraig Brady  <P@draigBrady.com>

	tests: mv: check traversed fifos copy correctly
	* tests/mv/mv-special-1.sh: Add a case also for fifos
	encountered when traversing.

	tests: mv: add timeout protection when moving fifos
	* tests/mv/mv-special-1.sh: Implementations could potentially hang
	interacting with fifos, so wrap with timeout.

2025-12-14  Collin Funk  <collin.funk1@gmail.com>

	doc: dd: document the behavior of conv flags on multibyte characters
	* doc/coreutils.texi (dd invocation): Document the behavior of 'dd' on
	multibyte characters and some unspecified behavior that will be
	documented in a future POSIX release [1].

	[1] https://austingroupbugs.net/view.php?id=1959

2025-12-14  Collin Funk  <collin.funk1@gmail.com>

	tests: ls: use a larger file descriptor limit
	OpenBSD and Alpine Linux /bin/sh cannot handle a file descriptor limit
	of 7.

	* tests/ls/recursive.sh: Create 30 directories and use a file descriptor
	limit of 20. Don't check the output since we have coverage for that
	elsewhere.
	Reported by Bruno Haible.

2025-12-13  Pádraig Brady  <P@draigBrady.com>

	build: reduce size of multi-call binary by reusing cksum logic
	Map md5sum and sha{1,224,256,385,512} to use cksum logic,
	which selects appropriate behavior at runtime, rather than
	separate binaries for each closely related utility.

	$ size src/coreutils  # before
	   text	   data	    bss	    dec	    hex	filename
	1349509	   6812	 619312	1975633	 1e2551	src/coreutils
	$ size src/coreutils  # after
	   text	   data	    bss	    dec	    hex	filename
	1306933	   6748	 619152	1932833	 1d7e21	src/coreutils

	* build-aux/gen-single-binary.sh: Map sha*sum to use cksum.c
	* src/cksum.c: Adjust to behave more like sha*sum,
	when the algorithm to something other than "crc".
	* src/cksum.h: Expose the cksum_algorithm global and enum.
	* src/coreutils-md5sum.c: Set cksum_algorithm and call cksum logic.
	* src/coreutils-sha1sum.c: Likewise.
	* src/coreutils-sha224sum.c Likewise.
	* src/coreutils-sha256sum.c Likewise.
	* src/coreutils-sha384sum.c Likewise.
	* src/coreutils-sha512sum.c Likewise.
	* NEWS: Mention the improvement.

2025-12-12  Pádraig Brady  <P@draigBrady.com>

	doc: expand on shell-escape quoting style
	* doc/coreutils.texi (quotingStyles): Expand on the advantages
	of "shell-escape" quoting, and mention it's the default when
	outputting to a tty. Also mention how it's also useful with
	LC_ALL=C to further disambiguate output.  Also reference the
	separate page detailing various considerations and options
	for file name quoting.  Also move the mention of the default
	quoting style to the top of the page where it's more obvious.

	tests: printf: add case for quoting single quotes
	* tests/printf/printf-quote.sh: Add a test case for
	https://bugs.debian.org/992161 which was fixed with
	gnulib commit v0.1-7339-g07b31a9465

2025-12-12  Collin Funk  <collin.funk1@gmail.com>

	maint: organize tee tests in a subdirectory
	* tests/misc/tee.sh: Moved to tests/tee/tee.sh.
	* tests/local.mk (all_tests): Adjust the file name.

	tests: tee: add a test for --append
	* tests/tee/append.sh: New file.
	* tests/local.mk (all_tests): Add the test.

2025-12-11  Pádraig Brady  <P@draigBrady.com>

	tests: fix recent portability issue with printf
	* tests/sort/sort-locale.sh: Avoid non portable printf \u....
	* cfg.mk (sc_env_printf): Add a new syntax check to flag future cases.

	tests: env: ensure non-utf8 name or value is supported
	* tests/env/env.sh: Add a test case ensuring non-utf8 characters
	in the name or value are supported.

	tests: mv: ensure ownership preserved when copying
	* tests/mv/meta-to-xpart.sh: Add new test.
	* tests/local.mk: Reference new test.

2025-12-11  Collin Funk  <collin.funk1@gmail.com>

	maint: groups: reduce variable scope
	* src/groups.c (main): Declare variables where they are used instead of
	at the start of the function. Convert a comment to GNU style.

	maint: printenv: reduce variable scope
	* src/printenv.c (main): Declare variables where they are used instead
	of at the start of the function. Constify some strings we do not modify.

	maint: rmdir: reduce variable scope
	* src/rmdir.c (remove_parents, main): Declare variables where they are
	used instead of at the start of a block.

	maint: date: reduce variable scope
	* src/date.c (batch_convert, main): Declare variables where they are
	used instead of at the start of the function.

	maint: install: reduce variable scope
	* src/install.c (change_timestamps): Initialize variables where they are
	declared.
	(need_copy, setdefaultfilecon, get_ids, mkancesdirs_safe_wd, main):
	Declare variables where they are used instead of at the start of the
	block.

	maint: cp: reduce variable scope
	* src/cp.c (re_protect): Initialize variables where they are declared.
	(make_dir_parents_private, do_copy, main): Declare variables where they
	are used instead of at the start of the block.

	maint: mv: reduce variable scope
	* src/mv.c (do_move, main): Declare variables where they are used
	instead of at the start of a block.

2025-12-10  Pádraig Brady  <P@draigBrady.com>

	tests: env: add a test for --ignore-signal=PIPE
	* tests/env/env-signal-handler.sh: Add a test for this
	oft interfered with signal.

2025-12-10  Pádraig Brady  <P@draigBrady.com>

	doc: support html post processing in all cases
	Previously the html-local make rule only worked for `make html`.
	Instead add support for `make doc/coreutils.html` or `make web-manual`
	through the use of a makeinfo wrapper.

	* doc/local.mk: Move post processing from here to ...
	* build-aux/makeinfo-wrapper.sh: ... here.
	* cfg.mk: Ensure our wrapper is called with MAKEINFO.
	Also pass --no-node-files so redirection html files
	are not created for each anchor.

2025-12-10  Collin Funk  <collin.funk1@gmail.com>

	doc: printf: mention how to print arguments starting with '-'
	* doc/coreutils.texi (printDash): New macro.
	(printf invocation, yes invocation): Use it.
	Addresses https://bugs.gnu.org/79896

2025-12-09  Pádraig Brady  <P@draigBrady.com>

	doc: fix stale linuxjournal.com link
	* doc/coreutils.texi: Update to working link.
	Fixes https://bugs.gnu.org/79973

2025-12-09  Collin Funk  <collin.funk1@gmail.com>

	doc: html: fix build with parallel make
	* doc/local.mk (html-local): Add html files to prerequisites so they are
	generated before 'sed' is invoked.  Also interate over the already
	populated $(HTMLS) to be more general (to multiple html files),
	and more portable (to non GNU make).

2025-12-08  Pádraig Brady  <P@draigBrady.com>

	tests: fix non-portable use of printf '\x..'
	* tests/dd/conv-case.sh: Use octal instead.
	* tests/ls/hyperlink.sh: Likewise.
	* tests/sort/sort-locale.sh: Likewise.

	doc: fix pdf generation
	* doc/coreutils.texi: Explicitly supply empty arguments to macros,
	as dvi (a required prerequisite to pdf) is more strict in its
	handling of macro arguments.
	* cfg.mk (sc_texi_ensure_empty_option_args): Add a syntax check,
	since this is not verified in the default build.
	Reported by Collin Funk.

2025-12-07  Collin Funk  <collin.funk1@gmail.com>

	maint: env: reduce variable scope
	* src/env.c (extract_varname, parse_signal_action_params)
	(parse_block_signal_params, set_signal_proc_mask)
	(list_signal_handling, main): Declare variables where they are used
	instead of at the start of the function.

	maint: nohup: reduce variable scope
	* src/nohup.c (main): Declare variables where they are used instead of
	at the start of the function.

	maint: sync: reduce variable scope
	* src/sync.c (sync_arg, main): Declare variables where they are used
	instead of at the start of the function.

	maint: pwd: reduce variable scope
	* src/pwd.c (find_dir_entry, robust_getcwd): Declare variables where
	they are used.
	(logical_getcwd, main): Likewise. Constify the result of getenv, since
	the result cannot be modified.

	maint: dirname: reduce variable scope
	* src/dirname.c (main): Declare variables where they are used instead of
	at the start of the function. Prefer idx_t to size_t.

	maint: hostid: reduce variable scope
	* src/hostid.c (main): Declare variables where they are used instead of
	at the start of the function.

	maint: nproc: reduce variable scope
	* src/nproc.c (main): Declare variables where they are used instead of
	at the start of the function.

	maint: whoami: reduce variable scope
	* src/whoami.c (main): Declare variables where they are used instead of
	at the start of the function.

	maint: logname: reduce variable scope
	* src/logname.c (main): Declare variables where they are used instead of
	at the start of the function.

	maint: basename: initialize values while declaring
	* src/basename.c (remove_suffix): Initialize values on the same line as
	their declarations.

2025-12-07  Collin Funk  <collin.funk1@gmail.com>

	shred: use gethrxtime instead of time
	The gethrxtime function uses a monotonic clock if available on the
	system. The effect should be unnoticeable since we print --verbose
	information every 5 seconds, but is more correct and we already do the
	same in 'dd'.

	* src/local.mk (src_shred_LDADD): Add $(GETHRXTIME_LIB).
	* src/shred.c (dopass): Use xtime_t instead of time_t. Use gethrxtime
	instead of time.

2025-12-07  Pádraig Brady  <P@draigBrady.com>

	tests: tac-continue.sh: modernise and always execute as root
	* tests/tac/tac-continue.sh: This test was very awkard to setup,
	and thus always skipped.  Instead move to a root only test
	that creates an almost full partition itself.
	* tests/local.mk: Move test to root only.
	Suggested at https://github.com/uutils/coreutils/pull/9590

2025-12-05  Collin Funk  <collin.funk1@gmail.com>

	pinky: promptly diagnose write errors
	In some cases 'pinky' could run forever until interrupted:

	    $ ln -s /dev/zero ~/.plan
	    $ ln -s /dev/zero ~/.project
	    $ timeout -v 5 pinky -l collin > /dev/full
	    timeout: sending signal TERM to command ‘pinky’

	After this change it will exit upon failing to write to standard output:

	    $ timeout -v 5 ./src/pinky -l collin > /dev/full
	    pinky: write error: No space left on device

	* src/pinky.c: Include fadvise.h, filenamecat.h, full-write.h, and
	ioblksize.h.
	(cat_file): New function.
	(print_entry): Check if standard output has it's error flag set after
	printing a user entry.
	(print_long_entry): Likewise. Use the new cat_file function.
	* NEWS: Mention the improvement.

2025-12-05  Pádraig Brady  <P@draigBrady.com>

	doc: html: reference each command option
	* doc/coreutils.texi: Add anchors to each command option.
	This also has the advantage of removing over 1000 lines,
	through the use of macros.

	doc: html: support defined anchors for command options
	* doc/coreutils.texi (optAnchor): A new macro to output a
	referencable anchor, called from ...
	(optItem): ... here; a new macro to output all index entries
	for each option item.
	(optZero,optZeroTerminated): Show an example of the adjustment
	done to each option description.
	* doc/local.mk (html-local): Post-process the texinfo generated HTML
	(`make html`) to remove our "-option" tag, and replace all
	escaped _002d with a standard hyphen, which is fine in URLs.

2025-12-05  Collin Funk  <collin.funk1@gmail.com>

	tests: ls: check that 'ls -R' doesn't run out of file descriptors
	* tests/ls/recursive.sh: Add a test where the file descriptor limit is
	less than the number of directories we visit recursively.

2025-12-04  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	Gnulib issymlinkat change reported by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2025-12/msg00044.html
	* bootstrap: Update from Gnulib.
	* src/copy.c: Include issymlinkat.h, not issymlink.h.

2025-12-03  Collin Funk  <collin.funk1@gmail.com>

	maint: organize expand and unexpand tests in a subdirectory
	* tests/misc/expand.pl: Move to tests/expand/expand.pl.
	* tests/misc/unexpand.pl: Move to tests/unexpand/unexpand.pl.
	* tests/local.mk (all_tests): Adjust file names.

	tests: expand, unexpand: add a test for bounded memory operation
	* tests/expand/bounded-memory.sh: New file.
	* tests/unexpand/bounded-memory.sh: New file.
	* tests/local.mk (all_tests): Add the tests.

	maint: don't use == on bools
	* src/df.c (filter_mount_list): Adjust comment.
	* src/sync.c (sync_arg): Don't use == on bools.
	* src/pr.c (init_parameters): Likewise.

2025-12-03  Collin Funk  <collin.funk1@gmail.com>

	timeout: print the signal number 0 instead of EXIT
	POSIX.1-2024 added sig2str but leaves the behavior when called with
	signal 0 unspecified. FreeBSD 15.0 does not return the signal name EXIT
	like Gnulib's version causing a test failure. This fixes that and
	changes the behavior to print 0 instead of EXIT, to avoid confusion when
	the program does not exit.

	* NEWS: Mention the change.
	* src/timeout.c (cleanup): Use snprintf instead of sig2str if the signal
	is 0.
	* tests/timeout/timeout.sh: Updated the expected output.

2025-12-02  Pádraig Brady  <P@draigBrady.com>

	timeout: prioritize "timed out" exit status
	* src/timeout.c (cleanup): Reset the default exit status
	to EXIT_TIMEDOUT, if we have in fact received an ALARM.
	Otherwise we would exit with status EXIT_CANCELED if
	there was an issue writing --verbose output for example.
	This also ensures a consistent exit status with ASAN enabled,
	as with ASAN stderr is not explicitly closed by gnulib's
	close_stdout handler.

	tests: ls --hyperlink: add more escaping test cases
	* tests/ls/hyperlink.sh: Add tests for anchors, colons,
	utf8, and invalid utf8 characters.

2025-12-02  Collin Funk  <collin.funk1@gmail.com>

	tests: cut: add a test for bounded memory operation
	* tests/cut/bounded-memory.sh: New file.
	* tests/local.mk (all_tests): Add the test.

2025-12-01  Pádraig Brady  <P@draigBrady.com>

	tests: enable mkdir/writable-under-readonly.sh
	* tests/mkdir/writable-under-readonly.sh: Address FIXMEs and enable.
	Addresses https://github.com/coreutils/coreutils/issues/137

	tests: mv: add checks for cross device handling of special files
	* tests/mv/mv-special-2.sh: Add test to ensure we preserve
	sparse files, character devices, symlinks, when moving across
	file system boundaries.
	Addresses https://github.com/coreutils/coreutils/issues/136

	tests: rm: avoid usually skipped non root test
	* tests/rm/fail-eperm.xpl: Remove this usually skipped non-root test.
	* tests/rm/fail-2eperm.sh: Add the test to this root test instead.
	* tests/local.mk: Remove the reference to *.xpl.

2025-11-30  Collin Funk  <collin.funk1@gmail.com>

	doc: du: mention the behavior when both --threshold and --total are used
	* doc/coreutils.texi (du invocation): Mention that --threshold has no
	effect on the grand total calculated when --total is used.
	Addresses https://bugs.gnu.org/71309

2025-11-30  Pádraig Brady  <P@draigBrady.com>

	tests: copy: reinstate check for symlink xattr copying
	* tests/cp/cp-mv-enotsup-xattr.sh: Use two xattr supporting file
	systems, to verify the propagation of xattrs.

	tests: avoid skip due to missing nouser_xattr support
	* tests/cp/cp-mv-enotsup-xattr.sh: The nouser_xattr option
	is not supported by ext2 since about 2022.  Instead use
	ramfs to ensure xattrs are not supported.  We also remove
	part of the test that relied on partial xattr support.
	Fixes https://github.com/coreutils/coreutils/issues/135

2025-11-29  Pádraig Brady  <P@draigBrady.com>

	maint: commit-msg: remove "digest" as a supported tag
	* scripts/git-hooks/commit-msg: We recently renamed the digest module
	to cksum, so no longer support "digest" as a commit tag.

	maint: commit-msg: fix terminal corruption when re-editing
	* scripts/git-hooks/commit-msg: Explicitly connect the editor to
	/dev/tty, so that it can restore terminal settings appropriately.

2025-11-29  Collin Funk  <collin.funk1@gmail.com>

	maint: remove note about old NEWS files
	* NEWS: Remove mention about old fileutils, textutils, and sh-utils NEWS
	files that were removed in commit 2c64bc872 (doc: only distribute 5
	years of ChangeLogs, 2017-01-31).
	* cfg.mk (old_NEWS_hash): Run 'make update-NEWS-hash'.

2025-11-29  Pádraig Brady  <P@draigBrady.com>

	test: re-enable tests that had a false requirement on coreutils' kill
	Recently we've not built our kill command by default,
	so reduce test dependence on that.

	* tests/sort/sort-compress-proc.sh: `kill -l [exit_status]` is well
	supported, and is a POSIX requirement.
	* tests/timeout/timeout.sh: There were actually no kill invocations
	in this test at all.

2025-11-29  Pádraig Brady  <P@draigBrady.com>

	timeout: ensure we terminate command upon abnormal exit
	* src/timeout.c (main): Use PR_SET_PDEATHSIG to ensure the
	child is terminated even if the parent terminates abnormally.
	* tests/timeout/timeout-group.sh: Add a case to ensure sending
	SIGKILL results in the termination of the monitored command.
	* NEWS: Mention the improvement.

2025-11-29  Collin Funk  <collin.funk1@gmail.com>

	tests: tac: test --separator with invalid UTF-8
	* tests/tac/tac-locale.sh: Test that a string containing invalid UTF-8
	characters can be used for --separator.

2025-11-28  Collin Funk  <collin.funk1@gmail.com>

	du: add the short option -A corresponding to --apparent-size
	The --apparent-size option to 'du' was added in
	coreutils-4.5.8 (2003). FreeBSD 8.0 (2009) added the same functionality
	under the short option -A. This long option previously had no short
	option, so this patch adds -A to be compatible with FreeBSD.

	* NEWS: Mention the new short option.
	* doc/coreutils.texi: Document the short option.
	* src/du.c (usage): Likewise.
	(APPARENT_SIZE_OPTION): Remove definition.
	(EXCLUDE_OPTION): Define to CHAR_MAX + 1.
	(long_options): Use the -A short option for --apparent-size.
	(main): Likewise.
	* tests/du/apparent.sh: Test that '-b', '-A -B 1', and
	'--apparent-size --block-size 1' function the same.

2025-11-28  Collin Funk  <collin.funk1@gmail.com>

	test: tac: test with non-ASCII values for --separator
	* tests/tac/tac-locale.sh: New test.
	* tests/local.mk (all_tests): Add it.

2025-11-28  Pádraig Brady  <P@draigBrady.com>

	doc: touch: man: state in summary that files are created
	* man/touch.x: Creating files is core functionality of touch(1),
	so state this in the summary, so that apropos can be used
	to search for file creation functionality.

	tests: prefer ext4 casefold for case insensitive tests
	* tests/mv/hardlink-case.sh: Try both ext4 casefold and hfsplus,
	as ext4 has better availability.
	Suggested at https://github.com/coreutils/coreutils/issues/133

2025-11-27  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer mcel_eq to mcel_cmp
	* gnulib: Update submodule to latest.
	* bootstrap: Run ./bootstrap --bootstrap-sync
	* src/expr.c (mbs_logical_cspn): Use mcel_eq instead of mcel_cmp.
	* src/join.c (eq_tab, main): Likewise.

	doc: date: mention --file=- reads from standard input
	* src/date.c (usage): Mention that standard input will be read if
	DATEFILE is "-".
	Reported at https://bugs.debian.org/1100395

	doc: du, sort, wc: adjust description of --files0-from
	* src/du.c (usage): Remove an unnecessary "then".
	* src/wc.c (usage): Likewise. Add a comma after "-".
	* src/sort.c (usage): Likewise. Adjust the indentation to match du and
	wc.

2025-11-26  Pádraig Brady  <P@draigBrady.com>

	doc: fold: clarify operation of -s in --help
	* src/fold.c (usage): The description of -s was unclear:
	- State that we can also break within words.
	- State that we split on blanks not spaces.
	- State that we split after the blank, not before.

2025-11-25  Pádraig Brady  <P@draigBrady.com>

	build: kill(1), uptime(1): don't install by default
	* build-aux/gen-lists-of-programs.sh: kill and uptime are not installed
	by arch, debian, fedora, suse at least, so add to disabled list.
	Fixes https://github.com/coreutils/coreutils/issues/132
	* NEWS: Mention the build change.

2025-11-23  Collin Funk  <collin.funk1@gmail.com>

	doc: cksum: document secure hash algorithms
	* doc/coreutils.texi (cksum general options): Mention hash algorithms
	that are currently considered secure against malicious tampering.

2025-11-23  Paul Eggert  <eggert@cs.ucla.edu>

	du,ls: don’t modify getenv strings
	Fix du and ls to conform to the POSIX getenv spec,
	which says you can’t modify strings returned by getenv
	unless you put the string there directly, or used putenv.
	This portability bug was found by strict C23 checking
	using qualifier-generic functions.
	* bootstrap.conf (gnulib_modules): Add xmemdup0.  Sort.
	* src/du.c (main):
	* src/ls.c (decode_switches):
	Don’t modify the string that getenv returns.
	Instead, use xmemdup0 if needed, and include xmemdup0.h.

	numfmt: port to C23 qualifier-generic fns
	* src/numfmt.c (mbsmbchr): Cast results of qualifier-generic functions
	to char *, to port to strict C23.

	build: update gnulib submodule to latest

	cat: refactor struct stat usage
	* src/cat.c (main): Simplify by keeping input and output
	struct stat in separate local vars.

2025-11-23  Pádraig Brady  <P@draigBrady.com>

	maint: use cksum specific checksums in release announcement
	* cfg.mk: Use --cksum-checksums with announce-gen.

	doc: cat -E: mention ^M$ output possibility
	* src/cat.c (usage): Document the ^M$ combination
	which is output for \r\n line endings.
	Fixes https://github.com/coreutils/coreutils/issues/130

2025-11-22  Pádraig Brady  <P@draigBrady.com>

	dd,ls,sort: prefer sigaction over signal
	sigaction() is generally available and if not
	provided by the sigaction gnulib module.

	* src/dd.c [SA_NOCLDSTOP]: Delete workarounds.
	* src/ls.c: Likewise.
	* src/sort.c: Likewise.
	Suggested by Collin Funk.

2025-11-22  Pádraig Brady  <P@draigBrady.com>

	csplit,ls,sort: handle a more complete set of signals
	* src/term-sig.h: A new file defining a TERM_SIG array signals.
	* src/local.mk: Reference the new file.
	* src/csplit.c: Likewise.
	* src/sort.c: Likewise.
	* src/timeout.c: Likewise.
	* src/ls.c: Likewise.  Also handle SIGTSTP separately.
	* NEWS: Mention the improvement.

2025-11-22  Pádraig Brady  <P@draigBrady.com>

	timeout: honor ignored signal dispositions
	This behavior was depended on in our trap_sigpipe_or_skip_ helper,
	and now that we're handling all terminating signals, we should
	consistently honor their ignored signal dispositions.

	* NEWS: Mention the change in behavior, especially in regard
	to shell background jobs.
	* src/timeout.c (sig_needs_handling): A new helper that return TRUE,
	for --signal, SIG_ALRM, or non ignored signals.
	(cleanup_install): Filter handled signals with the helper.
	(block_cleanup_and_chld): Likewise.
	* tests/timeout/timeout-group.sh: Adjust to use the now required
	`env --default-signal=...` wrapper to reset (auto) ignored signals.
	Also change the termination signal from SIGINT to SIGUSR1
	to generalize the test signals not specially handled by the shell,
	and newly handled by timeout(1).
	* tests/timeout/timeout.sh: Add a test case for SIGPIPE
	to ensure the ignored signal disposition is honored.

2025-11-21  Pádraig Brady  <P@draigBrady.com>

	timeout: handle all terminating signals
	* src/timeout.c (term_sig): A new global list of all signals
	whose default disposition is to terminate the process.
	(install_cleanup): Iterate over the TERM_SIG list, rather than
	installing the handler for a specific subset.
	(block_cleanup_and_chld): Likewise.
	* tests/timeout/timeout.sh: Add a test case for SIGPIPE.
	* NEWS: Mention the bug fix.

2025-11-20  Pádraig Brady  <P@draigBrady.com>

	build: remove explicit link to CoreFoundation libs on macOS
	* src/local.mk: No longer explicitly depend on @INTL_MACOS_LIBS@
	as they're no longer implicitly referenced (in LIBINTL) without gettext.
	The old dependency was through localename-unsafe, specifically
	date, du through show-date() (fprintftime), and
	ls, pr, stat, uptime through strftime().
	gnulib commit v1.0-2439-gff4b084a68 removed the localename-unsafe
	dependency on macOS.

	build: update gnulib submodule to latest

2025-11-20  Collin Funk  <collin.funk1@gmail.com>

	maint: add coreutils_hardlinks to src/.gitignore
	* src/.gitignore (coreutils_hardlinks): Ignore this file. It is an empty
	file created when --enable-single-binary=hardlinks is used to ensure
	hardlinks are created after the multicall binary.

	maint: prefer MAYBE_UNUSED to void casts
	* src/copy.c (clone_file, set_author): Use MAYBE_UNUSED in the prototype
	instead of void casting the arguments.

2025-11-19  Pádraig Brady  <P@draigBrady.com>

	build: support --enable-single-binary=hardlinks
	* Makefile.am: Use ln rather than $(LN_S) for hardlinks.
	* configure.ac: Accept --enable-single-binary=hardlinks.
	* man/local.mk: In hardlink mode, explicitly add the
	hardlink creation rule to mandeps.  Given the automake
	generated dependency chain, this ensures that the hardlinks
	are created _after_ the multicall binary, with `make all`
	or `make check` etc.
	* src/local.mk: Define the new src/coreutils_hardlinks rule,
	and only depend on src/coreutils_{symlinks,shebangs} if
	in those modes, so that hardlinks are created _after_
	the multicall binary, and other link types before.
	* NEWS: Mention the new feature.
	Addresses https://github.com/coreutils/coreutils/issues/129

2025-11-18  Collin Funk  <collin.funk1@gmail.com>

	tests: check that mknod, mkfifo, and mkdir handle comma-separated modes
	* tests/misc/mknod.sh: Test that mknod, mkfifo, and mkdir parse
	comma-separated mode strings.

2025-11-18  Sylvestre Ledru  <sylvestre@debian.org>

	tests: install supports comma-separated mode strings
	Identified here:
	<https://github.com/uutils/coreutils/pull/9298>

	* tests/install/basic-1.sh: Add the check.

2025-11-18  Collin Funk  <collin.funk1@gmail.com>

	maint: use C99 initialization syntax for single-variable 'for' loops
	* src/chroot.c (parse_additional_groups): Declare variable in the 'for'
	clause.
	* src/comm.c (compare_files): Likewise.
	* src/cp.c (re_protect): Likewise.
	* src/csplit.c (save_buffer, find_line, write_to_file)
	(split_file, main): Likewise.
	* src/dd.c (apply_translations, translate_buffer)
	(copy_with_block, main): Likewise.
	* src/df.c (selected_fstype, excluded_fstype, filter_mount_list)
	(last_device_for_mount, get_device, get_point, get_all_entries)
	(main): Likewise.
	* src/fmt.c (copy_rest, get_prefix, fmt_paragraph, put_paragraph)
	(put_word): Likewise.
	* src/fold.c (main): Likewise.
	* src/head.c (elide_tail_bytes_pipe, main): Likewise.
	* src/install.c (main): Likewise.
	* src/join.c (prfields, join, main): Likewise.
	* src/kill.c (list_signals): Likewise.
	* src/ls.c (main, decode_switches, parse_ls_color, patterns_match):
	Likewise.
	* src/operand2sig.c (operand2sig): Likewise.
	* src/pathchk.c (no_leading_hyphen, validate_file_name): Likewise.
	* src/pr.c (char_to_clump): Likewise.
	* src/printenv.c (main): Likewise.
	* src/ptx.c (initialize_regex, digest_break_file)
	(find_occurs_in_text, print_field): Likewise.
	* src/remove.c (mark_ancestor_dirs): Likewise.
	* src/seq.c (print_numbers): Likewise.
	* src/shred.c (do_wipefd, main): Likewise.
	* src/sort.c (cleanup, inittables, key_warnings, mergefps)
	(check_ordering_compatibility, main): Likewise.
	* src/split.c (closeout): Likewise.
	* src/stat.c (find_bind_mount, print_it, format_to_mask): Likewise.
	* src/stdbuf.c (set_program_path): Likewise.
	* src/stty.c (apply_settings, display_changed, display_all)
	(recover_mode, sane_mode): Likewise.
	* src/system.h (stzncpy): Likewise.
	* src/tail.c (pipe_lines): Likewise.
	* src/tee.c (tee_files): Likewise.
	* src/tr.c (look_up_char_class, get_spec_stats): Likewise.
	* src/users.c (list_entries_users): Likewise.

2025-11-17  Pádraig Brady  <P@draigBrady.com>

	build: fix make dist failure
	* src/local.mk: s/crc.h/cksum_crc.h/.
	Reported by Bruno Haible.

	tests: use tail --debug to determine inotify support
	* init.cfg (require_inotify_supported_): A new function that
	indicates inotify support for a file in the current directory,
	using tail --debug, rather than awkward strace checks etc.
	* tests/tail/inotify-dir-recreate.sh: Call require_inotify_supported_.
	 tests/tail/inotify-only-regular.sh: Likewise.
	 tests/tail/inotify-race.sh: Likewise.
	 tests/tail/inotify-race2.sh: Likewise.

	tail: add --debug to report the --follow implementation
	* doc/coreutils.texi (tail invocation): Describe --debug.
	* src/tail.c (tail_forever, tail_forever_inotify): Output
	which --follow implementation is being used.
	* tests/tail/debug.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.

2025-11-17  Collin Funk  <collin.funk1@gmail.com>

	maint: convert remove a K&R declaration
	This function is hidden unless EVAL_TRACE is defined for debugging.

	* src/expr.c (trace): Convert to a prototype instead of K&R definition
	to avoid -Werror=strict-prototypes. Make the argument const to avoid
	-Werror=discarded-qualifiers.

2025-11-16  Bernhard Voelker  <mail@bernhard-voelker.de>

	du: document the TIME_STYLE env variable in usage
	The impact of the TIME_STYLE environment variable on du(1) was only
	documented in the Texinfo manual.  To avoid surprises for users,
	also mention TIME_STYLE in the usage text, i.e., for --help and man.
	Organize similar as in ls(1), but as du(1) has slightly different
	behavior it would be hard to share the translation.

	* src/du.c (usage): Shorten the description of --time-style, and refer
	to an additional --time-style / TIME_STYLE description below.

2025-11-16  Pádraig Brady  <P@draigBrady.com>

	tests: verify we document all supported options in --help
	* tests/misc/getopt_vs_usage.sh: A new test which checks the
	converse of usage_vs_getopt.sh
	* tests/local.mk: Reference the new test.

	maint: tag supported options not documented in --help

	maint: rearrange cksum modules so main is in cksum.c
	* src/cksum.c: -> src/cksum_crc.c
	* src/cksum.h: -> src/cksum_crc.h
	* src/digest.c: -> src/cksum.c
	* src/local.mk: Adjust accordingly.
	* cfg.mk: Likewise.
	* po/POTFILES.in: Likewise.
	* src/cksum_avx2.c: Likewise.
	* src/cksum_avx512.c: Likewise.
	* src/cksum_pclmul.c: Likewise.
	* src/cksum_vmull.c: Likewise.

	wc: fix missing documentation for the --debug option
	* doc/coreutils.texi (wc invocation): Desscribe --debug.
	* src/wc.c (usage): Likewise.
	* NEWS: Mention the bug fix.

2025-11-15  Sylvestre Ledru  <sylvestre@debian.org>

	tests: install should ignore umask
	Identified here:
	<https://github.com/uutils/coreutils/pull/9254>

	  * tests/install/basic-1.sh: Add the check.

2025-11-15  Collin Funk  <collin.funk1@gmail.com>

	tests: pr: add a test for bounded memory operation
	* tests/pr/bounded-memory.sh: New file.
	* tests/local.mk (all_tests): Add the test.

2025-11-14  Collin Funk  <collin.funk1@gmail.com>

	tests: dd: add tests for conv=lcase and conv=ucase
	* tests/dd/conv-case.sh: New test.
	* tests/local.mk (all_tests): Add it.

2025-11-14  Pádraig Brady  <P@draigBrady.com>

	doc: shred: clarify what --verbose outputs
	* doc/coreutils.texi (shred invocation): Give more details on what
	--verbose outputs, to give some indication of its utility.
	* src/shred.c (usage): Likewise.  Also since we're changing the string,
	split out translations to give translators more granular translations.

2025-11-13  Collin Funk  <collin.funk1@gmail.com>

	tests: test: add test cases for -ef
	* tests/test/test-file.sh: Check that -ef works as expected on files,
	symbolic links, and hard links.

2025-11-12  Collin Funk  <collin.funk1@gmail.com>

	maint: fix a typo in comments
	* tests/date/reference.sh: Fix typo; s/modiication/modification.

	tests: test: add test cases for -nt and -ot
	* tests/test/test-file.sh: Check that -nt and -ot work properly when
	files may or may not exist.

2025-11-12  Pádraig Brady  <P@draigBrady.com>

	sort: avoid pthread calls with --parallel=1
	Before this change there were the following unneeded pthread calls:

	  $ seq 1e6 | ltrace -c -e 'pthread*' sort --parallel=1 | wc -l
	  % time     seconds  usecs/call     calls      function
	  ------ ----------- ----------- --------- --------------------
	   39.13    0.031757          67       468 pthread_mutex_lock
	   37.96    0.030811          65       468 pthread_mutex_unlock
	   13.17    0.010691          65       162 pthread_cond_signal
	    2.15    0.001747          64        27 pthread_mutex_destroy
	    2.00    0.001620          60        27 pthread_mutex_init
	    0.70    0.000565          62         9 pthread_cond_destroy
	    0.64    0.000518          57         9 pthread_cond_init
	  ------ ----------- ----------- --------- --------------------
	  100.00    0.081159                  1170 total

	* src/sort.c (sort): Avoid merge tree overhead when single threaded.

2025-11-12  Pádraig Brady  <P@draigBrady.com>

	md5sum: fix --text with the MSYS2 runtime
	Note the use of "rt" is non-standard, but we're restricting
	its use here to systems that define O_BINARY, which should
	invariably support "rt" mode.

	* src/digest.c (): Where significant, explicitly use "rt" mode
	with --text, as MSYS2 defaults to binary mode for fopen'd files
	(though not for standard streams).
	* NEWS: Mention the bug fix.
	Fixes https://github.com/coreutils/coreutils/issues/123

2025-11-12  Pádraig Brady  <P@draigBrady.com>

	maint: fix comment re PRLFS' remoteness
	* src/stat.c (human_fstype): prlfs is used in a context of
	separate host and guest OS, so should be treated as remote always.

	tests: env --argv0: fix false failure with symlinked single binary
	* tests/env/env.sh: Always pass --coreutils-prog=true so that the
	program to run can be determined with --enable-single-binary=symlinks.
	Also actually verify the expected verbose output.
	Reported by the Alpine Linux project.

2025-11-11  Collin Funk  <collin.funk1@gmail.com>

	maint: fix a comment in the generated src/fs-is-local.h file
	Reported by Bruno Haible in
	<https://lists.gnu.org/r/coreutils/2025-11/msg00113.html>.

	* src/extract-magic ($magic_comment): Mention that the function returns
	1 if the file system is local and 0 if it is remote.

2025-11-11  Pádraig Brady  <P@draigBrady.com>

	tests: add tests for locale ordering
	* tests/sort/sort-locale.sh: Check sort,ls have the same (non C) order.
	* tests/local.mk: Reference the new test.

2025-11-10  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.9
	* NEWS: Record release date.

2025-11-10  Collin Funk  <collin.funk1@gmail.com>

	nice: clamp the niceness correctly on GNU/Hurd
	* NEWS: Mention the bug fix.
	* src/nice.c (MIN_ADJUSTMENT): Set to 0 on the Hurd with glibc ≤ 2.42.
	(MAX_ADJUSTMENT): Set to (2 * NZERO - 2) on the Hurd with glibc ≤ 2.42.
	(main): Clamp the niceness to be greater or equal to MIN_ADJUSTMENT and
	less than or equal to MAX_ADJUSTMENT.
	* tests/nice/nice.sh: Add some tests for the Hurd's ranges.

2025-11-08  Collin Funk  <collin.funk1@gmail.com>

	tests: tail: avoid a test failure on GNU/Hurd
	* tests/tail/tail-c.sh: Allow 'tail -c 4096 /dev/urandom' to run forever
	on GNU/Hurd since lseek fails with ESPIPE.

2025-11-08  Pádraig Brady  <P@draigBrady.com>

	chcon: fix memory leak in error path
	* src/chcon.c (change_file_context): If compute_context_from_mask fails,
	free the previously allocated file_context.
	Fixes https://bugs.gnu.org/79780

	tests: avoid false failure due to small timeout
	* tests/tail/tail-c.sh: Tests that fail after a timeout
	should use as least 10s to avoid intermittent failures
	on slow/loaded hosts.

2025-11-08  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest

2025-11-07  Pádraig Brady  <P@draigBrady.com>

	install: fix crash with --strip and large $PATH on ppc and sparc
	* gnulib: Update to the latest gnulib to pull in the fix
	(v1.0-2406-g89f63027de) to allocate the $PATH processing memory
	before the vfork call, which is required on ppc and sparc.
	* tests/install/basic-1.sh: Ensure posix_spawnp() suports a large $PATH,
	which needs careful handling with vfork() as detailed in gnulib.

2025-11-07  Pádraig Brady  <P@draigBrady.com>

	doc: cksum: clarify support of --text and --binary
	Make the documentation more accurate following v9.3-80-g5e1e0993b

	* doc/coreutils.texi (cksum common options): State that --text and
	--binary are actually supported, but only to support emulation
	of the legacy utils.

2025-11-07  Collin Funk  <collin.funk1@gmail.com>

	tests: wc: protect against a hang on GNU/Hurd
	Reported by Bruno Haible in
	<https://lists.gnu.org/r/coreutils/2025-11/msg00051.html>.

	* tests/wc/wc-total.sh: Skip a test that would exhaust memory on
	GNU/Hurd.

2025-11-05  Pádraig Brady  <P@draigBrady.com>

	gnulib: update to latest
	* NEWS: Mention the nproc build fix for older Android.

2025-11-05  Collin Funk  <collin.funk1@gmail.com>

	doc: mention nanosecond decimal points with --iso-8601=ns
	Many people are used to seeing ISO 8601 dates using a period separating
	seconds and nanoseconds. This behavior seems to be worth documenting
	given the bug reports:
	https://bugs.gnu.org/63119
	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118970

	* doc/coreutils.texi (Options for date): Mention that
	'date --iso-8601=ns' uses a comma as a separator, following the
	preference of ISO 8601. Give an example of how to get an ISO 8601 date
	with a period separator.

2025-11-04  Pádraig Brady  <P@draigBrady.com>

	maint: adjust lseek_copy to handle non zero offsets
	* src/copy-file-data.c (lseek_copy): hole_start is initialized
	only when ext_start == ipos.
	(infer_scantype): Update the hole_start initialization to
	the more logically correct POS, even though that init
	is only needed to suppress a -Wmaybe-uninitialized warning.
	Note gcc 15.2 at least doesn't seem to need that suppression.

2025-11-04  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: avoid skipping of LD_PRELOAD based df tests
	It was seen that gnulib's read_file_system_list may use fopen instead
	of open.  Adjust the df(1) tests to replace both library functions.

	* tests/df/no-mtab-status.sh: Change the shared library code invoked
	via LD_PRELOAD to override both fopen and open.  While at it, perform
	varargs processing only when path is not "/proc/self/mountinfo".
	* tests/df/skip-duplicates.sh: Likewise.

2025-11-04  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: avoid skipping by fixing build of shared libraries
	Two df(1) tests were skipped (since commit ee367bd38dac), because
	the build of the shared library in those tests failed.

	  + gcc -Wall -shared --std=gnu99 -fPIC -O2 k.c -o k.so -ldl
	  k.c: In function 'open':
	  k.c:37:7: error: implicit declaration of function 'streq'; did you \
	  mean 'strsep'? [-Wimplicit-function-declaration]
	     37 |   if (streq (path, "/proc/self/mountinfo"))
	        |       ^~~~~
	        |       strsep

	Gnulib streq is not available in the tests.

	* tests/df/no-mtab-status.sh: Replace "streq" by "0==strcmp" in the
	shared library source.
	* tests/df/skip-duplicates.sh: Likewise.

2025-11-04  Collin Funk  <collin.funk1@gmail.com>

	tests: date: check that write errors are promptly diagnosed
	This improvement is due to changes to Gnulib's fprintftime module.

	* NEWS: Mention the improvement.
	* src/getlimits.c (OFF64_T_MAX, OFF64_T_MIN): New macros.
	(main): Print them.
	* tests/misc/write-errors.sh: Call getlimits_. Add a date invocation.

2025-11-03  Paul Eggert  <eggert@cs.ucla.edu>

	doc: squashfs issue to be squashed in Linux 6.18

2025-11-03  Pádraig Brady  <P@draigBrady.com>

	tests: truncate: ensure negative args not parsed as options
	* tests/truncate/truncate-parameters.sh: Add a test case.

	date: avoid a duplicated write error diagnotic
	* src/show-date.c (show_date): Only show the fprintftime() diagnostic
	if a further diagnostic will not be shown.

	date: translate/clarify recent error message
	* src/show-date.c (show_date): Flagged by syntax-check.

	date: promptly diagnose write errors with --file
	* src/date.c (batch_convert): Check error state of stdout
	after each date is processed.
	* tests/misc/write-errors.sh: Add a test case.

2025-11-02  Collin Funk  <collin.funk1@gmail.com>

	tests: stty: filter out ispeed and ospeed from boolean options
	* tests/stty/stty-pairs.sh: Also ignore lines starting with ispeed and
	ospeed.
	* tests/stty/stty.sh: Likewise.
	Reported by Bernhard Voelker.

2025-11-02  Paul Eggert  <eggert@cs.ucla.edu>

	date: diagnose fprintftime failure
	* src/show-date.c (show_date): Diagnose fprintftime failure,
	as it need not be an output error.

	pr: improve nstrftime failure check
	* src/pr.c (init_header): Do not report an nstrftime EOVERFLOW
	error as memory exhaustion.  Instead, output the time as an
	integer.  Also, work even if nstrftime (nullptr, SIZE_MAX, ...)
	would return PTRDIFF_MAX which means adding 1 would overflow..

	ls: better nstrftime failure check
	* src/ls.c (print_long_format): Streamline the checking
	for failure of nstrftime.

	build: update gnulib submodule to latest

2025-11-01  Collin Funk  <collin.funk1@gmail.com>

	tests: date: avoid test failure on NetBSD
	* tests/date/date-tz.sh: Allow date to fail with large values for TZ
	since NetBSD's tzalloc function limits them to 256 bytes.

2025-11-01  Pádraig Brady  <P@draigBrady.com>

	build: reduce explicit dependencies on macOS CoreFoundation
	* src/local.mk: Revert v9.7-322-gc2e1816a5, instead relying
	on the more focused v9.8-79-g532cd66af.  When built with
	--disable-nls on macOS this will result in only some commands
	being linked with INTL_MACOSX_LIBS, thus resulting in env(1)
	at least not setting a __CF_USER_TEXT_ENCODING envirnoment variable.

2025-11-01  Grisha Levit  <grishalevit@gmail.com>

	build: fix macOS build without libintl
	A more precise fix than commit v9.7-322-gc2e1816a5

	* configure.ac (USE_NLS): new AM_CONDITIONAL.
	* src/local.mk: add @INTL_MACOSX_LIBS@ to <prog>_LDADD that need it.

2025-11-01  Bruno Haible  <bruno@clisp.org>

	maint: ln: eliminate a clang -Wformat-extra-args warning
	* src/ln.c (do_link): Don't pass unused arguments to error().
	Don't use "%.0s" to consume a string argument without printing it.

	maint: ls: adjust to gnulib nstrftime changes
	* src/ls.c (align_nstrftime): Change return type to ptrdiff_t.
	(print_long_format): Treat a negative return value from align_nstrftime
	as failure.

2025-11-01  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: update to latest

	copy: be more defensive/restrictive with posix_fadvise
	* src/copy-file-data.c (copy_file_data): Only give the
	POSIX_FADV_SEQUENTIAL hint when we _know_ we'll definitely
	use a read/write loop to copy the data.  Also only apply
	the hint to the whole file, as we've seen OpenZFS at least
	special case that.
	(sparse_copy): Update stale comment.

	copy: don't avoid copy-offload upon SEEK_HOLE indicating non-sparse
	* src/copy-file-data.c (infer_scantype): Fall back to a plain copy
	if SEEK_HOLE indicates non-sparse, as zero copy avoids copy offload.
	This was seen with transparently compressed files on OpenZFS.
	* tests/cp/sparse-perf.sh: Add a test case even though it might
	only trigger on compressed file systems that don't support reflink.
	* NEWS: Mention the bug fix.
	Addresses https://github.com/coreutils/coreutils/issues/122

	copy: avoid posix_fadvise bypassing copy offload behavior
	* src/copy-file-data.c (): pass 0 to posix_fadvise to indicate to EOF.
	coreutils 9.8 used OFF_T_MAX instead, which triggered OpenZFS 2.2.2
	at least to synchronously (decompress and) populate the page cache.
	Addresses https://github.com/coreutils/coreutils/issues/122

2025-11-01  Collin Funk  <collin.funk1@gmail.com>

	timeout: use fork and execvp instead of posix_spawn
	* NEWS: Remove timeout from the list of programs that use posix_spawn.
	* bootstrap.conf (gnulib_modules): Remove posix_spawnattr_setsigmask.
	* src/timeout.c: Don't include spawn.h.
	(main): Use fork and execvp instead of posix_spawn.

	This reverts commit dac96ce3e3a2424919fea6a17978b6e91e575d86.

2025-10-31  Pádraig Brady  <P@draigBrady.com>

	doc: NEWS: mention that sort --compress=script needs a shebang
	* NEWS: Mention that we don't fall-back to executing /bin/sh <script>
	for malformed scripts that don't start with #!..., or any executable
	that returns ENOEXEC in general.

2025-10-31  Bruno Haible  <bruno@clisp.org>

	sort: optimize the lookups of the --compress-program
	* src/sort.c (get_resolved_compress_program): New function.
	(pipe_child): Use it instead of calling find_in_given_path each time.

2025-10-31  Collin Funk  <collin.funk1@gmail.com>

	maint: avoid syntax-check failure from previous commit
	* src/sort.c (pipe_child): Use nullptr instead of NULL.

2025-10-30  Bruno Haible  <bruno@clisp.org>

	sort: consistently diagnose access issues to --compress-program
	* bootstrap.conf (gnulib_modules): Add findprog-in.
	* src/sort.c: Include findprog.h.
	(pipe_child): Look up the compress_program in $PATH and report errors
	such as ENOENT or EACCES before invoking posix_spawnp.
	This avoids inconsistency on systems that emulate posix_spawn through
	fork/exec, as they would otherwise treat such a failure as a generic
	failure and fail the sort, rather than continuing without compression.

2025-10-29  Pádraig Brady  <P@draigBrady.com>

	sort: fix silent exit upon SIGPIPE from --compress-program
	* src/sort.c (main): Ignore SIGPIPE so we've more control over
	how we handle for stdout and compression programs.
	(sort_die): Handle EPIPE from stdout and mimic a standard SIGPIPE,
	otherwise reverting to a standard exit(SORT_FAILURE);
	* tests/sort/sort-compress-proc.sh: Add a test case.
	* NEWS: Mention the bug fix.

2025-10-29  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest

2025-10-28  Pádraig Brady  <P@draigBrady.com>

	tests: fix new date/resolution.sh test on macOS
	* tests/date/resolution.sh: Fix comparison on systems with less than
	nano second reslution, where we use sed to discard the redundant
	trailing zeros output by date --resolution.
	Reported by Bruno Haible on macOS.

	numfmt: ensure fields don't split on nbsp
	* src/numfmt.c (newline_or_blank): Explicitly ensure
	we don't match NBSP as on platforms like NetBSD 10 or Solaris 11,
	NBSP is considered a blank character.
	This should have been part of commit v9.8-39-g8bc11f80a
	Solaris 11 test failure reported by Bruno Haible.

2025-10-27  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer FTS_ROOTLEVEL when checking the fts_level of an FTSENT
	* src/chcon.c (process_file): Use FTS_ROOTLEVEL instead of 0.
	* src/chmod.c (process_file): Likewise.
	* src/chown-core.c (change_file_owner): Likewise.

	timeout: use the more efficient posix_spawn to invoke the command
	* NEWS: Mention the improvement. Consolidate the posix_spawn
	improvements into one item.
	* bootstrap.conf (gnulib_modules): Add posix_spawnattr_setsigmask.
	* src/timeout.c: Include spawn.h.
	(main): Setup signals using a posix_spawnattr_t object. Use posix_spawn
	instead of fork and execvp.

	maint: prefer ckd_add for overflow checks
	* src/cksum.c (cksum_slice8, crc32b_sum_stream): Use ckd_add to check
	for overflow.
	* src/cksum_avx2.c (cksum_avx2): Likewise.
	* src/cksum_avx512.c (cksum_avx512): Likewise.
	* src/cksum_pclmul.c (cksum_pclmul): Likewise.
	* src/cksum_vmull.c (cksum_vmull): Likewise.

2025-10-27  Pádraig Brady  <P@draigBrady.com>

	build: don't build chcon or runcon unless selinux is available
	The build can be force enabled with --with-selinux and vice versa.

	* build-aux/gen-lists-of-programs.sh: Move chcon and runcon
	to the list of optional programs.
	* configure.ac: Only enable chcon and runcon if selinux.h is available.
	* NEWS: Mention the Build-related change.
	Fixes https://github.com/coreutils/coreutils/issues/121

2025-10-25  Collin Funk  <collin.funk1@gmail.com>

	sort: use the more efficient posix_spawn to invoke --compress-program
	* NEWS: Mention the improvement. Mention that 'sort' will continue
	without compressing temporary files if the program specified by
	--compress-program cannot be executed.
	* doc/coreutils.texi (sort invocation): Document the behavior when the
	program specified by --compress-program cannot be executed.
	* src/sort.c: Include spawn.h.
	(MAX_FORK_TRIES_COMPRESS, MAX_FORK_TRIES_DECOMPRESS): Remove definition.
	(MAX_TRIES_COMPRESS, MAX_TRIES_DECOMPRESS): New definitions based on
	MAX_FORK_TRIES_COMPRESS and MAX_FORK_TRIES_DECOMPRESS.
	(async_safe_die): Remove function.
	(posix_spawn_file_actions_move_fd): New function.
	(pipe_fork): Remove function.
	(pipe_child): New function based on pipe_fork. Return an error number
	instead of a pid. Use posix_spawnp instead of calling fork and expecting
	the caller to exec.
	(maybe_create_temp): Call pipe_child instead of pipe_fork. Print a
	warning to standard error if --compress-program cannot be executed and
	the error is different than the previous call. Remove code for the child
	process.
	(open_temp): Remove code for the child process. Improve error message.
	* tests/sort/sort-compress.sh: Add a test case for when the program
	specified by --compress-program does not exist.

2025-10-23  Collin Funk  <collin.funk1@gmail.com>

	maint: remove unnecessary ignore_value usage
	* src/install.c: Remove ignore-value.h include.
	(strip): Don't use ignore_value on posix_spawnattr_destroy since it
	isn't declared with the warn_unused_result attribute. Pass the checked
	pointer to posix_spawnattr_destroy instead of the variable it points to.

2025-10-23  Bernhard Voelker  <mail@bernhard-voelker.de>

	install: enhance error diagnostic when running strip fails
	* src/install.c (strip): Mention explicitly that the strip program
	failed in the case the user specified a custom strip program name.

2025-10-23  Collin Funk  <collin.funk1@gmail.com>

	split: cleanup after posix_spawn
	* boostrap.conf (gnulib_modules): Add posix_spawn_file_actions_destroy.
	* src/split.c (cleanup): Call posix_spawnattr_destroy and
	posix_spawn_file_actions_destroy after a successful posix_spawn.

	split: prefer posix_spawn to fork and execl
	* NEWS: Mention the change.
	* bootstrap.conf (gnulib_modules): Add posix_spawn,
	posix_spawnattr_setsigdefault, posix_spawn_file_actions_addclose,
	posix_spawn_file_actions_adddup2, and posix_spawn_file_actions_init.
	* src/split.c: Include spawn.h.
	(create): Use posix_spawn instead of fork and execl.

2025-10-23  Pádraig Brady  <P@draigBrady.com>

	tests: date: test --resolution and %-N
	* tests/date/resolution.sh: New test for --resolution and %-N.
	* tests/local.mk: Reference the new test.

	tests: date: test --reference
	* tests/date/reference.sh: Ensure the -r option is tested.
	* tests/local.mk: Add the test.

2025-10-22  Pádraig Brady  <P@draigBrady.com>

	pr: promptly diagnose write errors
	* src/pr.c (print_page): Exit promptly for `yes | pr`.
	(print_clump): Exit promptly for `pr < /dev/zero`.
	* tests/misc/write-errors.sh: Enable test cases.
	* NEWS: Mention the improvement.

	nl: promptly diagnose write errors
	* NEWS: Mention the improvement.
	* src/nl.c (process_file): Exit if error outputting line.
	* tests/misc/write-errors.sh: Enable the test case.

	fmt: promptly diagnose write errors
	* NEWS: Mention the improvement.
	* src/fmt.c (put_line): Exit if any error writing line.
	(flush_paragraph): Exit if any error writing buffer.
	* tests/misc/write-errors.sh: Enable the (flush_paragraph) test case,
	and add another to check the put_line() case.

	numfmt: promptly diagnose write errors
	* src/numfmt.c (process line): Inspect the stdio error state when
	outputting each line so that we don't have to check each output function
	but do eventually exit upon write error, while also remaining buffered.
	(main): Also check when outputting a header for the edge case
	of very long headers.
	* tests/misc/write-errors.sh: Enable the numfmt test case.
	* NEWS: Mention the improvement, and reorganize all numfmt improvements.

2025-10-22  Collin Funk  <collin.funk1@gmail.com>

	install: prefer posix_spawnp to fork and execlp
	* NEWS: Mention the change.
	* bootstrap.conf (gnulib_modules): Add posix_spawnattr_destroy,
	posix_spawnattr_init, posix_spawnattr_setflags, and posix_spawnp.
	* src/install.c (strip): Use posix_spawnp instead of fork and execlp.

2025-10-20  Collin Funk  <collin.funk1@gmail.com>

	maint: remove a redundant write after mcel_scan returns an error
	* gl/lib/mbbuf.h (mbbuf_get_char): Don't set G.len to 1, since mcel_err
	has already done it.

2025-10-20  Pádraig Brady  <P@draigBrady.com>

	tests: numfmt: add non-utf8 multi-byte test
	* tests/numfmt/mb-non-utf8.sh: Test GB18030 delimiter search.
	* tests/local.mk: Reference the new test, and move
	the existing numfmt.pl test from tests/misc to tests/numfmt.

	numfmt: optimize multi-byte --delimiter search
	* src/numfmt.c (is_utf8_charset): A new function to efficiently
	determine if running with a UTF-8 charset.
	(mbsmbchr): A new function to efficiently search for
	a (multi-byte) character in a multi-byte string.
	(next-field): Use mbsmbchr() rather than mbstr() directly.

	numfmt: support multi-byte --delimiter
	* bootstrap.conf: Depend on mbsstr() to robustly search for a
	multi-byte delimiter character (string) within a multi-byte string.
	* src/numfmt.c (main): Accept a valid multi-byte delimiter character.
	(next_field): Adjust delimiter search from single byte
	to multi-byte aware.  Use mbsstr to find the first match.
	* tests/misc/numfmt.pl: Add test case.
	* NEWS: Mention the improvement.

2025-10-18  Pádraig Brady  <P@draigBrady.com>

	numfmt: use multi-byte aware suffix matching
	* src/numfmt.c (process_suffixed_number): Use gnulib's
	mbs_endswith() helper, which is more robust in non UTF-8 locales.
	Also always output a devmsg if a suffix is specified.

	numfmt: fix issues with multi-byte blanks
	* src/numfmt.c (process_line): Restore byte overwritten with NUL,
	as it may be part of a multi-byte blank.
	(process_suffixed_number): Skip multi-byte blanks,
	and correctly determine width with mbswidth().
	(parse_format_string): Use c_isblank() to explicitly
	indicate that's all the format spec supports.
	* tests/misc/numfmt.pl: Add test cases.
	* NEWS: Mention the bug fix.

2025-10-17  Pádraig Brady  <P@draigBrady.com>

	numfmt: add --unit-separator
	Output, accept, or disallow a string between the number and unit
	as recommended in <https://physics.nist.gov/cuu/Units/checklist.html>
	I.e. support outputting numbers of the form: "1234 M"

	* src/numfmt.c (simple_strtod_human): Skip unit separator if present,
	or disallow a unit separator if empty.
	(double_to_human): Output unit separator if specified.
	(main): Accept --unit-separator.
	* tests/misc/numfmt.pl: Add test cases.
	* doc/coreutils.texi: Describe the new option,
	giving examples of interaction with --delimiter.
	* NEWS: Mention the new feature.
	* THANKS.in: Add Johannes Schauer Marin Rodrigues,
	who provided a preliminary patch.

2025-10-17  Pádraig Brady  <P@draigBrady.com>

	numfmt: support reading numbers with grouping characters
	This does not validate grouping character placement,
	and currently just ignores grouping characters.

	* src/numfmt.c (simple_strtod_int): Skip grouping chars
	that are part of a number.
	* tests/misc/numfmt.pl: Add test cases.
	* NEWS: Mention the improvement.

2025-10-17  Pádraig Brady  <P@draigBrady.com>

	numfmt: support reading numbers with NBSP before unit
	* src/numfmt.c (simple_strtod_human): Accept (multi-byte)
	non-breaking space character between number and unit.
	Note we restrict this to a single character between number
	and unit, to allow less ambiguous parsing if multiple blanks
	are used to delimit fields.
	* tests/misc/numfmt.pl: Add test cases.
	* doc/coreutils.texi (numfmt invocation): Fix stale description
	--delimiter skipping whitespace.
	* NEWS: Mention the improvement.

2025-10-16  Nicolas Boichat  <nicolas@boichat.ch>

	tests: du/bigtime: try harder to find a suitable filesystem
	* tests/du/bigtime.sh: At least on Linux, the ext4 filesystem
	doesn't support such large timestamp, while tmpfs does.  Try a bit
	harder to look for a filesystem with large timestamp support.

2025-10-14  Collin Funk  <collin.funk1@gmail.com>
	    Pádraig Brady  <P@draigBrady.com>

	tests: date: check that the hour format of the current locale is used
	* tests/date/date-locale-hour.sh: New file.
	* tests/local.mk (all_tests): Add the new test.

2025-10-13  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure in recent memory limit test
	* tests/basenc/bounded-memory.sh: Ensure we skip the test
	upon failure to determine the memory lower bound.
	Reported by Bruno Haible.

2025-10-11  Pádraig Brady  <P@draigBrady.com>

	numfmt: fix buffer over-read (CWE-126)
	* src/numfmt.c (simple_strtod_human): Check for NULL after pointer
	adjustment to avoid Out-of-range pointer offset (CWE-823).
	* NEWS: Mention the fix.

2025-10-11  Pádraig Brady  <P@draigBrady.com>

	tests: basenc: use less redundant naming
	Rename to less redundant names, now that we use
	a separate test directory per util.

	* tests/basenc/basenc-bounded-memory.sh -> .../bounded-memory.sh
	* tests/basenc/basenc-large.sh -> .../large-input.sh
	* tests/local.mk: Reference new names.

2025-10-11  Pádraig Brady  <P@draigBrady.com>

	tests: fix memory limit determination in new test
	* tests/basenc/basenc-bounded-memory.sh: The passed command
	needs to succeed for memory limit determination to work.

2025-10-11  Collin Funk  <collin.funk1@gmail.com>

	tests: basenc: add a test for bounded memory operation
	* tests/basenc/basenc-bounded-memory.sh: New file.
	* tests/local.mk (all_tests): Add the test.

2025-10-10  Sylvestre Ledru  <sylvestre@debian.org>

	tests: ln -f: ensure existing link replaced
	Identified here:
	<https://github.com/uutils/coreutils/issues/8830>

	* tests/ln/misc.sh: Add the check.

2025-10-07  Pádraig Brady  <P@draigBrady.com>

	tests: cksum: add a test case for robust file name parsing
	* tests/cksum/cksum-c.sh: Add a test case where the file name
	contains tagged format delimiter characters.

	maint: cksum: document a base64/hex parsing ambiguity with untagged
	* src/digest.c (split_3): Mention the ambiguity in misinterpreting
	base64 characters as hex is not a practical consideration.
	Also add an example of both tagged formats which makes it
	easier to interpret the parsing logic.

	cksum: fix --check with untagged base64 format with tag matches
	* src/digest.c (split_3): Fallback to untagged matching in the
	case where -a is specified and we have matched a TAG in
	the possibly base64 data.  This might happen in 1 in every 64K files.
	Note we remove the modification of string S (and redundant streq) in
	the tag matching, as that was not needed since v8.32-223-g217cd278e.
	* tests/cksum/cksum-c.sh: Add a test case.
	* NEWS: Mention the bug fix.

	cksum: fix length validation with SHA2- tagged format
	* src/digest.c (sha2_sum_stream): Change from unreachable()
	to affirm() so that we have defined behavior unless
	we configure with --disable-assert.
	(sha3_sum_stream): Likewise.
	(split_3): Validate SHA2-lengths before passing on.
	* tests/cksum/cksum-c.sh: Add a test case.
	* NEWS: Mention the bug fix.

	cksum: fix --check with --algorithm=sha2
	* src/digest.c (split_3): Look up the provided tag with -a sha2
	because there is not a 1:1 mapping between them.
	* tests/cksum/cksum-c.sh: Add a test case.
	* NEWS: Mention the bug fix.

2025-10-06  Paul Eggert  <eggert@cs.ucla.edu>

	rm: remove redundant mark_ancestor_dirs call
	* src/remove.c (rm_fts): Remove unnecessary call.  Since this code
	is executed only when not recursive, there are no ancestors to mark.

	rm: make ‘rm -d DIR’ more like ‘rmdir DIR’
	* src/remove.c (rm_fts): When not recursive,
	arrange for ‘rm -d DIR’ to behave more like ‘rmdir DIR’.
	This works better for Ceph snapshot directories.
	Problem reported by Yannick Le Pennec (bug#78245).

2025-10-05  Collin Funk  <collin.funk1@gmail.com>

	cksum: allow -a {blake2b,sha2,sha3} --check to work on base64
	* NEWS: Mention the bug.
	* src/digest.c (split_3): Check that the base64 digest matches the
	length supported by the algorithm.
	(digest_check): Check that the read digest matches the base64 length of
	the algorithm's digest. The previous condition would not work for
	'cksum -a blake2b -l 8 ...'.
	* tests/cksum/cksum-base64-untagged.sh: New file.
	* tests/local.mk (all_tests): Add the new test.

2025-10-04  Paul Eggert  <eggert@cs.ucla.edu>

	maint: omit trailing white space in config.h
	* configure.ac (FORTIFY_SOURCE): Don’t indent a line
	where the indentation can cause trailing white space in config.h.
	Problem reported by Grisha Levit (Bug#79567).

2025-10-03  Collin Funk  <collin.funk1@gmail.com>

	maint: remove IRIX support
	* src/ptx.c (main) [HAVE_SETCHRCLASS]: Remove call to setchrclass.
	* src/stty.c (VREPRINT) [!VREPRINT && VRPRNT]: Remove definition.

2025-10-02  Pádraig Brady  <P@draigBrady.com>

	tests: factor: add suggested large prime tests
	* tests/factor/create-test.sh: Add 2 new large primes from:
	https://github.com/coreutils/coreutils/issues/65
	* tests/local.mk: Reference the 2 new generated tests.

2025-10-02  Pádraig Brady  <P@draigBrady.com>

	unexpand: fix heap buffer overflow with --tabs=[+/]NUM
	This avoids CWE-122: Heap-based Buffer Overflow
	where we could write blank characters beyond
	the allocated heap buffer.

	* src/expand-common.c (set_max_column_width): Refactor function from ...
	(add_tab_stop): ... here.
	(set_extend_size): Call new function.
	(set_increment_size): Likewise.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/79555

2025-10-02  Pádraig Brady  <P@draigBrady.com>

	doc: man: consistently format -X[OPTIONAL] form
	This is significant for the date, od, and pr commands
	which have options of the form -X[OPTIONAL], which change like:

	  diff -r man.orig/date.1 man/date.1
	  < \fB\-I[FMT]\fR, \fB\-\-iso\-8601\fR[=\fI\,FMT\/\fR]
	  > \fB\-I\fR[\fI\,FMT\/\fR], \fB\-\-iso\-8601\fR[=\fI\,FMT\/\fR]

	  diff -r man.orig/od.1 man/od.1
	  < \fB\-w[BYTES]\fR, \fB\-\-width\fR[=\fI\,BYTES\/\fR]
	  > \fB\-w\fR[\fI\,BYTES\/\fR], \fB\-\-width\fR[=\fI\,BYTES\/\fR]

	* man/help2man (convert_options): Support options of the form
	-X[PARAM], so that we now consistently format them (in italics).

2025-10-02  Pádraig Brady  <P@draigBrady.com>

	doc: man: consistently italicize --option parameters
	This changes a few pages, but the changes in tail.1
	concisely illustrate the resulting man page changes:

	  $ diff -r man.orig/tail.1 man/tail.1
	  < \fB\-c\fR, \fB\-\-bytes\fR=\fI\,[\/\fR+]NUM
	  > \fB\-c\fR, \fB\-\-bytes\fR=\fI\,[+]NUM\/\fR

	  < \fB\-f\fR, \fB\-\-follow[=\fR{name|descriptor}]
	  > \fB\-f\fR, \fB\-\-follow\fR[=\fI\,{name|descriptor}\/\fR]

	  < \fB\-n\fR, \fB\-\-lines\fR=\fI\,[\/\fR+]NUM
	  > \fB\-n\fR, \fB\-\-lines\fR=\fI\,[+]NUM\/\fR

	* man/help2man: Relax the option match so more --option
	variations are supported, and passed through to convert_option().
	Specifically more variations after '=' are now supported.
	Also split and document the regular expression.
	Reported at https://github.com/coreutils/coreutils/issues/84

2025-10-02  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer unreachable () to NOTREACHED comment
	* src/tsort.c (search_item): Use unreachable () instead of NOTREACHED.

2025-10-01  Collin Funk  <collin.funk1@gmail.com>

	fold: move multi-byte character reading to a module
	* gl/modules/mbbuf: New file.
	* gl/lib/mbbuf.c: Likewise.
	* gl/lib/mbbuf.h: Likewise.
	* gl/local.mk (EXTRA_DIST): Add the new files.
	* bootstrap.conf (gnulib_modules): Add mbbuf.
	* src/fold.c: Include mbbuf.h.
	(fold_file): Use the mbbuf functions instead of calling fread and
	handling the input buffer ourselves.
	* cfg.mk (exclude_file_name_regexp--sc_preprocessor_indentation)
	(exclude_file_name_regexp--sc_GPL_version): Match gl/lib/mbbuf.c and
	gl/lib/mbbuf.h.

2025-09-30  Mathieu Bordere  <mathieu@letmetweakit.com>

	wc: add AVX512 function for line counting
	* configure.ac: Add detection of AVX512 intrinsics for wc.
	* src/local.mk: Build AVX512 wc libraries.
	* src/wc.c: Add runtime detection of AVX512 intrinsics and call
	appropriate function when detected.
	* src/wc.h (wc_lines_avx512): Declare function.
	* tests/wc/wc-cpu.sh: Add a test that disables AVX512 intrinsics.
	* src/wc_avx512.c: New file containing the wc -l implementation using
	AVX512. The logic and code is reused from the AVX2 implementation with
	slight adaptations. Replaced __builtin_popcount by __builtin_popcountll
	and the combination of _mm256_cmpeq_epi8 and _mm256_movemask_epi8 by a
	single call to _mm512_cmpeq_epi8_mask.
	* NEWS: Mention the improvement.

2025-09-28  Pádraig Brady  <P@draigBrady.com>

	maint: update valgrind instructions
	* README-valgrind: Adjust to current repo structure,
	and give clearer step by step instructions.

2025-09-27  Collin Funk  <collin.funk1@gmail.com>

	maint: convert some overflow checks to ckd_add and ckd_mul
	* src/csplit.c (parse_repeat_count): Prefer ckd_add when checking for
	overflows.
	* src/install.c (get_ids): Likewise.
	* src/shred.c (dopass): Likewise.
	* src/tr.c (get_spec_stats): Likewise.
	* src/sort.c (specify_sort_size): Prefer ckd_mul when checking for
	overflows.

2025-09-26  Pádraig Brady  <P@draigBrady.com>

	tests: test: ensure file operations are covered
	A coverage report indicated these weren't tested
	(as generally the test shell builtin is used).

	* tests/test/test-file.sh: Add a new test.
	* tests/local.mk: Reference the new test.

2025-09-26  Bernhard Voelker  <mail@bernhard-voelker.de>

	join: remove unused #include "argmatch.h"
	Prompted by the syntax-check failure:
	  maint.mk: the above files include argmatch.h but don't use it
	  make: *** [maint.mk:741: sc_prohibit_argmatch_without_use] Error 1

	* src/join.c: Remove include, as the previous commit changed from using
	ARRAY_CARDINALITY to countof - for which system.h includes the header.

2025-09-25  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer countof over ARRAY_CARDINALITY
	* bootstrap.conf (gnulib_modules): Add stdcountof-h.
	* src/system.h: Include stdcountof.h.
	(ARRAY_CARDINALITY): Remove definition.
	* .gitignore (/lib/stdcountof.h): Ignore Gnulib generated file.
	* src/csplit.c: Use countof instead of ARRAY_CARDINALITY.
	* src/df.c: Likewise.
	* src/digest.c: Likewise.
	* src/dircolors.c: Likewise.
	* src/factor.c: Likewise.
	* src/join.c: Likewise.
	* src/ls.c: Likewise.
	* src/od.c: Likewise.
	* src/sort.c: Likewise.
	* src/stdbuf.c: Likewise.
	* src/tr.c: Likewise.

2025-09-24  Hannes Braun  <hannes@hannesbraun.net>

	tail: fix tailing larger number of lines in regular files
	* src/tail.c (file_lines): Seek to the previous block instead of the
	beginning (or a little before) of the block that was just scanned.
	Otherwise, the same block is read and scanned (at least partially)
	again. This bug was introduced by commit v9.7-219-g976f8abc1.
	* tests/tail/basic-seek.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: mention the bug fix.

2025-09-24  Pádraig Brady  <P@draigBrady.com>

	tests: wc: fix hardware acceleration disabling test
	* tests/wc/wc-cpu.sh: The message is only printed with wc -l.
	Reported by Mathieu Borderé.

	build: copy: add dependency on $(LIB_SMACK)
	* src/local.mk: Due to gnulib adjustments, this explicit
	dependency is required with the mold linker at least.
	Reported at https://github.com/coreutils/coreutils/issues/113

2025-09-23  Pádraig Brady  <P@draigBrady.com>

	basenc: --base58: fix buffer overflow with input > 15MB
	base58_length() operated naively on an int
	which resulted in an overflow to a negative number
	for any input > 2^31-1/138, i.e. 15,561,475 bytes.

	* src/basenc.c (base_length): Change input and output
	parameter types from int to idx_t since this needs to
	cater for the full input size in the base58 case.
	(base58_length): Likewise.  Also reorder the calculation
	to be less exact, but doing the division first
	to minimize the chance of overflow (which now on 64 bit
	would only happen for inputs > around 6 Exa bytes).
	* tests/basenc/basenc-large.sh: Add a new test,
	that triggers with valgrind or ASAN.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the bug fix.

2025-09-23  Pádraig Brady  <P@draigBrady.com>

	doc: document gl_cv_crc_pclmul to control hardware acceleration
	doc/coreutils.texi (Harware acceleration configuration):
	Sort the list and add "gl_cv_crc_pclmul".

	build: fix build failure with mismatched pclmul
	* src/cksum.c (pclmul_supported): In the case where
	gnulib has pclmul enabled but coreutils does not,
	ensure we don't reference the coreutils pclmul function.
	Addresses https://bugs.gnu.org/79491

2025-09-23  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-09-22  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.8
	* NEWS: Record release date.

	build: update gnulib to latest
	* gnulib: Update to latest to pull Android build fixes,
	and fchownat fixes.

	tests: ls: avoid alignment check with non printable characters
	* tests/ls/block-size.sh: Skip the case where there are
	non-printable characters in ls' output, which is the case
	with NBSP thousands separators on FreeBSD 11 and 12.
	We may drop the MBSW_REJECT_UNPRINTABLE in future from
	ls and numfmt, but for now avoid these characters in the test.
	Reported by Bruno Haible.

	tests: du: avoid false failure in racy test
	* tests/du/move-dir-while-traversing.sh: Expand the work to avoid
	a false failure where du completes before the directory is moved.
	Also expand the timeout to our more standard 10s to avoid the
	"directory mover" being killed before du processes the directory.
	This doesn't perceptibly impact the run time of the test.
	Reported by Bruno Haible on a CentOS 7 system.

	build: revert gnulib update
	There is a pending issue with fchownat:
	https://lists.gnu.org/r/bug-gnulib/2025-09/msg00282.html

2025-09-21  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest

	build: fix missing declarations on Android
	* configure.ac: Check for statx using gl_CHECK_FUNCS_ANDROID since it is
	hidden for Android API level <= 30.
	* m4/jm-macros.m4 (coreutils_MACROS): Check for syncfs using
	gl_CHECK_FUNCS_ANDROID since it is hidden for Android API level <= 28.

2025-09-21  Paul Eggert  <eggert@cs.ucla.edu>

	maint: comment spelling fixes

	tests: fix OMP_NUM_THREADS misspelling
	* tests/nproc/nproc-quota.sh: Fix misspelling.

	maint: update bootstrap from Gnulib

2025-09-21  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure on older Linux kernels
	* tests/fold/fold-zero-width.sh: Check the shell was able to create
	the redirection file, as intermittently on CentOS 5,6,7 this wasn't
	the case, with the shell giving an xmalloc failure due to the ulimit.
	Reported by William Bader and Bruno Haible.

	tests: tail: avoid false failure with overlayfs
	* tests/tail/inotify-dir-recreate.sh: Add an extra check
	that inotify is in use, as it's required for this test.
	Inotify is avoided with overlayfs for which the
	df --local check is not sufficient exclusion for.

2025-09-20  Pádraig Brady  <P@draigBrady.com>

	tests: fold: avoid false failures on Solaris 10
	* tests/fold/fold-characters.sh: Ensure we have independent verification
	of the width of characters before testing based on those widths.
	* tests/fold/fold-zero-width.sh: Likewise.
	* tests/fold/fold.pl: Only compare the exit status,
	as the error message can be translated.

	tests: dd: avoid false failure on Solaris 10
	* tests/dd/no-allocate.sh: Give some extra space to the
	determined vm limit.

	tests: avoid false failure on CentOS 5,6,7
	* tests/fold/fold-zero-width.sh: Increase vm limit to avoid
	failures on CentOS 5,6,7.  Match the limit used in write-errors.sh
	as per commit v9.5-255-g0bd149403

2025-09-20  Collin Funk  <collin.funk1@gmail.com>

	doc: don't capitalize the first letter of cgroup
	This is the correct way to write it as described in the documentation:
	<https://docs.kernel.org/admin-guide/cgroup-v2.html#terminology>.

	* doc/coreutils.texi (nproc invocation): Use cgroup instead of Cgroup.

2025-09-20  Collin Funk  <collin.funk1@gmail.com>

	tests: env: skip a few tests if LD_LIBRARY_PATH is set
	* tests/env/env-null.sh: Skip test if LD_LIBRARY_PATH or platform's
	equivalent is set, since 'env -i' will unset it which may prevent
	programs from running.
	* tests/env/env-S.pl: Likewise.
	Issue and suggested fix reported by Bruno Haible.

2025-09-19  Grisha Levit  <grishalevit@gmail.com>

	touch: fix diagnostic on macOS 26
	* src/touch.c (touch): Do not use open_errno == EEXIST for diagnostic
	if file was a directory as macOS 26 sets it for open("/", O_CREAT, ...).

2025-09-19  Paul Eggert  <eggert@cs.ucla.edu>

	copy: pacify older clang
	* src/copy-file-data.c (copy_file_data):
	Redo conditionals for clarity.
	This pacifies the clang in FreeBSD 11 and OpenBSD 7.6.
	Problem reported by Bruno Haible in:
	https://lists.gnu.org/r/coreutils/2025-09/msg00104.html

2025-09-19  Collin Funk  <collin.funk1@gmail.com>

	dd: don't mistakenly use O_EXCL on GNU/Hurd
	* src/dd.c (v): Add the O_EXCL flag to the set of bits that we do not
	want to use for our definitions.
	* cfg.mk (sc_dd_O_FLAGS): Adjust to pass syntax-check.
	* NEWS: Mention the fix.
	Reported by Bruno Haible.

2025-09-19  Paul Eggert  <eggert@cs.ucla.edu>

	maint: we don’t use Gnulib’s fchownat module
	* bootstrap.conf (gnulib_modules): Remove fchownat.
	It is used only indirectly, via the chownat module.

2025-09-18  Bruno Haible  <bruno@clisp.org>

	fmt: eliminate a clang -Wformat-extra-args warning
	* src/fmt.c (fmt): When not reading from stdin, always mention the
	file name in the error message.

2025-09-18  Paul Eggert  <eggert@cs.ucla.edu>

	maint: we use Gnulib’s stddef-h module directly
	* bootstrap.conf (gnulib_modules): Add stddef-h, since the code
	uses ‘unreachable’ which is supplied by that module.

2025-09-18  Pádraig Brady  <P@draigBrady.com>

	tests: tail/overlay-headers.sh: protect against hang
	* tests/tail/overlay-headers.sh: Protect tail invocation with timeout,
	and extend the possible running period to 60 seconds like other tests.
	Reported by Brudno Haible on T2SDE Linux/alpha

	build: fix compile error on macOS
	* gnulib: Update to latest to pull fix
	for localcharset compile failure on macOS.

	tests: tests/tail/wait.sh: protect against hang
	* tests/tail/wait.sh: This test was seen to hang occasionally
	on an Alpine Linux 3.20 system, so protect the tail(1) call
	with `timeout 60` as done in similar tests.
	Reported by Bruno Haible.

	build: fix link failure on macOS
	* src/local.mk: Explicitly depend on @INTL_MACOS_LIBS@
	which may be not implicitly referenced (in LIBINTL) without gettext.
	This is a new transitive dependency through localename-unsafe.
	We add this globally to ease future maintenance as currently
	6 commands require the localename-unsafe dependency:
	date, du through show-date() (fprintftime), and
	ls, pr, stat, uptime through strftime().

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib for stringeq adjustment
	* gnulib: Pull in stringeq adjustment.

	tests: write-errors.sh: avoid portability issue with dash
	* tests/misc/write-errors.sh: Use printf rather than echo
	since the echo builtin in dash will interpret backslashes.
	* tests/misc/read-errors.sh: Likewise for consistency.

	cksum,wc: inspect GLIBC_TUNABLES on all architectures
	* gnulib: Update gnulib to latest to pull in change
	to inspect GLIBC_TUNABLES on non x86_64 or aarch64 platforms.
	This was needed on 32 bit x86, which supports calling into
	accelerated code, and so requires inspection of GLIBC_TUNABLES
	to pass the disablement verification in tests/cksum/cksum.sh

2025-09-17  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer memeq to memcmp
	* gl/modules/randread-tests (Depends-on): Add stringeq.
	* gl/tests/test-rand-isaac.c (main):
	* src/copy.c (source_is_dst_backup):
	* src/digest.c (b64_equal):
	* src/install.c (have_same_content):
	* src/ls.c (main, parse_ls_color):
	* src/nl.c (check_section):
	* src/od.c (write_block):
	* src/seq.c (seq_fast):
	* src/stty.c (eq_mode):
	* src/system.h (is_nul):
	Prefer memeq to memcmp when either will do.

	maint: STREQ → streq
	Use new Gnulib streq function instead of rolling our own macro.
	* bootstrap.conf (gnulib_modules): Add stringeq.
	* src/rm.c (main): Don’t assume streq is a macro that expands to (...),
	as it is now a function.
	* src/system.h:
	* tests/df/no-mtab-status.sh, tests/df/skip-duplicates.sh:
	(STREQ): Remove.  All uses replaced by streq.

	build: update gnulib submodule to latest

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	tests: fix issues with fold-characters.sh test
	This was noticed with:

	  trap '' PIPE &&  # Ignore SIGPIPE
	  make check TESTS=tests/fold/fold-characters.sh SUBDIRS=.

	* tests/fold/fold-characters.sh: Move memory limit test to ...
	* tests/misc/write-errors.sh: ... which avoids "write error"
	messages on stderr due to the ignored SIGPIPE.  It also protects
	the fold invocation with a timeout(1) so that fold implementations
	that don't exit promptly upon write error don't hang the test suite
	(Like we would have done before commit v9.7-311-gc95c7ee76).

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	doc: remove older ChangeLog items
	* Makefile.am: Update the oldest documented version
	to 8.32 which is now about 5 years old.

2025-09-17  Collin Funk  <collin.funk1@gmail.com>

	maint: remove unnecessary uintmaxtostr usage in printf
	* src/comm.c (compare_files): Use the "%ju" printf directive instead of
	"%s" and printing the result of umaxtostr.
	* src/df.c (get_header): Likewise.
	* src/ls.c (print_long_format): Likewise.
	* src/sort.c (check): Likewise.

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	doc: add hardware acceleration configuration docs
	* NEWS: Mention the new GLIBC_TUNABLES feature.
	* doc/coreutils.texi (Hardware Acceleration): A new node
	detailing the build time and run time configuration options.

2025-09-16  Pádraig Brady  <P@draigBrady.com>

	fold: fix write error checks with invalid multi-byte input
	* src/fold.c (write_out): A new helper to check all writes.
	(fold-file): Use write_out() for all writes.
	* tests/fold/fold-zero-width.sh: Adjust to writing more
	data in various patterns, rather than two buffers of NULs.
	This is a more robust memory bound check, and the '\303' case
	tests this particular logic change.
	* NEWS: fold now exits immediately, not just promptly.

	fold: exit promptly upon write errors
	* NEWS: Mention the improvement.
	* src/fold.c (fold_file): Check for write errors
	after each buffer read from stdin.
	* tests/misc/write-errors.sh: Add test cases.

	maint: basenc: refactor overloaded use of ctx->i member
	* src/basenc.c (base_decode_context): Remove the shared "i" member,
	instead using per encoding data and access functions
	for tracking pending data.

	tests: fold/fold-zero-width.sh: avoid false failure with ENOSPC
	* tests/fold/fold-zero-width.sh: Check relatively large test file
	is created appropriately.  Also apply more idomatic wc -l usage.

	doc: NEWS: fold: clarify mem exhaustion trigger
	* NEWS: Long lines were not an issue in previously
	released coreutils, only the -w limitation was.

	maint: avoid syntax-check failures from recent commits
	* cfg.mk: Avoid spellcheck failures.
	* src/copy-file-data.c: Avoid sc_tight_scope and long_lines failure.
	* src/copy.h: Avoid indentation issues.

2025-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	cp: create_hole now returns off_t
	* src/copy-file-data.c (create_hole): Refactor by returning
	resulting offset, not bool.  All callers changed.

	cp: prefer signed types in copy-file-data.c
	* src/copy-file-data.c (sparse_copy, lseek_copy)
	(copy_file_data): Prefer idx_t to size_t.
	(copy_file_data): Defend against st_size < 0, which can happen on
	ancient buggy platforms.  Check for overflow; the old code was
	wrong on theoretical-but-valid hosts where SIZE_MAX <= INT_MAX.

	cp: don’t allocate a separate zero buffer
	* src/copy-file-data.c (write_zeros): New args abuf, buf_size.
	Use the lazily-allocated buffer, which most likely already exists,
	rather than allocating a separate buffer just for zeros.
	This makes the code more reentrant as there is no longer
	a need for static storage here.  Although there is some CPU
	overhead due to the need to zero out the buffer for each file,
	the overhead is relatively small as the buffer is smallish
	and should be cached.  All callers changed.

	cp: refactor copying to return bytes copied
	This doesn’t change behavior; it simplifies future changes.
	* src/copy-file-data.c (sparse_copy, lseek_copy, copy_file_data):
	Return the number of bytes copied, or -1 on failure,
	instead of merely returning a success indication.
	All callers changed.

	cp: copy_file_data now supports ibytes
	This does not affect current coreutils behavior;
	it is merely to help make copy_file_data more useful in the future.
	* src/copy-file-data.c (lseek_copy): New arg ibytes.
	Caller changed.
	(copy_file_data): Implement the ibytes arg; formerly
	it was always treated as COUNT_MAX, though all callers
	currently pass COUNT_MAX so there was no problem in practice.

	cp: prefer signed type for file byte count
	* src/copy-file-data.c (sparse_copy): max_n_read arg is now
	of type count_t, not uintmax_t.  This is better for debugging
	with -fsanitize=undefined.

	cp: port better to old limited hosts
	Port better ancient platforms where OFF_T_MAX is only 2**31 - 1,
	but some devices have more than that many bytes.
	* src/copy-file-data.c (copy_file_data): Byte count is now
	count_t, not off_t.  All callers changed.  Since we need to check
	for overflow anyway, also check for too-small calls to fadvise.

	cp: refactor out data copying
	* po/POTFILES.in, src/local.mk (copy_sources): Add the new file.
	* src/copy.c: Move the #includes of alignalloc.h, buffer-lcm.h,
	fadvise.h, full-write.h, ioblksize.h to copy-file-data.c.
	(enum copy_debug_val, struct copy_debug): Move these decls to copy.h.
	(punch_hole, create_hole, is_CLONENOTSUP, sparse_copy)
	(write_zeros, lseek_copy, HAVE_STRUCT_STAT_ST_BLOCKS)
	(enum scantype, struct scan_inference, infer_scantype):
	Move to copy-file-data.c.
	(copy_reg): Move the data-copying part of this function
	to the new function copy_file_data in copy-file-data.c.
	* src/copy-file-data.c: New file, taken from part of copy.c.

	cp: refactor src/copy.c
	This is in preparation for splitting this large module.
	* src/copy.c (sparse_copy, lseek_copy): New arg DEBUG, used to
	identify copy debug info instead of using a static var.  All
	callers changed.
	(lseek_copy, infer_scantype): New args SRC_POS and POS.
	Callers changed.
	(copy_file_data): New function, with contents taken from copy.
	(copy_reg): Call it.

2025-09-16  Collin Funk  <collin.funk1@gmail.com>

	doc: NEWS: correct the previous commit
	* NEWS: The memory allocated by 'fold' in the past was also bounded by
	--width.

	doc: NEWS: mention fold can operate on very long lines
	* NEWS: Before commit fb9016d50 (fold: use fread instead of getline,
	2025-08-24), fold required that the maximum line size in a file fit into
	memory. Document that this is no longer the case.

	fold: fix out of bounds write with zero width characters
	* src/fold.c (fold_file): Prefer putchar ('\n') to copying characters.
	If we do not have room in the output buffer print it since it is not a
	full line of text.
	* tests/fold/fold-zero-width.sh: New test case.
	* tests/local.mk (all_tests): Add it.

2025-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	cp: improve umask caching
	* src/copy.c (cached_umask): Avoid syscalls when cached umask is 0.
	This can also help the compiler’s static analysis.

2025-09-14  Collin Funk  <collin.funk1@gmail.com>

	basenc: fix an uninitialized index when decoding an empty file
	* src/basenc.c (base64_decode_ctx_init_wrapper)
	(base64url_decode_ctx_init_wrapper)
	(base32_decode_ctx_init_wrapper)
	(base32hex_decode_ctx_init_wrapper): Initialize ctx->i to zero.
	Fixes https://bugs.gnu.org/79444

2025-09-14  Pádraig Brady  <P@draigBrady.com>

	maint: randperm: remove stale dependency
	* gl/modules/randperm: Remove assert-h dependency
	not required since commit v9.5-34-g26ba82015

2025-09-14  Pádraig Brady  <P@draigBrady.com>

	cksum,wc: support disabling hardware acceleration at runtime
	This is useful to give better test coverage at least,
	and may be useful for users to tune their environment.

	* bootstrap.conf: Reference the cpu-supports gnulib module.
	* src/cksum.c: Use cpu_supports() rather than __builtin_cpu_supports().
	* src/wc.c: Likewise.
	* tests/cksum/cksum.sh: Adjust to testing all implementations.
	* tests/wc/wc-cpu.sh: A new test to do likewise.
	* tests/local.mk: Reference the new wc test.

2025-09-14  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	Primarily to get the new cpu-supports module.

2025-09-13  Paul Eggert  <eggert@cs.ucla.edu>

	factor: port to strict C
	Problem found with Oracle Developer Studio 12.6.
	* src/factor.c (factor): Don’t return f() when f returns void.

2025-09-12  Collin Funk  <collin.funk1@gmail.com>

	maint: document some functions used by expand and unexpand
	* src/expand-common.h (get_next_tab_column, cleanup_file_list_stdin)
	(emit_tab_list_info): Document functions.
	* src/expand-common.c (cleanup_file_list_stdin, emit_tab_list_info):
	Likewise.

2025-09-10  Pádraig Brady  <P@draigBrady.com>

	maint: basenc: refactor all encodings to use finalize
	Finalize was required for base58, but it's a more general mechanism
	which simplifies the logic for all encodings

	* src/basenc.c (do_decode): Always call base_decode_ctx_finalize(),
	rather than the awkward double loop at end of buffer.
	* tests/basenc/basenc.pl: Add basenc finalization tests.

2025-09-10  Collin Funk  <collin.funk1@gmail.com>

	maint: cleanup libraries unnecessarily added to fold
	* src/local.mk (src_fold_LDADD): Remove $(MBRTOWC_LIB) since it is
	already added to LDADD. Remove $(LIBC32CONV) and $(LIBUNISTRING) which
	were for an uncommitted patch which used Gnulib's mbfile module.

2025-09-09  Pádraig Brady  <P@draigBrady.com>

	nohup: avoid FORTIFY runtime failure on Bionic libc
	The meaning of non-file permission umask bits is implementation defined.
	On Bionic libc, attempting to set them triggers a FORTIFY runtime check.

	  $ nohup true
	  FORTIFY: umask: called with invalid mask -601
	  Aborted                    nohup true

	* src/nohup.c: (main) Avoid setting non-permission bits in umask.
	Just clear the umask to ensure we create nohup.out with u+rw,
	as we restore the original umask before the exec().
	* tests/misc/nohup.sh: Add a test case.
	* NEWS: Mention the bug fix.

2025-09-08  Pádraig Brady  <P@draigBrady.com>

	basenc: ensure partial padding with newlines induces an error
	* src/basenc.c (has_padding): A more robust helper to
	identify padding in the presence of trailing newlines.
	(do_decode): Use has_padding() rather than just looking
	at the last character.
	* tests/basenc/base64.pl: Fully test commit v9.4-53-g378dc38f4
	by ensuring partially padded data is diagnosed.
	baddecode9 is the case fixed in this commit.
	* NEWS: Mention the bug fix.

2025-09-07  Pádraig Brady  <P@draigBrady.com>

	tests: ensure option aliases are supported
	This implicitly tests the previous commit to
	adjust how date(1) handles multiple named format options.
	Currrently it tests the following are supported:

	  chown  --quiet  --silent
	  date  --rfc-email  --rfc-822  --rfc-2822
	  date  --uct  --utc  --universal
	  dircolors  --bourne-shell  --sh
	  dircolors  --csh  --c-shell
	  head  --quiet  --silent

	* tests/misc/option-aliases.sh: A new test to ensure all
	option aliases supported by a command are supported.
	* Reference the new test.

2025-09-07  Pádraig Brady  <P@draigBrady.com>

	date: support overriding named formats
	* src/date.c (main): Allow specifying different named formats,
	with the last specified taking precedence.
	* NEWS: Mention the bug fix.

2025-09-07  Collin Funk  <collin.funk1@gmail.com>

	cksum: don't leak memory using -a sha3 with OpenSSL
	* gnulib: Update to the latest commit for latest changes to the
	crypto/sha3-buffer and crypto/sha3 modules.

2025-09-05  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer c32isspace to iswspace
	* src/wc.c (wc): Replace call to iswspace with c32isspace.

	tests: fold: check if multi-byte spaces are treated as blank
	This avoids a test failure on FreeBSD 14, MacOS 15, and musl.
	Fix suggested by Pádraig Brady in:
	<https://bugs.gnu.org/79301#32>.
	* tests/fold/fold-spaces.sh (isblank): New function. Only run the tests
	if the character is treated as blank.
	Fixes https://bugs.gnu.org/79301

2025-09-04  Pádraig Brady  <P@draigBrady.com>

	doc: update the md5/sha1 "weak hash" advisory
	* doc/coreutils.texi: Adjust advisory for md5sum and sha1sum
	to include "sha3", and also the more general `cksum -a` interface.

	tests: cksum: check more length variants
	* tests/cksum/cksum-raw.sh: Adjust to non legacy naming,
	and also check various length variations.
	* tests/misc/read-errors.sh: Likewise.

	doc: NEWS: expand on the fold multi-byte enhancements
	* NEWS: Mention all of fold(1) got multi-byte enhancement,
	with -c being an ancillary part of that.

2025-09-04  Pádraig Brady  <P@draigBrady.com>

	cksum: prefer -a sha2 -l ###, to -a sha###
	To make the interface more concise and consistent,
	while being backwards compatible.

	* src/digest.c (main): Continue to support -a "sha###" but
	also support -a "sha2" and treat it like "sha3", except in...
	(output_file): ... maintain the legacy tags for better compatability.
	* doc/coreutils.texi (cksum invocation): Document the -a sha2 option.
	* tests/cksum/cksum-base64.pl: Adjust as per modified --help.
	* tests/cksum/cksum-c.sh: Add new supported SHA2-### tagged variant.
	* NEWS: Mention the new feature.

2025-09-04  Collin Funk  <collin.funk1@gmail.com>

	cksum: add support for SHA-3
	* src/digest.c: Include sha3.h.
	(BLAKE2B_MAX_LEN): Rename to
	DIGEST_MAX_LEN since it is also used for SHA-3.
	(sha3_sum_stream): New function.
	(enum Algorithm, algorithm_args, algorithm_args, algorithm_types)
	algorithm_tags, algorithm_bits, cksumfns, cksum_output_fns): Add entries
	for SHA-3.
	(usage): Mention that SHA-3 is supported. Mention requirements for
	--length with SHA-3.
	(split_3): Use DIGEST_MAX_LEN instead of BLAKE2B_MAX_LEN. Determine the
	length of the digest for SHA-3. Make sure it is 224, 256, 384, or 512.
	(digest_file): Set the digest length in bytes. Use DIGEST_MAX_LEN
	instead of BLAKE2B_MAX_LEN. Always append the digest length to SHA3 in
	the output.
	(main): Allow the use of --length with 'cksum -a sha3'.  Use
	DIGEST_MAX_LEN instead of BLAKE2B_MAX_LEN. Make sure it is 224, 256,
	384, or 512.
	* tests/cksum/cksum-base64.pl (@pairs): Add expected sha3 output.
	(fmt): Modify the output to use SHA3-512 since that is the default.
	(@Tests): Modify arguments for sha3 to use --length=512.
	* tests/cksum/cksum-sha3.sh: New test, based on tests/cksum/b2sum.sh.
	* tests/local.mk (all_tests): Add the test.
	* bootstrap.conf: Add crypto/sha3.
	* gnulib: Update to latest commit.
	* NEWS: Mention the change.
	* doc/coreutils.texi (cksum general options): Mention sha3 as a
	supported argument to the -a option. Mention that 'cksum -a sha3'
	supports the --length option. Mention that SHA-3 is considered secure.

	maint: avoid syntax-check failure from previous commit
	* src/df.c: Don't include uchar.h.
	* src/ls.c: Likewise.
	* src/wc.c: Likewise.

2025-09-04  Collin Funk  <collin.funk1@gmail.com>

	fold: check that characters are not non-breaking spaces when -s is used
	NetBSD 10 and Solaris 11.4 treat non-breaking spaces as blank
	characters unlike glibc.

	* src/system.h: Include uchar.h.
	(c32isnbspace): New function based on iswnbspace from src/wc.c.
	* src/fold.c (fold_file): Use it.
	* src/wc.c (iswnbspace): Remove function.
	(maybe_c32isnbspace): New function.
	(wc, main): Use it.
	Fixes https://bugs.gnu.org/79300

2025-09-04  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer issymlink to readlink with a small buffer
	* bootstrap.conf (gnulib_modules): Add issymlink and issymlinkat.
	* src/copy.c: Include issymlink.h.
	(copy_reg): Use issymlink instead of readlinkat.
	* src/rmdir.c: Include issymlink.h.
	(main): Use issymlink instead of readlink.
	* src/tail.c: Include issymlink.h.
	(recheck, any_symlinks): Use issymlink instead of readlink.
	* src/test.c: Include issymlink.h.
	(unary_operator): Use issymlink instead of readlink.

2025-09-04  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-09-04  Bruno Haible  <bruno@clisp.org>

	build: Update after gnulib changed
	* gnulib-tests/Makefile.am: Move the AM_CFLAGS assignment before the
	'include gnulib.mk'.

2025-09-03  Collin Funk  <collin.funk1@gmail.com>

	maint: avoid syntax-check failure from previous commit
	* tests/seq/seq-long-double.sh: Place comma after "I.e.".

2025-09-02  Pádraig Brady  <P@draigBrady.com>

	seq: be more accurate with large integer start values
	* src/seq.c (main): Avoid possibly innacurate conversion
	to long double, for all digit start values.
	* tests/seq/seq-long-double.sh: Add a test case.
	* NEWS: Mention the improvement.
	Fixes https://bugs.gnu.org/79369

2025-09-01  Paul Eggert  <eggert@cs.ucla.edu>

	df: pacify static analysis
	Problem reported by Yubiao Hu <https://bugs.gnu.org/79336>.
	* src/df.c (get_dev): Assume MOUNT_POINT is non-null.

2025-08-31  Pádraig Brady  <P@draigBrady.com>

	ls: fix alignment with locale formatted --size
	Fix allocated size alignment in locales with multi-byte grouping chars.
	Tested with: LC_ALL=sv_SE.utf8 ls --size --block-size=\'k

	* src/ls.c (print_file_name_and_frills): Don't rely on
	printf("%*s", width, string) to pad multi-byte strings appropriately.
	Instead work out the padding required and use:
	printf("%*s%s", padding, "", string) to pad multi-byte appropriately.
	* tests/ls/block-size.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/79347

2025-08-30  Pádraig Brady  <P@draigBrady.com>

	b2sum: --length: fix upper bound check
	* src/digest.c (main): Don't saturate -l to BLAKE2B_MAX_LEN,
	so that the subsequent bounds check is performed.
	* tests/cksum/b2sum.sh: Add a test case.
	* NEWS: Mention the fix introduced in commit v9.5-71-gf2c84fe63

2025-08-29  Collin Funk  <collin.funk1@gmail.com>

	fold: fix handling of invalid multi-byte characters
	* src/fold.c (fold_file): Continue the loop when we have buffered bytes
	but nothing left to read from the file.
	(adjust_column): Don't assume that the character is printable.
	* tests/fold/fold-characters.sh: Add a new test case.
	(bad_unicode): New function.

2025-08-27  Pádraig Brady  <P@draigBrady.com>

	tests: fold: add tests for multi-byte width
	* tests/fold/fold.pl: The i18n patch didn't actually test folding
	of multi-byte characters, so add tests for various multi-byte forms.

	tests: fold: copy i18n patch tests
	* tests/fold/fold.pl: Copy tests from Fedora,
	removing copy & pasted logic that was
	extraneous to either the i18n patch or upstream.

	tests: parameterize IO_BUFSIZE
	* src/getlimits.c (main): Output IO_BUFSIZE, useful for
	sizing data for tests.
	* tests/fold/fold-characters.sh: Use it rather than hardcoding.

2025-08-27  Pádraig Brady  <P@draigBrady.com>

	build: fold: fix build failure with C99
	GCC 10.2 gave the following error:
	"error: label at end of compound statement"

	* src/fold.c (fold_file): Add a ";" to avoid C2X specific syntax.

2025-08-27  Collin Funk  <collin.funk1@gmail.com>

	fold: don't truncate multibyte characters at the end of the buffer
	* src/fold.c (fold_file): Replace invalid characters with the original
	byte read. Copy multibyte sequences that may not yet be read to the
	start of the buffer before reading more bytes.
	* tests/fold/fold-characters.sh: Add a test case.

2025-08-26  Pádraig Brady  <P@draigBrady.com>

	tests: fold: consolidate all fold tests in tests/fold
	* tests/misc/fold.pl: Move from here to ...
	* tests/fold/fold.pl: ... here.
	* tests/local.mk: Adjust accordingly.

2025-08-26  Pádraig Brady  <P@draigBrady.com>

	tests: fold: add a memory constraint test
	Enforcing this interface behavior is worthwhile
	irrespective of our current implementation,
	to ensure future or other implementations conform.

	* tests/fold/fold-characters.sh: Ensure the fold implementation
	uses bounded memory.

2025-08-24  Collin Funk  <collin.funk1@gmail.com>

	fold: use fread instead of getline
	* src/fold.c: Include ioblksize.h.
	(fold_file): Use two IO_BUFSIZE-sized buffers. Use fread instead of
	getline. Check for if we reached the end of file.

2025-08-24  Pádraig Brady  <P@draigBrady.com>

	tests: nproc: fix false failure on some systems
	* tests/nproc/nproc-quota.sh: Also simulate sched_getscheduler()
	as this will not be called on older or non linux, or
	may return ENOSYS on Alpine.
	Fixes https://bugs.gnu.org/79299

2025-08-24  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer STRUCT_UTMP to struct gl_utmp
	* cfg.mk (sc_prohibit-struct-gl_utmp): New rule for 'make syntax-check'.
	* src/pinky.c (time_string, print_entry, scan_entries, short_pinky):
	Use STRUCT_UTMP instead of struct gl_utmp.
	* src/uptime.c (print_uptime, print_uptime, uptime): Likewise.
	* src/users.c (list_entries_users, users): Likewise.
	* src/who.c (time_string, print_user, print_boottime, print_deadprocs)
	(print_login, print_initspawn, print_clockchange, print_runlevel)
	list_entries_who, scan_entries, who): Likewise.

2025-08-23  Pádraig Brady  <P@draigBrady.com>

	tests: cp: ensure copy offload is not disabled for sparse files
	Related to commits v9.1-109-g879d2180d and v9.7-248-g306de6c26

	* tests/cp/sparse-perf.sh: This edge case was missed a couple of times,
	so add a test to ensure we attempt copy offload.

2025-08-23  Collin Funk  <collin.funk1@gmail.com>

	fold: add the --characters option
	* src/fold.c: Include mcel.h.
	(count_bytes): Remove variable.
	(counting_mode, last_character_width): New variables.
	(shortopts, long_options): Add the option.
	(adjust_column): If --characters is in used account for number of
	characters instead of their width.
	(fold_file): Use getline and iterate over the result with mcel functions
	to handle multibyte characters.
	(main): Check for the option.
	* src/local.mk (src_fold_LDADD): Add $(LIBC32CONV), $(LIBUNISTRING), and
	$(MBRTOWC_LIB).
	* tests/fold/fold-characters.sh: New file.
	* tests/fold/fold-spaces.sh: New file.
	* tests/fold/fold-nbsp.sh: New file.
	* tests/local.mk (all_tests): Add the tests.
	* NEWS: Mention the new option.
	* doc/coreutils.texi (fold invocation): Likewise.

2025-08-23  Paul Eggert  <eggert@cs.ucla.edu>

	cp: improve hole handling on squashfs
	Better fix for problem reported by Jeremy Allison
	<https://bugs.gnu.org/79267>.
	* src/copy.c (struct scan_inference): New type, replacing
	union scan_inference.  All uses changed.  This is so
	infer_scantype can report the first hole's offset when known.
	(lseek_copy): 5th arg is now struct scan_inference const *,
	not just off_t.  All uses changed.
	(infer_scantype): If SEEK_SET+SEEK_HOLE do not find a hole,
	fall back on ZERO_SCANTYPE.

	cp: go back to copy_file_range optimization
	This reverts part of the previous change.
	* src/copy.c (lseek_copy): When calling sparse_copy, do not
	ask it to scan for zeros unless --sparse=always, so that it
	can use copy_file_range which can be far more efficient.

2025-08-21  Paul Eggert  <eggert@cs.ucla.edu>

	cp: always punch holes that we make
	Problem reported by Jeremy Allison <https://bugs.gnu.org/79267>.
	* src/copy.c (create_hole, sparse_copy): Omit arg PUNCH_HOLES,
	as we always punch holes now.  All uses changed.
	(lseek_copy): When calling sparse_copy, scan for holes when
	sparse_mode == SPARSE_AUTO, as that means we are making holes.
	(copy_reg): Always punch any hole made at end.

2025-08-21  Pádraig Brady  <P@draigBrady.com>

	tests: nproc: add a test for cgroup quotas
	* tests/nproc/nproc-quota.sh: New root only test.
	* tests/local.mk: Reference the new test.

2025-08-19  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer https to http
	* doc/sort-version.texi (Other version/natural sort implementations):
	Use https in documentation link.
	* tests/chmod/symlinks.sh: Use https in license text.

2025-08-19  Pádraig Brady  <P@draigBrady.com>

	nproc: honor cgroup v2 CPU quotas
	* NEWS: Mention the new feature.
	* doc/coreutils.texi (nproc invocation): Mention that
	cgroup CPU quotas can limit the reported number.
	* gnulib: Update to new nproc gnulib implementation:
	https://github.com/coreutils/gnulib/commit/9b07115f4a

2025-08-19  Collin Funk  <collin.funk1@gmail.com>

	logname: list David MacKenzie as the author
	* src/logname.c (AUTHORS): List David as the author.
	* AUTHORS: Likewise.

2025-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	realpath: improve doc and NEWS

2025-08-15  Collin Funk  <collin.funk1@gmail.com>

	maint: avoid syntax-check failure from previous commit
	* src/tsort.c: Don't include long-options.h since the previous commit
	removed the call to parse_gnu_standard_options_only. This avoids a
	sc_prohibit_long_options_without_use syntax-check failure.

2025-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	tsort: add do-nothing -w option
	This is for conformance to POSIX.1-2024
	* src/tsort.c: Include getopt.h.
	(main): Accept and ignore -w.  Do not bother altering
	the usage message, as the option is useless.
	* tests/misc/tsort.pl (cycle-3): New test.

2025-08-12  Pádraig Brady  <P@draigBrady.com>

	maint: use short form bug URLs
	* cfg.mk (sc_prohibit-long-form-bug-urls): Disallow long form in code.
	* scripts/git-hooks/commit-msg: Disallow long form in commit messages.
	* NEWS: Shorten long urls.
	* bootstrap.conf: Likewise.
	* configure.ac: Likewise.
	* scripts/git-hooks/commit-msg: Likewise.
	* src/csplit.c: Likewise.
	* src/fmt.c: Likewise.
	* src/make-prime-list.c: Likewise.
	* src/nohup.c: Likewise.
	* tests/od/od-float.sh: Likewise.
	* tests/rm/r-root.sh: Likewise.
	* tests/tail/inotify-race.sh: Likewise.
	* tests/tail/inotify-race2.sh: Likewise.

2025-08-12  Bruno Haible  <bruno@clisp.org>

	basenc: Don't trigger undefined behaviour in mini-gmp
	* src/basenc.c (base58_encode): Avoid calling mpz_import on an empty
	limb sequence.

2025-08-10  Collin Funk  <collin.funk1@gmail.com>

	realpath: support the -E option required by POSIX
	* src/realpath.c (longopts): Add the option.
	(main): Likewise.
	(usage): Add the option to the --help message.
	* tests/misc/realpath.sh: Add a simple test.
	* doc/coreutils.texi (realpath invocation): Mention the new option.
	* NEWS: Likewise.

2025-08-10  Pádraig Brady  <P@draigBrady.com>

	doc: --base58: add example usage to info
	* doc/coreutils.texi (basenc invocation): Add an example
	using --base58 to generate a unique ID.  This also demonstrates
	compound usage of the basenc command, to convert to/from binary.

2025-08-09  Pádraig Brady  <P@draigBrady.com>

	doc: rearrange NEWS to more standard ordering
	* NEWS: Also move items to more appropriate sections.
	Also use more consistent quoting.

2025-08-09  Pádraig Brady  <P@draigBrady.com>

	basenc: add base58 support
	A 58 character encoding that:
	 - avoids visually ambiguous 0OIl characters
	 - uses only alphanumeric characters
	Described at:
	 - https://tools.ietf.org/html/draft-msporny-base58-03

	This implementation uses GMP (or gnulib's gmp fallback).
	Performance is good in comparison to other implementations.
	For example when using libgmp on an i7-5600U system,
	encoding is 530 times faster, and decoding 830 times faster
	than the implementation using arbitrary precision ints in cpython 3.13.

	Memory use is proportional to the size of input.

	Encoding benchmarks:

	  $ time yes | head -c65535 | src/basenc --base58 -w0 >file.enc
	  real    0m0.018s

	  ./configure --quiet --without-libgmp && make -j $(nproc)
	  $ time yes | head -c65535 | src/basenc --base58 -w0 >file.enc
	  real    0m3.431s

	  # dnf install python3-base58
	  $ time yes | head -c65535 | base58 >file.enc  # cpython 3.13
	  real    0m9.700s

	Decoding benchmarks:

	  $ time src/basenc --base58 -d <file.enc >/dev/null
	  real    0m0.010s

	  $ ./configure --without-libgmp && make  # gnulib gmp
	  $ time src/basenc --base58 -d <file.enc >/dev/null
	  real    0m0.145s

	  $ time base58 -d <file.enc >/dev/null  # cpython 3.13
	  real    0m8.302s

	* src/basenc.c (base_decode_ctx_finalize, base_encode_ctx_init,
	base_encode_ctx, base_encode_ctx_finalize): New functions to
	provide more general processing functionality.
	(base58_{de,en}code_ctx{_init,,_finalize}): New functions to
	accumulate all input before calling ...
	(base58_{de,en}code): ... the GMP based encoding/decoding routines.
	(do_encode, do_decode): Call the ctx variants if enabled.
	* doc/coreutils.texi (basenc invocation): Describe the new option,
	and indicate the main use case being interactive user use.
	* src/local.mk: Link basenc with GMP.
	* tests/basenc/basenc.pl: Add test cases.
	* NEWS: Mention the new feature.

2025-08-09  Pádraig Brady  <P@draigBrady.com>

	basenc: fix stripping of '=' chars in some encodings
	* src/basenc.c (do_decode): With -i ensure we strip '=' chars
	if there is no padding for the chosen encoding.
	* tests/basenc/basenc.pl: Add a test case.
	* NEWS: Mention the bug fix.

2025-08-09  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer attribute.h in .c files
	* src/basenc.c (base16_encode, z85_encoding, do_decode): Use
	ATTRIBUTE_NONSTRING instead of ATTRIBUTE_NONSTRING.
	* src/basenc.c (sc_prohibit-_gl-attributes): New rule for
	'make syntax-check'.

2025-08-08  Paul Eggert  <eggert@cs.ucla.edu>

	cp: omit some needless lseek calls
	The sparse code sometimes issued multiple lseeks against the
	same file without doing anything in betwee.  Optimize them away
	by keeping track of the last hole output, in a way that
	crosses the sparse_copy function call boundary.
	* src/copy.c (sparse_copy): New arg hole_size, replacing old args
	scan_holes and last_write_made_hole.  All callers changed.
	(sparse_copy, lseek_copy): Do not create hole at
	end; let the caller deal with it.  All callers changed.
	(lseek_copy): New args hole_size and total_n_read.  Caller changed.
	(copy_reg): Create hole at end for both lseek_copy and sparse_copy.

	cp: --sparse=always was missing some holes
	The sparse code assumed that st_blksize was the minimum hole size.
	However, st_blksize is an optimum I/O buffer size, not the file
	system fundamental block size.  Use ST_NBLOCKSIZE instead;
	although it may underestimate the true block size that just slows
	‘cp’ down a bit, without introducing bugs.
	* src/copy.c (sparse_copy): Arg scan_holes replaces
	the old hole_size arg.  All callers changed.
	(lseek_copy): Remove hole_size arg; no longer needed.
	Caller changed.

2025-08-06  Collin Funk  <collin.funk1@gmail.com>

	maint: use consistent references to standard files in messages
	* cfg.mk (sc_standard_outputs): Add a grep command for source files.
	* src/du.c (main): Use standard input instead of stdin, standard output
	instead of stdout, and standard error instead of stderr in messages.
	* src/nohup.c (main): Likewise.
	* src/sort.c (main): Likewise.
	* src/split.c (main): Likewise.
	* src/stdbuf.c (main): Likewise.
	* src/wc.c (main): Likewise.
	* tests/du/files0-from.pl (@Tests): Adjust test case to new messages.
	* tests/sort/sort-files0-from.pl: Likewise.
	* tests/wc/wc-files0-from.pl: Likewise.

2025-08-04  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: remove now-unused include of 'safe-read.h'
	'make syntax-check' complains:
	  src/tail.c
	  maint.mk: the above files include safe-read.h but don't use it
	  make: *** [maint.mk:737: sc_prohibit_safe_read_without_use] Error 1

	The removal was missed for tail.c in recent commit d3c7072a0950.

	* src/tail.c (safe-read.h): Remove include.

2025-08-04  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer same-inode.h
	This does not change behavior on POSIX platforms; it’s mostly to
	make it clearer when we’re looking for file identity.
	* src/cat.c (main):
	* src/copy.c (struct dir_list, is_ancestor, copy_internal):
	* src/tail.c (struct File_spec, record_open_fd, recheck)
	(tail_forever_inotify, tail_file):
	* src/test.c (binary_operator):
	Use psame_inode, PSAME_INODE, or SAME_INODE instead of comparing
	device and inode numbers by hand.

	tail: refactor ‘failable’
	* src/tail.c (recheck, tail_file): Do not mark a file as tailable
	merely because --retry is not in effect.  Simplify internal logic.
	This should not change behavior; it’s just for clarity and to
	make the code match the comments better.

	tail: fix race between read and fstat
	* src/tail.c (get_file_status): Remove, since after the changes
	described below it would be called in just one place and it’s a
	bit clearer to inline by hand.
	(tail_file): Don’t call fstat after reading the file, as that
	misses changes arriving between read and fstat.  Instead, reuse
	the fstat done before reading the file.

	tail: track errno more accurately
	This matters only in some obscure cases hard to test for.
	* src/tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes)
	(start_lines, tail_bytes, tail_lines, tail): New return
	convention, which reports errno.  All callers changed.
	(recheck): Don’t lose track of errno if a regular file is
	replaced by a symlink.
	(get_file_status): Set errno to 0 on success.
	(tail_file): Be more careful about f->errnum.
	It is now -1 only if the failure was not due to
	a system call failing.

	tail: omit redundant assignment
	* src/tail.c (recheck): f->remote must be true already,
	so don’t set it to true.

	tail: prefer readlink to lstat+S_ISLNK
	When not already calling lstat for some other reason,
	prefer readlink to lstat+S_ISLNK,
	as readlink does not suffer from EOVERFLOW issues.
	* src/rmdir.c (main):
	* src/tail.c (recheck, any_symlinks):
	* src/test.c (unary_operator):

	tail: fix unlikely races with >=2 --pids
	Also, fix commentary to talk about “nonexistent” rather than
	“dead” processes, since the code looks for the former not the
	latter and the difference matters for zombies.
	* src/tail.c (some_writers_exist): Rename from writers_are_dead,
	negate the sense, don’t have a special and counterintuitive case
	for !nbpids, remove PIDs found not to exist, and avoid some
	though not all unlikely races when kernels reuse PIDs.
	(tail_forever): Optimize via blocking I/O even if --pid was used,
	so long as all the writers no longer exist.
	(tail_forever, tail_forever_inotify): Simplify the writers_dead
	logic; there is no need to have a local var to track this, since
	we can use pids and nbpids now.
	(parse_options): Also free and clear pids if !forever.

	tail: prefer < 0 to == -1
	* src/tail.c (valid_file_spec, recheck, writers_are_dead)
	(tail_forever, check_fspec, tail_forever_inotify, tail_file)
	(parse_options, main): Be a bit more systematic about checking
	for sign, rather than for exact equality or inequality,
	when the sign is enough.  Makes the code a bit clearer
	now that -2 sometimes means success.

	tail: record file offset more carefully
	* src/tail.c (struct File_spec): New member read_pos, replacing
	size, since the value was really a read position not a size.
	All uses changed.
	(xlseek): Move defn up.
	(record_open_fd): If the read_pos (formerly) size arg is unknown,
	compute it here if it is a regular file.
	(file_lines): Return the resulting read pos (or -1 on failure)
	instead of storing it via a pointer.  Caller changed.
	Simplify by using SEEK_CUR instead of SEEK_SET when that is easy.
	Avoid reading the same data twice when there are not enough
	lines in the file.
	(pipe_lines): Return -2 on success, -1 on failure, rather than
	updating a read pos via a pointer (which was weird for pipes anyway).
	Caller changed.
	(pipe_bytes, tail_bytes, tail_lines, tail):
	Return -1 on failure, a file offset if known, and < -1 otherwise,
	instead of storing a file offset via a pointer.  Caller changed.
	(pipe_bytes): Take initial file offset as an arg, or -1 if unknown.
	(start_bytes, start_lines): Return -1 (not 1) on error, -2 (not
	-1) on EOF, and do not accept pointer to read pos as an arg since
	neither we nor our caller know the read pos.  Callers changed.
	(recheck): Do not assume a newly-opened file is at offset zero,
	as this is not always true on Solaris.
	(tail_forever, check_fspec): Use dump_remainder result only
	on regular files, to prevent (very unlikely) overflow.
	(tail_file): Remove no-longer-needed TAIL_TEST_SLEEP code.

	maint: prefer 'read' to 'safe_read'
	In the old days, safe_read acted more like what full_read does now.
	When that went away, some code that invoked safe_read should
	have gone back to plain 'read' but I guess we never got around to it.
	Simplify this code by going back to plain 'read'.
	Use safe_read only in csplit.c, which has a signal handler
	and where 'read' can therefore fail with EINTR.
	Although safe_read also checks for oversize buffers,
	that is better done via io_blksize.
	* src/cat.c (simple_cat, cat):
	* src/head.c (copy_fd, elide_tail_lines_pipe)
	* src/tac.c (tac_seekable, copy_to_temp):
	(elide_tail_lines_seekable, head_lines):
	* src/tail.c (dump_remainder, file_lines, pipe_lines)
	(pipe_bytes, start_bytes, start_lines, tail_forever_inotify):
	* src/tr.c (plain_read):
	Use plain 'read', not safe_read, since there is no
	need to worry about signals or oversize requests.
	Also, there is no longer a need to include safe-read.h.
	* src/ioblksize.h: Include sys-limits.h, for SYS_BUFSIZE_MAX.
	(io_blksize): Max out at SYS_BUFSIZE_MAX.

	tail: prefer signed types to size_t, blksize_t
	* src/tail.c (struct File_spec, xwrite_stdout, file_lines)
	(pipe_lines, pipe_bytes, start_bytes, any_live_files)
	(tail_forever, any_remote_file, any_non_remote_file)
	(any_symlinks, any_non_regular_fifo, tailable_stdin)
	(tail_forever_inotify, ignore_fifo_and_pipe, main):
	Prefer a signed type to size_t, if possible.
	Ordinarily this is idx_t, but use int when the value
	must fit in int anyway.
	(file_lines): Similarly for blksize_t, which had no business
	being here anyway.
	(main): Check for overflow in the oddball case where ptrdiff_t is
	narrower than int.

	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.

	tail: don’t output more lines than requested
	* src/tail.c (file_lines): Fix an unlikely bug where ‘tail -n N’
	could output more than N lines if standard input is a largish
	regular file with large initial offset that starts with (say) N-1
	lines after the initial offset, but grows to N+1 lines between the
	fstat and read calls.  In this case ‘tail -n N’ now outputs N-1
	lines, not N+1; that is, it pretends the file grew after ‘tail’
	read it.  That is better than outputting more than N lines.

	tail: xlseek switch → table
	* src/tail.c (xlseek): Turn a switch statement into a table.

	tail: prettyname cleanup
	* src/tail.c: Use ‘prettyname’ consistently as the identifier
	for a prettified file name, as opposed to ‘pretty_filename’,
	‘pretty_name’, and ‘name’.  This makes the code easier to follow.
	(struct File_spec): New member prettyname.
	(pretty_name): Remove.
	All uses of pretty_name (f) replaced by f->prettyname.
	(close_fd, fremote): Accept struct File_spec, not name.
	All callers changed.
	(main): Initialize the new prettyname member.
	This is simpler/smaller than calling pretty_name everywhere.

	tail: optimize tail -n +2**63
	* src/tail.c (tail_lines): Also optimize ‘tail -n +N’
	on a seekable file, where OFF_T_MAX <= N < UINTMAX_MAX.
	Of course this is very unlikely.

	tail: refactor SEEK_END and lines
	* src/tail.c (tail_lines): Refactor to simplify the confusing
	code for using SEEK_END when counting lines.  The old code
	had a ‘end_pos != 0’ expression that was always true.

	tail: refactor to skip stat call on failure
	* src/tail.c (tail_bytes): New function.
	(tail_bytes, tail_lines, tail): Accept struct stat pointer from
	caller instead of calling fstat ourselves.  All callers changed.
	(tail_file): Skip a call to fstat if fstat already failed.
	* tests/tail/follow-stdin.sh: Adjust to match new behavior
	on failure, which omits a redundant diagnostic.

	tail: speed up -c N for huge N
	When the user specifies -c N where 2**63 <= N, don’t give
	up and use the slow method (which will exhaust memory if
	the file is large).  Instead, treat it as N = 2**63 - 1,
	since that has equivalent effect.
	* src/tail.c (tail_bytes): With -c N and large N, adjust
	the code so that lseeks can still be used without
	affecting correctness.  Formerly the code gave up and
	did a sequential pass through the whole input, which
	could easily exhaust memory.

	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.

	tail: check OFF_T_MAX vs COPY_A_BUFFER
	* src/tail.c: Document an otherwise-unstated assumption.

	tail: fix SEEK_END typo
	* src/tail.c (tail_lines): Fix embarrassing SEEK_END typo.
	Luckily this matters only in never-used (though valid) invocations.

	tail: simplify -c+ on regular files
	* src/tail.c (tail_bytes): Simplify the -c+N case by treating
	regular files like other files; if the lseek fails for whatever
	reason, fall back on the unoptimized version instead of reporting
	a fatal error.

	maint: don’t lseek memory objects
	This affects behavior only on memory objects, which are not in Linux.
	Formerly the code would use lseek on these objects,
	but POSIX says the result of lseek is unspecified on them,
	and in QNX lseek has undefined behavior on typed memory objects.
	* src/head.c (elide_tail_bytes_file, elide_tail_lines_file):
	Omit unnecessary uses of presume_input_pipe.
	Improve some out-of-date comments.
	(head): Do not assume a file is seekable merely because its
	st_size is usable.  Instead, seek only on regular files.
	* src/od.c (skip): Do not seek on memory objects.

	wc: don’t assume opening a file puts you at start
	This is not true on Solaris when opening /dev/stdin; it could be
	at a nonzero file offset.  Arguably Linux should do likewise.
	* src/wc.c (wc): Omit last arg, and act as if it is always -1.
	All uses changed.

	head: simplify head_bytes
	* src/head.c (diagnose_read_failure): New function.
	Use it when possible, to simplify callers.
	(head_bytes): Use copy_fd and diagnose_copy_fd_failure instead of
	reinventing the wheel.

	head: omit unnecessary lseek
	* src/head.c (elseek_diagnostic): New function.
	(elseek): Use it.
	(head_lines): Use it to avoid an unnecessary lseek.

2025-08-03  Collin Funk  <collin.funk1@gmail.com>

	readlink: improve documentation for POSIXLY_CORRECT in --help
	* NEWS: Improve wording to not imply POSIXLY_CORRECT=1 readlink -q will
	be verbose.
	* src/readlink.c (usage): Mention the affect of POSIXLY_CORRECT on
	-s (--silent), -q (--quiet), and -v (--verbose) in the help message.
	(main): Remove spurious newline added by previous commit.
	* doc/coreutils.texi (readlink invocation): Mention that -s (--silent)
	and -q (--quiet) are not the default when POSIXLY_CORRECT is set.

	readlink: emit errors when POSIXLY_CORRECT is set
	* src/readlink.c (main): Set verbose if the POSIXLY_CORRECT environment
	variable is set.
	* tests/readlink/readlink-posix.sh: New file.
	* tests/local.mk (all_tests): Add it.
	* NEWS: Mention the change.
	* doc/coreutils.texi (readlink invocation): Document the behavior of
	POSIXLY_CORRECT.

2025-08-02  Pádraig Brady  <P@draigBrady.com>

	doc: mention copy_file_range data corruption avoidance
	* NEWS: Mention this important data corruption issue.

2025-08-02  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-08-01  Bruno Haible  <bruno@clisp.org>

	maint: date: refactor to be entirely bottom-up
	* src/date.c (show_date_helper): Move function. Remove forward
	declaration.

	date: fix calendar-related test failures on macOS and OpenBSD
	* bootstrap.conf (gnulib_modules): Add xsetenv.
	* src/date.c: Include xsetenv.h.
	(set_LC_TIME): New function.
	(show_date_helper): Call set_LC_TIME instead of setlocale.
	* po/POTFILES.in: Add lib/xsetenv.c.
	Fixes https://bugs.gnu.org/79118

2025-08-01  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest

	build: fix previous commit
	* src/local.mk (src/speedlist.h): Pass correct arguments $(COMPILE). Use
	tabs consistently.

2025-07-31  Collin Funk  <collin.funk1@gmail.com>

	build: don't use '$<' in non-suffix rules
	* src/local.mk (src/speedlist.h): Use the file name instead of '$<'
	which is not supported by OpenBSD make.

2025-07-29  Pádraig Brady  <P@draigBrady.com>

	du: improve diagnostics for --time-style
	* src/system.h (x_timestyle_args): A new function refactored from ...
	* src/ls.c (decode_switches): ... here.
	* src/du.c: Use refactored x_timestyle_args() to output a custom error.
	Addresses https://bugs.gnu.org/79113

	doc: use consistent references to standard files
	* cfg.mk (sc_standard_outputs): A new syntax check to
	enforce standard references.
	* doc/coreutils.texi: s/stderr/standard error/ etc.
	* src/date.c: Likewise.
	* src/dd.c: Likewise.
	* src/env.c: Likewise.
	* src/sort.c: Likewise.
	* src/split.c: Likewise.
	* src/stty.c: Likewise.
	* src/timeout.c: Likewise.
	* src/who.c: Likewise.

2025-07-27  Collin Funk  <collin.funk1@gmail.com>

	doc: update git version documented in HACKING
	* HACKING: Mention that git version 1.6.4 or later is required since
	'./bootstrap' will fail otherwise.

2025-07-27  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention 2025 speedup on large composites

2025-07-26  Pádraig Brady  <P@draigBrady.com>

	maint: avoid :> pattern in tests
	This was seen to trigger the EXIT trap on cygwin

	* cfg.mk (sc_prohibit_colon_redirection): Disallow all
	cases of :> in tests/
	* tests/cksum/md5sum-bsd.sh: Adjust to avoid more
	stringent syntax check.

2025-07-26  Collin Funk  <collin.funk1@gmail.com>

	tests: avoid a false failure on Cygwin
	* tests/cksum/md5sum-bsd.sh: Use 'echo' instead of ':' to redirect to
	the file. Otherwise 'Exit $fail' is not called on Cygwin.

	maint: avoid syntax-check failure from previous commit
	* src/test.c (binary_operator): Place string argument on a separate line
	to avoid sc_error_quotes syntax-check failure.

2025-07-25  Paul Eggert  <eggert@cs.ucla.edu>

	test: simplify for clarity
	This should help avoid further audit confusion,
	such as was just fixed by removing a FIXME.
	* src/test.c (enum binop): New type.
	(get_mtime): Return a struct timespec instead of returning
	a bool and storing a struct timespec.  All callers changed.
	(binop): Return an int recording either success (an enum binop)
	or failure (-1).  All callers changed.
	(binary_operator): Accept an enum binop, so that we need
	not recompute the op type.  All callers changed.  Simplify.

2025-07-25  Harry Fellowes  <harryfellowes1@gmail.com>  (tiny change)

	test: removed dead code for unrecognised binary operators
	the fallback error in binary_operator() was unreachable, since invalid
	binary operators are rejected in three_arguments() via binop() which
	returns false and prevents entry into binary_operator().

	this dead code was unreachable and safe to remove

	ref: line 636 where "binary operator expected" is generated.

2025-07-23  Collin Funk  <collin.funk1@gmail.com>

	tests: date: add tests for the Ethiopian calendar
	* tests/date/date-ethiopia.sh: New file.
	* tests/local.mk (all_tests): Add the test.

	tests: date: add tests for the Solar Hijri calendar
	* tests/date/date-iran.sh: New file.
	* tests/local.mk (all_tests): Add the test.

2025-07-22  Pádraig Brady  <P@draigBrady.com>

	install: with -d, use more accurate diagnostics
	* gnulib: Update to latest to get the fix to
	propagate the appropriate error message.
	* tests/install/basic-1.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Addresses https://bugs.gnu.org/79072

2025-07-22  Collin Funk  <collin.funk1@gmail.com>

	tests: date: add tests for the Thai solar calendar
	* tests/date/date-thailand.sh: New file.
	* tests/local.mk (all_tests): Add the test.

2025-07-21  Collin Funk  <collin.funk1@gmail.com>

	doc: NEWS: mention that 'date' now supports non-Gregorian calendars
	Suggested by Bruno Haible in:
	<https://lists.gnu.org/r/bug-gnulib/2025-07/msg00091.html>.

	* NEWS: Mention the improvement.

2025-07-21  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest
	* bootstrap: Update using './bootstrap --bootstrap-sync'.

2025-07-21  Bruno Haible  <bruno@clisp.org>

	date: update documentation regarding non-Gregorian calendars
	* doc/coreutils.texi (Calendars): New section.

	date: force a Gregorian calendar for options --iso-8601 and --rfc-3339
	* src/date.c (show_date_helper): Add a use_c_locale parameter.
	(batch_convert): Add a format_in_c_locale parameter.
	(main): Set format_in_c_locale to true if any of the options --rfc-3339,
	--iso-8601, -R is seen.

2025-07-12  Pádraig Brady  <P@draigBrady.com>

	tests: sort: add a test for equivalent floats
	* tests/sort/sort-float.sh: Ensure equivalent floats
	are treated as such.

2025-07-11  Paul Eggert  <eggert@cs.ucla.edu>

	tests: fix fraction comparison in sort-float
	Problem reported by Cosima Neidahl <https://bugs.gnu.org/78985#13>.
	* tests/sort/sort-float.sh: At top level, use C locale at first.
	(dbl_minima_order): Assume C locale.
	Use string comparison for the fractional parts.

	2025-07-10  Paul Eggert  <eggert@cs.ucla.edu>

	tests: fix integer overflow in sort-float
	Problem reported by Cosima Neidahl <https://bugs.gnu.org/78985>.
	* tests/sort/sort-float.sh (dbl_minima_order):
	Use expr instead of test, to avoid problems with integers
	too large for the shell.

2025-07-10  Paul Eggert  <eggert@cs.ucla.edu>

	tests: fix integer overflow in sort-float
	Problem reported by Cosima Neidahl <https://bugs.gnu.org/78985>.
	* tests/sort/sort-float.sh (dbl_minima_order):
	Use expr instead of test to compare fractions,
	to avoid problems with integers too large for the shell.

	factor: remove SINGLE_WORKS
	* src/factor.c (SINGLE_WORKS): Remove, and remove its use,
	as the buggy code that it is referring to has been removed.

	factor: use 64-bit internal counters
	* src/factor.c (factor_using_pollard_rho)
	(factor_using_pollard_rho2, mp_factor_using_pollard_rho):
	Use int_fast64_t for internal counters rather than int, as int
	could overflow on some somewhat-practical examples.  Problem
	discovered on a hypothetical platform where W_TYPE_SIZE is neither
	32 nor 64, when factoring 0x7ffffffffffffeab7fffffffffff7369 ==
	170141183460469225450570946617781744489, causing k to overflow in
	mp_factor_using_pollard_rho.  Presumably a similar problem exists
	in the previous stable coreutils 9.7, too, on 32-bit platforms
	with somewhat-larger test cases, though I haven’t take the
	somewhat-extensive CPU time to discover it.

	factor: fix mp_factor_using_pollard_rho aliasing
	* src/factor.c (mp_factor_using_pollard_rho):
	Fix recently-introduced aliasing bug by computing q
	before g gets updated in place.  Problem discovered
	on a hypothetical platform where W_TYPE_SIZE
	is neither 32 nor 64.

	maint: fix apostrophe in old NEWS

	factor: speed up converting strings to uuint
	* src/factor.c: Do not include c-ctype.h.
	(strtouuint): Don’t bother generating a number on
	error; just return a strtol_error value other than LONGINT_OK.
	Speed up overflow checking.

	factor: simplify primes table
	* src/factor.c (primes_ptab): New table of primes, replacing
	primes_diff and primes_diff8.  All uses changed.  This is simpler
	and should improve performance slightly.  Although this limits the
	table’s primes to 2**15 instead of to 668221, the limit can easily
	grow to 2**32 by changing the type of ‘prime’, without hurting
	performance significantly compared to the primes_diff and
	primes_diff8 approach.
	* src/make-prime-list.c (output_primes):
	For each prime p, output p instead of two differences.

	factor: prefer false for boolean 0
	* src/factor.c: Prefer false to 0 for booleans.

	maint: port speedgen to FreeBSD 15
	* src/speedgen: Avoid ‘trap 'command' ERR’, as ERR
	does not conform to POSIX and does not work in
	FreeBSD 15 sh.

	factor: speed up Pollard-rho loop counters
	* src/factor.c (factor_using_pollard_rho)
	(factor_using_pollard_rho2, mp_factor_using_pollard_rho):
	Use int, not unsigned long int, for counters that won’t go above
	2**31 on practical platforms.  This yields a significant speedup
	on GCC 15 x86-64, and using signed values allows for automatic
	checks for overflow when using gcc -fsanitize=undefined.

	factor: avoid an mpz init+clear
	* src/factor.c (mp_factor_insert_ui): Rename fom
	mp_factor_insert_ui, and change arg type from unsigned long int to
	mp_limb_t.  All uses changed.  This avoids creating and freeing a
	small mpz_t.
	(mp_factor_using_division): Add a static assert requiring that
	that mp_limb_t be wide enough, which it should be (and is in
	standard GMP).

	factor: Pollard-rho a is now mp_limb_t
	* src/factor.c (factor_using_pollard_rho)
	(factor_using_pollard_rho2): Use mp_limb_t, not unsigned long int,
	for a parameter.  This avoids some casts, and avoids a theoretical
	bug where converting to mp_limb_t loses info.

	factor: redo ge2 in terms of lt2
	lt2 a bit more natural, given the current implementation.
	* src/factor.c (lt2): New function.
	(ge2): Rewrite in terms of lt2.
	(gt2): Remove.  All callers changed to use lt2.

	factor: speed up umul_ppmm when !USE_LONGLONG_H
	* src/factor.c (umul_ppmm): When !USE_LONGLONG_H so we need to
	define this, speed things up if there is an unsigned type uuroom_t
	wide enough to hold two words.  Do not make a similar change for
	udiv_qrnnd, as it is not performance critical and anyway on GCC 15
	x86-64 that would mean a subroutine call.

	factor: streamline gcd2_odd
	* src/factor.c (gcd2_odd): Omit a gt2 and adjusts other
	tests accordingly.  Omit duplicate code that makes A odd.

	factor: faster gcd_odd since 2nd is odd
	* src/factor.c (gcd_odd, gcd2_odd): Speed up, given that the
	second argument is always odd.
	(gcd_odd): Avoid recomputing a temporary.
	(gcd2_odd): Test for zero only if a multiple of B.
	This saves an ‘assume’.

	doc: update ‘factor’ benchmarks

	factor: prefer exact division
	* src/factor.c (mp_factor_using_division, mp_factor_using_pollard_rho):
	Use exact division when it suffices, as it’s typically faster.

	factor: tune submod2
	* src/factor.c (submod2): Use ckd_sub to subtract by hand rather
	than using sub_ddmmss plus a compare.  This speeds things up a
	bit, on x86-64 with GCC 15 anyway.

	factor: DELIM and DIVBLOCK no longer macros
	* src/factor.c (DELIM): Now a constant, not a macro.
	(divblock): Now a static inline function, not a macro DIVBLOCK.
	All uses changed.

	factor: simplify by assuming !PROVE_PRIMALITY
	* src/factor.c (PROVE_PRIMALITY, mp_millerrabin): Remove.
	All uses removed, and surrounding code simplified.

	factor: simplify by assuming USE_BAILLIE_PSW
	* src/factor.c (make_uuint2, powm, powm2, millerrabin)
	(millerrabin2, USE_BAILLIE_PSW): Remove; no longer used.
	(prime_p, prime2_p): Simplify by assuming USE_BAILLIE_PSW.

	factor: prime comments
	* src/factor.c: Add comments re prime functions.

	factor: no ferror+fclose
	* src/make-prime-list.c (main): Avoid parallel calls
	to ferror and fclose.

	factor: define SQUARE_OF_FIRST_OMITTED_PRIME
	* src/make-prime-list.c (output_primes): Output
	SQUARE_OF_FIRST_OMITTED_PRIME, not FIRST_OMITTED_PRIME.  All uses
	changed.  This way, the uses don’t need to worry about casts to
	avoid overflow.

	factor: simplify add_ssaaaa default
	* src/factor.c (add_ssaaaa): Simplify default implementation.

	factor: speed up ge2, gt2
	* src/factor.c (ge2, gt2): Now branchless static functions.

	factor: improve millerrabin2 API
	* src/factor.c (make_uuint2): New function.
	(powm2, millerrabin2): Pass two-word args as uuints,
	not as mp_limb_t const [2] pointers.  All uses changed.
	(prime2_p): Rework to use the new API, fixing a FIXME.

	factor: put FACTORS first
	* src/factor.c (factor_using_division, mp_finish_up_in_single)
	(mp_finish_in_single, factor_using_pollard_rho)
	(factor_using_pollard_rho2, factor_up, factor):
	Put FACTORS arg first, for consistency.
	This is just a refactoring and should not affect speed.

	factor: use 1-word code only when tested
	* src/factor.c (print_factors): Use single-precision code only
	when word size is 32 or 64, as it isn't tested for other sizes and
	is known to not work when it the size is 128.  This change does
	not affect any known practical platforms.

	factor: decrement Miller-Rabin tests from 25 to 24
	This avoids some seemingly-unnecessary code in mpz_probab_prime_p.
	* src/factor.c (MR_REPS): Shrink from 25 to 24, and add commentary.

	factor: don’t prove primality
	Suggested for consideration by Torbjörn Granlund in:
	https://lists.gnu.org/r/coreutils/2025-01/msg00000.html
	* src/factor.c (PROVE_PRIMALITY): Now defaults to false.
	(mp_prime_p): Help the compiler by telling it mpz_prob_prime_p
	returns nonnegative.
	* tests/factor/create-test.sh (bigprime): Test 2^400 - 593,
	since that’s now practical.
	* tests/local.mk (factor_tests): Add new test.

	factor: add comments to factor.c

	factor: always use Baillie-PSW
	* src/factor.c (USE_BAILLIE_PSW): New constant.
	(prime_p, prime2_p): Use it, i.e., always use Baillie-PSW.
	Do so by using mp_prime_p.  Do not tell GCC these functions
	are pure; the pure mark was present only to pacify GCC
	and is no longer needed now that thes functions call mp_prime_p.

	build: update gnulib submodule to latest

	factor: use mpz_probab_prime_p
	Inspired by a proposal by Torbjörn Granlund in:
	https://lists.gnu.org/r/coreutils/2025-01/msg00000.html
	* src/factor.c (mp_prime_p): Use mpz_probab_prime_p rather than doing
	it by hand, as mpz_probab_prime_p uses Baillie-PSW which is a win.
	This removes the need for the ret2 label and goto.

	factor: don’t give up before last prime in table
	* src/factor.c (prime_p, prime2_p, mp_prime_p): Do not skip the
	flag_prove_primality test for the last prime in the table, i.e.,
	when r == PRIMES_PTAB_ENTRIES - 1.
	(mp_prime_p): There is no longer a need for the ret1 label or goto.

	factor: move prime_p local in
	* src/factor.c (mp_prime_p): Refactor by moving local further in.

	factor: port back to mini-gmp
	mini-gmp lacs mpn_tdiv_qr, so supply an emulation of it
	when using mini-gmp.
	* src/factor.c (copy_mpn_from_mpz, mpn_tdiv_qr) [!mpn_tdiv_qr]:
	New functions.

	factor: speed up multiprecision Pollard’s rho
	These changes are taken from a proposal by Torbjörn Granlund in:
	https://lists.gnu.org/r/coreutils/2025-01/msg00000.html
	On my x86-64 platform, they improve speed by more than 8× when
	factoring 340282366920938463463374607431768211457.
	* src/factor.c (mp_modadd, mp_modsub, mp_modadd_1, mp_mulredc):
	New functions.
	(MP_FACTOR_USING_POLLARD_RHO_N_MAX): New macro.
	(mp_factor_using_pollard_rho): Act on mpn not mpz, and on
	mp_limb_t not unsigned long int.  Reorder args.  All uses changed.

	factor: use function for binv
	* src/factor.c (binv_limb): New function, replacing the old
	binv macro.  All uses changed.

	factor: use a more functional style
	This is mostly to make the code a bit easier to read.
	It shrinks the size of factor.o by 0.7% on my x86-64 platform
	though it doesn’t affect CPU performance significantly.
	* src/factor.c (mp_no_factors): Rename from mp_factor_init.
	(mp_no_factors, mp_factor_using_division, mp_factor):
	Return struct mp_factors rather than modifying one passed by reference.
	All uses changed.

	factor: use single vector in struct mp_factors
	* src/factor.c (struct mp_factor): New type.
	(struct mp_factors): Use it to replace P and E with F.
	All uses changed.

	factor: omit unnecessary divisions by small primes
	* src/factor.c (mp_factor_using_division):
	When continuing in single precision, don’t divide by primes that
	were already cast out in multiple precision.
	On my platform this gave a 2.5% speedup when factoring
	2**128 + 172261 = 4999 * 68070087401668026297934508388031283,
	as W_TYPE_SIZE == 64 and 4999 is the last prime in the primes table.

	factor: use primes_diff more consistently
	* src/factor.c (mp_factor_using_division): Use index into
	primes_diff consistently with other uses.  This is mostly just a
	style change, and likely doesn’t change the generated machine code.

	factor: refactor to for later performance speedup
	This does not affect performance much, but it should allow future
	performance improvements.
	* src/factor.c (factor_using_division): Two new args I and P,
	which generalize this function.  All uses changed.
	(mp_finish_up_in_single, factor_up): New functions, like the
	non-*_up* versions but with two new args PRIME_IDX and PRIME.
	They mostly just have the old body of the old non-*_up_ versions.
	(mp_finish_in_single, factor): Rewrite in terms of the new functions.

	factor: switch from mp to single when doable
	This significantly improves performance when a number exceeds
	2**(W_TYPE_SIZE - 1) and is the product of a prime less than
	FIRST_OMITTED_PRIME and another prime less than 2**(W_TYPE_SIZE - 1).
	On my platform, for example, it doubled the speed of factoring
	4999 * (2**128 - 159).
	* src/factor.c (mp_size, mp_finish_in_single): New functions.
	(mp_factor_using_division, mp_factor_using_pollard_rho):
	Finish using single precision when possible.
	* tests/factor/factor.pl (lt-5000-times-128-bit): New test.

	factor: primes_diff idx type consistency
	* src/factor.c (factor_insert_refind):
	Use idx_t for indexes into primes_diff,
	for consistency with other indexes into primes_diff.
	This has no practical effect unless the primes_diff
	table becomes unreasonably large.

	factor: omit q from mp_factor_using_division
	* src/factor.c (mp_factor_using_division): Remove unused local.

	factor: mp insert multiplicity too
	Support a multiplicity argument in the mp case, too.
	This helps keeps the two cases in sync, for maintenance.
	* src/factor.c (mp_factor_insert, mp_factor_insert_ui):
	New arg M, for multiplicity.  All callers changed.

	factor: prefer non-macros
	Use something other than a macro when that is easy and won’t hurt
	performance.
	* src/factor.c (__ll_B, __ll_lowpart, _ll_highpart) [!USE_LONGLONG_H]:
	(MAX_NFACTS, highbit_to_mask, factor_insert, PRIMES_PTAB_ENTRIES):
	Make these enums, or constants, or static functions instead of macros.
	(highbit_to_mask): Rename from HIGHBIT_TO_MASK.  All uses changed.

	factor: let builder specify MR_REPS
	* src/factor.c (MR_REPS): Let the builder specify it
	with -DMR_REPS=whatever.

	factor: add comments

	factor: factor insertion simplifications
	* src/factor.c (factor_insert_multiplicity):
	Adjust to keep in sync with mp_factor_insert changes below,
	by adding 1 to the index and using memmove to move.
	(mp_factor_insert): Omit redundant call to mpz_cmp.
	Prefer idx_t (always nonnegative) to ptrdiff_t,
	by adding 1 to the indexes.
	Prefer mpz_init_set to mpz_init+mpz_set.
	Use memmove to move, rather than doing it by hand.

	factor: check unsigned char counts
	* src/factor.c (MAX_NFACTS): Allow word size of 128 bits,
	even if this is only theoretical now.
	Check that struct factors’s unsigned char counts won’t overflow.

	factor: fix comment

	factor: paren cleanup
	* src/factor.c (umul_ppmm, udiv_qrnnd, addmod, addmod2, submod2)
	(binv, divexact_21, redcify2, div_smallq): Omit unnecessary parens.

	factor: simplify longlong.h setup
	* src/factor.c (USE_LONGLONG_H):
	Default to false on unusual (but standard-conforming)
	platforms that lack int64_t etc.
	(UWtype, UHWtype): Now typedefs, not macros.
	(UQItype): Remove.
	(SItype, USItype, DItype, UDItype): Use standard C types.

	factor: prefer uuint to two words in a couple of places
	This simplifies things slightly by using uuint for
	some two-word integers.
	* src/factor.c (strtouuint): Accept uuint *, not two mp_limb_t *.
	All callers changed.
	(print_factors_single): Accept uuint, not two limbs.
	All callers changed.
	(print_factors): Use simpler test for high bit,
	one that need not worry about promoting to int.

	factor: FALLTHROUGH instead of break
	* src/factor.c (print_factors): Use FALLTHROUGH
	to make it clear that the "Use GMP" comment also applies here.

	factor: remove wide_uuint
	Simplify by using GMP’s word type instead of pretending to roll our own.
	* src/factor.c (wide_uuint): Remove.  All uses replaced by mp_limb_t.
	(umul_ppmm) [!umul_ppmm]: Don’t assume unsigned long is at least half
	as wide as mp_limb_t.  This simpler anyway.
	(strtouuint): Rename from strto2wide_uint.  All uses changed.

	factor: use same word size as GMP
	Remove experimental code for 128-bit words as it does not work and
	we lack time to figure out why.  Instead, ensure that words are
	the same size as with GMP.
	* src/factor.c (USE_INT128): Remove.  All uses removed.
	(wide_uint, W_TYPE_SIZE): Define to be the same as GMP.
	(MP_LIMB_MAX): New macro.  Check that it matches W_TYPE_SIZE.
	(USE_LONGLONG_H): Default to true.
	(UHWtype) [USE_LONGLONG_H]: Define to unsigned int, same as GMP.
	(prime_p): Go back to not worrying about 128-bit words,
	since GMP doesn’t worry and doesn’t use them.
	(lbuf_putbitcnt): New function, since we cannot assume
	that bitcnt_t fits into mp_limb_t.
	(print_factors): Use it.
	* src/make-prime-list.c (output_primes):
	Don’t assume that wide_uint’s maximum is UINTMAX_MAX.

	factor: unsigned long → mp_bitcnt_t
	* src/factor.c (struct mp_factors): e (multiplicity) member
	is now of type mp_bitcnt_t, not unsigned long int, since
	its value is at most a bit count.  All uses changed.

	factor: fix test case name
	* tests/factor/factor.pl (bug-gmp-plus_2_sup_127_plus_1):
	Rename from bug-gmp-plus_2_sup_128_plus_1, so that
	it accurately reflects the test case.

	factor: generalize BIG_POWER_OF_10
	* src/factor.c (BIG_POWER_OF_10, LOG_BIG_POWER_OF_10):
	Place fewer restrictions on BIG_POWER_OF_10.
	This is only for currently-theoretical hosts;
	it shouldn’t affect machine code on practical platforms.

	factor: remove wide_int
	* src/factor.c (wide_int): Remove, since it gets in the
	way of using mp_limb_t for words.  All uses removed.
	(submod2, HIGHBIT_TO_MASK, divexact_21):
	Rewrite without using wide_int.
	This shouldn't change the machine code these days,
	as compilers are pretty smart about isolating the
	top bit of an unsigned int.

	factor: add platform sanity check
	* src/factor.c: Check against theoretical platform.

	factor: squfof cleanup
	* src/factor.c (USE_SQUFOF, STAT_SQUFOF):
	Assume these are always false, and simplify the code accordingly.
	We can bring it back later if needed be.

	factor: don’t used uninitialized uu[0]
	In practice there’s no bug but we might as well avoid the
	undefined behavior.
	* src/factor.c (hi_is_set): New static function.
	(factor_insert_large, prime2_p, print_factors_single): Use it.

2025-07-05  Pádraig Brady  <P@draigBrady.com>

	build: avoid make distcheck error
	* src/local.mk: Similarly to commit v8.22-156-g09937e9d0
	track speedlist.h with nodist_src_stty_SOURCES and DISTCLEANFILES
	to ensure the make distcheck manifest comparison passes.
	Addresses https://bug.gnu.org/78960

2025-07-05  Collin Funk  <collin.funk1@gmail.com>

	doc: fix a dead link
	* doc/coreutils.texi (Block Size): Use an updated link to SI prefixes.

2025-07-05  Pádraig Brady  <P@draigBrady.com>

	build: fix non parallel VPATH builds
	* src/local.mk: Use the coarser BUILT_SOURCES mechanism
	to generate speedlist.h, rather than a specific dependency
	(which did seem to work for parallel builds).
	Fixes https://bugs.gnu.org/78960

2025-07-05  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer endian.h macros to WORDS_BIGENDIAN, part 2
	* src/blake2/blake2-impl.h: Include endian.h. Use BYTE_ORDER and
	LITTLE_ENDIAN instead of WORDS_BIGENDIAN.

2025-07-04  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer endian.h macros to WORDS_BIGENDIAN
	* src/od.c: Include endian.h.
	(WORDS_BIGENDIAN): Remove definition.
	(main): Use BYTE_ORDER, BIG_ENDIAN, LITTLE_ENDIAN instead of
	WORDS_BIGENDIAN. Fix formatting.

2025-07-03  Collin Funk  <collin.funk1@gmail.com>

	maint: add files generated by 'make ps' to .gitignore
	* doc/.gitignore (/coreutils.ps, /coreutils.t2d/): Add entries.

	doc: remove outdated TODO/FIXME items
	* TODO: Remove note about missing documentation for 'pinky' and '['.
	* doc/coreutils.texi: Likewise.

2025-07-01  Pádraig Brady  <P@draigBrady.com>

	tests: cat: add test for O_APPEND bug fix
	* tests/cat/cat-self.sh: Add a test case
	for commit v9.6-19-g7386c291b

	doc: remove extraneous double quotes within @samp{}
	* doc/coreutils.texi (df invocation): @samp{} items
	are suitably quoted already.

2025-07-01  Collin Funk  <collin.funk1@gmail.com>

	doc: use ``...'' instead of "..."
	* doc/coreutils.texi (split invocation): Use ``...'' for quoting text.
	(cksum common options): Likewise.
	(Control): Likewise.

2025-07-01  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure due to varied ERANGE errors
	* tests/od/od.pl: Use the system error string for ERANGE,
	rather than hardcoding a particular one.
	Fixes https://bugs.gnu.org/78934

2025-06-30  Paul Eggert  <eggert@cs.ucla.edu>

	od: port to Apple clang 14
	* src/od.c (print_function_type): New type.  Use it for convenience.
	(width_bytes): Omit duplicate entries, such as ‘double’ vs ‘long
	double’ on macOS.  Problem reported by Bruno Haible
	<https://bugs.gnu.org/78933>.
	(decode_one_format): Cast null pointer to print_function_type
	to pacify Apple clang-1400.0.29.202.

2025-06-30  Pádraig Brady  <P@draigBrady.com>

	build: fix VPATH builds with --enable-single-binary
	* src/local.mk: Adjust the dependency so that speedlist.h
	is built irrespective of the object file name.
	Note we could use BUILT_SOURCES for this,
	but it's better to have this more accurate dependency.

2025-06-30  Pádraig Brady  <P@draigBrady.com>

	od: reinstate half float validation check
	Reinstate check removed in commit 56aa549a0 so that we
	disallow -f2 when configured with utils_cv_ieee_16_bit_supported=no.
	Otherwise the output routines will consume floats,
	i.e. 4 bytes at a time.  Without this extra check
	the tests/od/od-endian.sh will fail with this configuration.

	* src/od.c (decode_one_format): Reinstate the explicit check
	for this configuration edge case.

2025-06-30  Pádraig Brady  <P@draigBrady.com>

	maint: avoid sc_prohibit-quotearg failure
	* src/od.c (parse_old_offset): s/quotearg_colon/quotef/.

2025-06-30  Paul Eggert  <eggert@cs.ucla.edu>

	od: add test cases for recent fix
	* tests/od/od.pl: New tests for the offset issues

	od: more minor fixes for offsets
	* src/od.c (parse_old_offset): Reject invalid offsets like "++0".
	Treat overflowing offsets as errors, not as file names.

	od: refactor parse_old_offset
	* src/od.c (parse_old_offset): Refactor for brevity and clarity.

	maint: fix version in NEWS
	* NEWS: Update version number as per Jim Meyering
	<https://bugs.gnu.org/78880#46>.

	od: pacify gcc -Wduplicated-cond
	Problem reported by Pádraig Brady <https://bugs.gnu.org/78880#43>.
	This patch doesn’t fix any bugs; it merely pacifies GCC.
	* src/od.c (ispec_to_format): New function, replacing
	the old ISPEC_TO_FORMAT macro.  All uses changed.
	This part of the change is just refactoring.
	(decode_one_format): Pacify à la ispec_to_format.

2025-06-29  Paul Eggert  <eggert@cs.ucla.edu>

	od: be more consistent re sizeof
	* src/od.c (width_bytes, decode_one_format): Don’t assume a signed
	type has the same size as the corresponding unsigned type.
	This has no effect on practical platforms; it’s just for
	consistency there.

	od: fix integer overflow with large pseudos
	* src/od.c (format_address_label): Diagnose overflow.

	od: speed up -S
	* src/od.c (read_char): Use getc, not fgetc.

	od: check sign bit more often
	* src/od.c (read_char, dump_strings, main):
	Instead of testing for an exact negative number,
	just look at the sign bit.  This is a very minor tweak.

	od: simplify away one loop copy
	* src/od.c (dump): Coalesce two loops into one.

	od: simpler static initialization
	* src/od.c (address_base, address_pad_len, format_address):
	Initialize statically rather than dynamically.
	(limit_bytes_to_format): Remove.  All uses replaced by
	checking sign of end_offset.
	(max_bytes_to_format): Remove static var.  Now local to ‘main’.
	(end_offset): -1 now means no limit.  All uses changed.

	od: minor lcm tuning
	* src/od.c (dump, main): Redo lcm calcuations to avoid a multiply.

	od: omit some duplicate code
	On x86-64 (for example) print_long, print_long_long, and
	print_intmax all behave identically, so give GCC enough info so
	that it generates code for just one of these functions.
	* src/od.c (enum size_spec): Arrange for enum values to
	be the same if they represent types that behave the same.
	(width_bytes, ISPEC_TO_FORMAT, decode_one_format):
	Match the enum size_spec changes.

	od: replace lookup tables with simple arithmetic
	* src/od.c (FMT_BYTES_ALLOCATED): Use a simpler formula.
	Although slightly too generous, the storage wasted is very small
	and it pacifies gcc -Wformat-overflow=2.
	(bytes_to_oct_digits, bytes_to_signed_dec_digits)
	(bytes_to_unsigned_dec_digits, bytes_to_hex_digoits): Remove.
	All uses replaced by algorithmic calculations, which are good
	enough: they are valid for integers up to 2620 bits (!) and might
	be slightly conservative for wider integers.  Remove related
	static_asserts, which are no longer needed.

	od: support uintmax_t too
	This has practical effect only on hypothetical platforms where
	uintmax_t is wider than unsigned long long int.
	* src/od.c (enum size_spec): New constant INTMAX.
	(MAX_INTEGRAL_TYPE_WIDTH): Now equals UINTMAX_WIDTH.
	(FMT_BYTES_ALLOCATED): Allow for the extra "l" in "%lld".
	Also, fix off-by-two error in size calculation.
	(width_bytes, integral_type_size): Add entries for uintmax_t.
	(print_intmax): New function.
	(decode_one_function): Use it.
	(ISPEC_TO_FORMAT): New arg Max_fmt. All uses changed.

	od: initialize type-size tables statically
	* src/od.c (NO_SIZE): Make it explicitly 0, as the
	initializers now rely on this.
	(MAX_INTEGRAL_TYPE_SIZE): Remove.  All uses replaced by
	ARRAY_CARDINALITY (integral_type_size) - 1.
	Move static assertion down to where this can be used.
	(integral_type_size, fp_type_size): Make them const,
	and initialize them statically.
	(main): Omit no-longer-needed initialization code.

	od: prefer intmax_t to uintmax_t
	* src/od.c (MAX_ADDRESS_LENGTH, pseudo_offset, n_bytes_to_skip)
	(max_bytes_to_format, end_offset, skip, format_address_none)
	(format_address_std, format_address_paren, format_address_label)
	(write_block, parse_old_offset, dump, dump_strings, main):
	Prefer intmax_t to uintmax_t.  This makes no practical difference,
	and lets -fsanitize=undefined check for signed integer overflow.
	(skip, dump): Remove no-longer-needed casts.
	(xstr2nonneg): New static function.  All callers of xstrtoumax
	now call this function instead.
	(main): Use ckd_add to detect signed integer overflow, since
	the unsigned trick no longer works reliably.
	Let xstrtol_fatal report the overflow, instead of doing
	it by hand ourselves.

	od: fix '+N.' bug
	* src/od.c (parse_old_offset): First arg is now char *,
	not char const *.  If a decimal number, temporarily
	modify the string so that xstrtoumax does not complain
	about the '.'.
	* tests/od/od.pl: Test for the bug.

	od: fix some unlikely integer overflows
	* src/od.c (print_n_spaces, pad_at, pad_at_overflow):
	New static functions.
	(struct tspec, PRINT_FIELDS, print_named_ascii, print_ascii)
	(decode_one_format, write_block, main):
	Use idx_t, not int, for counts that depend on the number
	of bytes in an object.
	(decode_one_format): Use print_n_spaces to output spaces.
	(PRINT_FIELDS, print_named_ascii, print_ascii):
	Use pad_at to avoid integer overflow.
	(write_block): Do not use %*s to pad, as the total pad might
	exceed INT_MAX.  Instead, pad by hand with putchar (' ').
	(main): Use pad_at_overflow to report integer overflow due to
	oversize -w.  Use better way to tell whether -w is used,
	without needing IF_LINT.
	* tests/od/big-w.sh: New test.
	* tests/local.mk (all_tests): Add it.

	od: prefer idx_t to size_t
	This helps find overflow bugs when compiling with -fsanitize=undefined.
	* src/od.c (struct tspec, bytes_per_block, PRINT_FIELDS)
	(PRINT_TYPE, print_named_ascii, print_ascii, decode_one_format)
	(skip, write_block, read_block, dump, main):
	Use idx_t, not size_t.

	od: don’t assume no holes in wide unsigned
	Also, fix minor related typos.
	* src/od.c (MAX_INTEGRAL_TYPE_SIZE, MAX_ADDRESS_LENGTH):
	Now a constant, not a macro.
	(MAX_INTEGRAL_TYPE_WIDTH): New constant.  Use it instead of
	CHAR_BIT, so as not to assume that uintmax_t and unsigned long
	long int are hole-free.  This doesn’t matter on practical porting
	targets, though there is still a mainframe or two that have holes.
	(FMT_BYTES_ALLOCATED): Fix typo by changing "jd" to "jo".
	Fix off-by-one typo in static assertion.

	maint: assume long long int
	It’s long been safe to assume C99+ support for long long int.
	* .gitignore: Remove m4/longlong.m4.
	* bootstrap.conf (buildreq): Boost git prereq from 1.4.4 to 1.5.5,
	syncing with Gnulib.
	(bootstrap_post_import_hook): Remove m4/longlong.m4.
	* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES):
	No need to require AC_TYPE_UNSIGNED_LONG_LONG_INT.
	* src/factor.c (DItype, UDItype):
	* src/od.c (main):
	Assume HAVE_LONG_LONG_INT.
	* src/od.c: (unsigned_long_long_int):
	Remove.  All uses replaced with unsigned long long int.

	od: fix another off-by-one issue with --strings
	* src/od.c (main): Fix off-by-one error in string_min limit.

	od: fix theoretical size_t malloc overflow
	* src/od.c (dump, dump_strings): Use idx_t allocators
	rather than size_t allocators, to avoid unchecked integer
	overflow on theoretical platforms where SIZE_MAX < IDX_MAX.

2025-06-28  Collin Funk  <collin.funk1@gmail.com>

	doc: list signals added by POSIX.1-2024
	* doc/coreutils.texi (Signal specifications): Mention that POSIX.1-2024
	added SIGWINCH.

	doc: mention that POSIX.1-2024 added dd iflag=fullblock
	* doc/coreutils.texi (dd invocation): Document that POSIX.1-2024 added
	iflag=fullblock.

2025-06-27  Pádraig Brady  <P@draigBrady.com>

	doc: cksum: --check: improve supported formats description
	* doc/coreutils.texi (cksum common options): Reorder and tweak the info
	to make it clearer that --check does not support the legacy crc output
	from the cksum command.
	Reported at https://bugs.debian.org/1108363

2025-06-25  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer UINTMAX_MAX to TYPE_MAXIMUM (uintmax_t)
	* src/df.c (get_dev): Use UINTMAX_MAX.
	* src/shred.c (dopass): Likewise.

2025-06-24  Pádraig Brady  <P@draigBrady.com>

	od: output standard diagnostics for invalid -w arguments
	* src/od.c (main): Don't pass LONGINT_OK to xstrtol_fatal(),
	as otherwise it will abort().
	* tests/od/od.pl: Add test cases.
	* NEWS: Mention the bug fix.

	Addresses https://bugs.gnu.org/78879

2025-06-24  Pádraig Brady  <P@draigBrady.com>

	od: fix various off-by-one issues with --strings with -N
	* src/od.c (dump_strings): There are three related issues here
	due to not accounting for the terminating NUL char appropriately.

	1. Ensure BUF always has enough space for the terminating NUL.
	This avoids CWE-122: Heap-based Buffer Overflow,
	where we wrote a single NUL byte directly after the allocated buffer.
	I.e., there should be no buffer overflow with:
	  printf '%100s' | od -N100 -S1

	2. Ensure we support -S == -N (END_OFFSET - STRING_MIN == ADDRESS):
	I.e., there should be output with:
	  printf '%100s' | od -N10 -S10

	3. Ensure we always output a valid address by ensuring
	the ADDRESS and I variables are kept in sync.
	I.e., this should output address 0000000 not 1777777777777777777777:
	  printf '%100s' | od -N10 -S1

	As well as fixing these we simplify by using a single loop
	to read the data, rather than two.

	* doc/coreutils.texi (od invocation): Clarify that -N
	implicitly NUL terminates strings.
	* tests/od/od-N.sh: Add test cases.
	* NEWS: Mention the bug fixes.

	Fixes https://bugs.gnu.org/78880

2025-06-23  Bruno Haible  <bruno@clisp.org>

	build: fix compilation error on OpenBSD and Solaris
	* src/speedgen: Use 'printf', not 'sed', to emit code with newlines.

2025-06-23  H. Peter Anvin  <hpa@zytor.com>

	maint: make it clear when to add speeds to the speedgen list
	Add a comment making it clear that it is perfectly safe to add
	additional speeds to the canned list in the speedgen script, and under
	what conditions it is appropriate to do so.

2025-06-23  H. Peter Anvin  <hpa@zytor.com>

	stty: support baud rate macro extraction on more compilers
	For generating src/speedtest.h, try a sequence of command-line options
	until (or unless) one of them works:

	  -dM: gcc, clang and derived compilers, icc classic
	  -xdumpmacros: Sun Studio (writes to stderr!)
	  -qshowmacros: IBM XL classic
	  -PD: MSVC (usable with a wrapper such as cccl from the SWIG project)

	Because Sun Studio -xdumpmacros unconditionally writes to stderr,
	capture stderr output instead of sending it to /dev/null. This is
	perfectly safe, even in the presence of stray stderr output, because:

	  1. speedgen ignores input that is not of the form #define B<number>
	  2. even if a line of that format would somehow spuriously appear,
	     the only outcome is that the generated C code will probe for a few
	     more macros.

2025-06-23  Collin Funk  <collin.funk1@gmail.com>

	stdbuf: support AIX
	* src/stdbuf.c (set_LD_PRELOAD): Use the AIX specific environment
	variables LDR_PRELOAD or LDR_PRELOAD64.
	* NEWS: Mention the bugfix.

2025-06-22  Pádraig Brady  <P@draigBrady.com>

	stty: stricter floating point parsing
	* src/stty.c (string_to_baud): Disallow extraneous characters
	after floating point numbers.
	* tests/stty/stty-invalid.sh: Add test cases.

	doc: stty: adjust description of supported speeds
	* doc/coreutils.texi (stty invocation): Remove now imprecise
	list of speeds given we may now support higher or arbitrary speeds.
	Mention that we may support higher or arbitrary speeds.

2025-06-22  Collin Funk  <collin.funk1@gmail.com>

	build: add src/termios.c to the tarball
	* src/local.mk (EXTRA_DIST): Add src/termios.c.

	maint: use _GL_CMP instead of handwriting three-valued comparisons
	* src/comm.c (compare_files): Use _GL_CMP.
	* src/join.c (keycmp): Likewise.
	* src/ls.c (off_cmp): Likewise.
	* src/ptx.c (compare_words, compare_occurs): Likewise.
	* src/set-fields.c (compare_ranges): Likewise.
	* src/sort.c (compare_random, diff_reversed, compare): Likewise.

2025-06-21  H. Peter Anvin  <hpa@zytor.com>

	doc: NEWS: improve recent stty details
	* src/NEWS: Fix grammar error,
	and indicate baud rate probing is opportunistic.

2025-06-21  Pádraig Brady  <P@draigBrady.com>

	tty: translate new error
	* src/tty.c (main): Translate and adjust new ttyname() error
	diagnostic, to be clearer and avoid a syntax check failure.

2025-06-20  Paul Eggert  <eggert@cs.ucla.edu>

	tty: better fix for Bug#26371
	* src/tty.c (TTY_USAGE): Rename from TTY_FAILURE, since this
	is used only for usage failures.  All uses changed.
	(TTY_TTYNAME_FAILURE): New constant.
	(main): Remove no-longer-needed assignment of ENOENT to errno.
	Make status-setting clearer too.
	Report an error if ttyname fails even though stdin is a terminal,
	instead of silently pretending that stdin is not a terminal.
	* tests/tty/tty.sh: Test for this issue.  This should fix Bug#78244.

2025-06-18  Pádraig Brady  <P@draigBrady.com>

	tests: stty: adjust tests for arbitary speeds
	* tests/stty/stty-invalid.sh: Adjust to what is now invalid.
	* tests/stty/stty.sh: Add checks for valid speed variants.
	* tests/stty/bad-speed.sh: New test to ensure unsupported speeds
	are diagnosed.

2025-06-18  H. Peter Anvin  <hpa@zytor.com>

	stty: arbitrary or non-a priori known speed_t support
	Support the case where speed_t is simply a number, and in that case
	assume that arbitrary values can be passed.  This is assumed to be the
	case when all known speed_t macros equal their own value.

	Try to probe for a variety of speed_t constants by trying to coax
	$(CC) into emitting macro definitions (-E -dM).  If this is not
	supported, use a fairly extensive list of constants as a
	fallback.  This both improves the test for arbitrary speed support, as
	well as allowing proper operation in the case where the constants are
	not plain numbers and allows for handing enumerated speed constants
	that were not known a priori when the source code was written.

	A simple shell script (mostly using sed) is used to turn the list of
	constants (probed and predefined) into a pair of conversion functions,
	baud_to_value() and value_to_baud(); string_to_baud() is then
	reimplemented as a wrapper around the latter.

	* src/.gitignore: Add generated speedlist.h.
	* src/local.mk: Generate speedlist.h.
	* src/speedgen: Portable shell script to generate speedlist.h.
	* src/stty.c: Adjust string_to_baud to
	convert from arbitrary numeric values.
	* src/termios.c: A helper used when generating speedlist.h
	* NEWS: Mention the improvement.

2025-06-10  Paul Eggert  <eggert@cs.ucla.edu>

	date: port test to NetBSD 10
	Problem reported by Collin Funk in:
	https://lists.gnu.org/r/bug-gnulib/2025-06/msg00094.html
	* tests/date/date-debug.sh: Also allow NetBSD 10 mktime behavior.
	Although NetBSD contradicts POSIX, POSIX is likely wrong here and
	I vaguely recall that there’s a POSIX correction in progress
	that will allow the NetBSD behavior.

2025-06-09  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* tests/date/date-debug.sh: Update to match current behavior
	of Gnulib's parse-datetime module.

2025-06-07  Pádraig Brady  <P@draigBrady.com>

	doc: cp --help: mention --reflink=auto is now the default
	* src/cp.c (usage): Reword the REFLINK description to
	indicate that --reflink=auto is the default.
	Fixes https://github.com/coreutils/coreutils/issues/103

2025-06-03  Pádraig Brady  <P@draigBrady.com>

	doc: make command synopsis more consistent
	* doc/coreutils.texi: Use @dots{} after [OPTION],
	to be consistent with man pages.
	* src/printenv.c (Usage): Remove unneeded "...".
	* src/timeout.c (Usage): Add needed "...",
	and also remove redundant [OPTION] only form.
	* src/chroot.c (Usage): Likewise.
	Fixes https://bugs.gnu.org/78628

2025-05-29  Paul Eggert  <eggert@cs.ucla.edu>

	cksum: port to Apple LLVM version 10.0.0
	This compiler lacks support for the x86-64 VPCLMULQDQ instruction;
	compiles fail with "error: invalid cpu feature string for builtin".
	Problem reported by Peter Dyballa, and fix suggested by
	Pádraig Brady <https://bugs.gnu.org/78562#8>.
	* configure.ac (USE_AVX512_CRC32):
	Also check that __builtin_cpu_supports ("vpclmulqdq") compiles.

2025-05-28  Pádraig Brady  <P@draigBrady.com>

	tests: sort: expand multiple output testing
	* tests/sort/sort.pl: Ensure duplicate
	output strings are supported.

2025-05-28  Paul Eggert  <eggert@cs.ucla.edu>

	maint: assume O_DIRECTORY
	Recent changes in Gnulib guarantee O_DIRECTORY != 0.
	* gl/lib/targetdir.c (target_directory_operand):
	* src/dd.c (usage):
	* src/ln.c (main):
	Simplify now that O_DIRECTORY must be nonzero.

	build: update gnulib submodule to latest

2025-05-24  Pádraig Brady  <P@draigBrady.com>

	maint: avoid a sc_system_h_headers failure
	* cfg.mk: Also exclude libstdbuf.c from this check.

2025-05-24  Paul Eggert  <eggert@cs.ucla.edu>

	stdbuf: don’t allocate more than SIZE_MAX / 2
	* src/libstdbuf.c (apply_mode): Be more conservative about
	sizes passed to malloc, since we can’t rely on Gnulib malloc.

	stdbuf: simplify apply_mode + getenv
	* src/libstdbuf.c (apply_mode): Take getenv arg, not result.
	All callers changed.  This is simpler.

	stdbuf: port better to Mac OS X 10.4.11
	Do not link to fchownat, fchmodat, xreallocarray.
	While we’re at it, depend as little as possible on problematic
	functions like fileno, strtoumax.  Use only functions that
	were around in C89.
	Problem reported by Peter Dyballa <https://bugs.gnu.org/78509#59>.
	* src/libstdbuf.c: Include stddef.h, stdlib.h, gettext.h.
	Do not include stdint.h or system.h.
	(_): New macro, since we no longer include system.h.
	Undef strtoul, not strtoumax.
	(fileno_to_name): Remove.  All uses removed.
	(apply_mode): New arg STREAM_NAME, so that we no longer need
	to depend on fileno which might run into a Gnulib workaround.
	Don’t allocate more than ULONG_MAX - 1 bytes, as that’s
	not helpful in the real world and this lessens dependency
	on newer features like strtoumax.

2025-05-21  Pádraig Brady  <P@draigBrady.com>

	tests: avoid hung tests on older macOS
	These tests were seen to hang on PPC Mac OS X 10.4.11

	* tests/cp/existing-perm-race.sh: Protect fifo interactions
	with a 1 minute timeout.
	* tests/cp/file-perm-race.sh: Likewise.
	Reported in https://bugs.gnu.org/78509

2025-05-20  Pádraig Brady  <P@draigBrady.com>

	sort: fix buffer under-read (CWE-127)
	* src/sort.c (begfield): Check pointer adjustment
	to avoid Out-of-range pointer offset (CWE-823).
	(limfield): Likewise.
	* tests/sort/sort-field-limit.sh: Add a new test,
	which triggers with ASAN or Valgrind.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention bug fix introduced in v7.2 (2009).
	Fixes https://bugs.gnu.org/78507

2025-05-19  Paul Eggert  <eggert@cs.ucla.edu>

	maint: omit -Wmissing-variable-declarations from tests
	* configure.ac (GNULIB_WARN_CFLAGS):
	Omit -Wmissing-variable-declarations; needed for
	gcc (GCC) 15.1.1 20250425 (Red Hat 15.1.1-1).

2025-05-18  Pádraig Brady  <P@draigBrady.com>

	maint: avoid sc_preprocessor_indentation failure
	* src/factor.c: Tweak preprocessor indentation.

2025-05-18  Collin Funk  <collin.funk1@gmail.com>

	build: generate src/crctab.c when building from git
	* src/crctab.c: Remove file.
	* src/cksum.c [!CRCTAB]: Include config.h.
	* src/local.mk: Generate src/crctab.c in a temporary directory.
	(EXTRA_DIST): Add src/crctab.c.
	* .gitignore (/src/crctab.c): Add entry.

	build: fix 'make distcheck'
	* src/local.mk (EXTRA_DIST): Distribute src/make-prime-list.c
	to satisfy the new make dependency.

2025-05-18  Paul Eggert  <eggert@cs.ucla.edu>

	factor: fix bug with 128-bit uintmax_t
	On so-far-only-theoretical platforms with 128-bit uintmax_t,
	'factor' would misbehave by not factoring enough.
	Work around the bug (at a performance cost)
	and document the issue.  I hope someone with
	more time and expertise can fix the performance cost
	that this introduces.
	To reproduce the correctness bug, build with
	'gcc -DUSE_INT128 -DEXHIBIT_INT128_BUG';
	'make check' should fail due to the new test case.
	* src/factor.c (USE_INT128): New macro.
	(wide_uint, wide_int, W_TYPE_SIZE, WIDE_UINT_MAX):
	Define to proper values if USE_INT128.
	(prime_p) [!EXHIBIT_INT128_BUG]: Work around bug
	with 128-bit wide_uint, at some performance cost.
	* tests/factor/factor.pl (bug-with-128-bit-uintmax_t):
	New test.

	factor: refactor to allow non-uintmax_t ints
	This prepares for using unsigned __int128 instead of uintmax_t.
	It doesn’t change behavior.
	* src/factor.c (wide_uint, wide_int):
	New typedefs, replacing all uses of uintmax_t, intmax_t.
	(WIDE_UINT_MAX): New macro, replacing all uses of UINTMAX_MAX.
	(USE_LONGLONG_H): Don’t use LONG_MAX and INTMAX_MAX (which
	should have been ULONG_MAX and UINTMAX_MAX anyway).
	Instead, use W_TYPE_SIZE and ULONG_WIDTH, as that will be
	easier to work with if we use unsigned __int128.
	(binv): Also unroll for the 128-bit case.
	* src/make-prime-list.c (print_wide_uint):
	Print "wide_uint" not "uintmax_t".

2025-05-17  Collin Funk  <collin.funk1@gmail.com>

	build: support cross-compiling directly from git checkout
	* src/local.mk: Compile the make-prime-list in a temporary directory
	using $(BUILD_CC) so it can be run even when $(CC) is a cross-compiler.
	Add some comments.
	(noinst_PROGRAMS): Remove src/make-prime-list.
	(src_make_prime_list_LDADD): Remove variable.
	* src/make-prime-list.c: Don't include config.h and attributes.h.
	Remove unnecessary #undefs
	(ATTRIBUTE_CONST, ATTRIBUTE_MALLOC): Define for the host compiler.
	Fixes https://bugs.gnu.org/78377

2025-05-15  Paul Eggert  <eggert@cs.ucla.edu>

	maint: --help now outputs bug reporting address
	This changes the tail of "cat --help" output from:

	GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
	Full documentation <https://www.gnu.org/software/coreutils/cat>
	or available locally via: info '(coreutils) cat invocation'

	to:

	Report bugs to: bug-coreutils@gnu.org
	GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
	General help using GNU software: <https://www.gnu.org/gethelp/>
	Full documentation <https://www.gnu.org/software/coreutils/cat>
	or available locally via: info '(coreutils) cat invocation'

	* src/system.h (emit_bug_reporting_address): Don’t #define.
	(emit_ancillary_info): Call emit_bug_reporting_address
	instead of doing it by hand, which omitted the bug reporting address.

2025-05-12  Pádraig Brady  <P@draigBrady.com>

	maint: avoid sc_gitignore_missing failure
	* .gitignore: Add the soon to be generated lib/fts_.h
	* cfg.mk (sc_gitignore_missing): Special case the mapping
	of fts.in.h to fts_.h.
	Fixes https://bugs.gnu.org/78398

	doc: NEWS: fix introduced version of a bug
	* NEWS: The NFSv4 trivial ACL ENOTSUP issue was introduced in 9.6.

	maint: avoid sc_GPL_version failure
	* cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Exclude longlong.h also.

2025-05-12  Collin Funk  <collin.funk1@gmail.com>

	doc: suggest GNULIB_REFDIR instead of GNULIB_SRCDIR
	* README-hacking: Use GNULIB_REFDIR instead of GNULIB_SRCDIR since that
	is the correct way to have ./bootstrap do 'git clone --reference'.

2025-05-12  Paul Eggert  <eggert@cs.ucla.edu>

	factor: check overflow with ckd_add etc
	* src/factor.c (umul_ppmm, add_ssaaaa, sub_ddmmss, submod)
	(mulredc, strto2wide_uint): Prefer ckd_add etc. to doing
	overflow checking by hand.

	maint: pacify GCC when selinux is missing
	* src/selinux.h (restorecon, defaultcon): Use MAYBE_UNUSED.

	factor: be more cautious about C compiler versions
	* src/factor.c (__GMP_GNUC_PREREQ): Define compatibly with GMP.

	maint: sync longlong.h from gmp
	* .x-update-copyright: Add src/longlong.h.
	* src/longlong.h: Sync from gmp.

	factor: omit incorrect affirms in mulredc2
	* src/factor.c (mulredc2): Remove two ‘affirm’ calls that didn’t
	match the accompanying comment, and one of which has a false
	positive if UINTMAX_WIDTH == 128 and we factor 2**128 + 1.

2025-05-11  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest
	* bootstrap: Update using './bootstrap --bootstrap-sync'.

2025-05-10  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update NEWS from Gnulib update

	build: update gnulib submodule to latest

	maint: minor followon touchup of GCC warnings
	* configure.ac (GNULIB_TEST_WARN_CFLAGS):
	Do not use -Wsuggest-attribute=cold, -Wsuggest-attribute=const,
	-Wsuggest-attribute=format as they produce false positives with
	GCC 15 x86-64.  Use -Wmissing-variable-declarations, as it no
	longer seems to hurt.

2025-05-09  Paul Eggert  <eggert@cs.ucla.edu>

	maint: modernize GCC warning configuration
	* configure.ac: Simplify the setup of GCC’s -W... options,
	by removing options no longer needed for GCC 15 (when
	configuring with --enable-gcc-warnings) or GCC 12 (without).
	I hope this is good enough nowadays.
	Add GCC 15’s -Wtrailing-whitespace, since that works for us.

	maint: use MAYBE_UNUSED more consistently
	* src/basenc.c (no_required_padding):
	* gl/lib/smack.h (smack_new_label_from_self)
	(smack_set_label_for_self):
	* src/cksum.c (output_crc):
	* src/digest.c (md5_sum_stream, sha1_sum_stream)
	(sha224_sum_stream, sha256_sum_stream, sha384_sum_stream)
	(sha512_sum_stream, sm3_sum_stream, output_file):
	* src/stat.c (print_statfs, print_stat):
	* src/sum.c (output_bsd, output_sysv):
	* src/timeout.c (chld):
	Mark possibly-unused parameters with MAYBE_UNUSED.

	maint: fix Automake warning
	* Makefile.am (prologue): Remove macro, as \# is not portable here
	and Automake complains.  Replace its only use with its definiens.

2025-05-03  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failures in user namespaces
	* init.cfg (require_membership_in_two_groups_): Skip
	overflow gids used in user namespaces, as one can't
	chgrp() to these.
	Fixes https://bugs.gnu.org/78225

2025-05-01  Pádraig Brady  <P@draigBrady.com>

	build: update to latest gnulib
	* bootstrap.conf: Adjust for hash-triple module renaming.
	* src/copy.c: Likewise.
	* src/ln.c: Likewise.
	* gnulib: Update to latest.

2025-04-23  Pádraig Brady  <P@draigBrady.com>

	tests: add a test case for negative relative date
	* tests/date/date.pl: To exercise option processing.

2025-04-21  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure with constrained setfacl
	* tests/ls/acl.sh: In constrained environments, like with
	setxattr() disabled for example, require_acl_ does not
	check for the required functionality, so use the more
	stringent require_setfacl_ instead.
	Reported at https://github.com/NixOS/nixpkgs/issues/394953

2025-04-19  Pádraig Brady  <P@draigBrady.com>

	maint: map Jim's new email address
	.mailmap: Add meta.com as an alias.

2025-04-12  Paul Eggert  <eggert@cs.ucla.edu>

	ls: omit a static var
	* src/ls.c (file_has_aclinfo_cache): No need for unsupported_cached;
	we can use unsupported_scontext.  Also, improve comments.

2025-04-09  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.7
	* NEWS: Record release date.

2025-04-08  Pádraig Brady  <P@draigBrady.com>

	tests: adjust csplit VM limit for CheriBSD
	* tests/misc/csplit-heap.sh: More memory is required to avoid
	a false failure on CheriBSD with its heap accounting overhead.
	This is confirmed to still trigger with the original memory leak
	being tested.

	ls: support capabilities with device 0,0
	* src/ls.c (has_capability_cache): Don't assume
	a device major,minor of 0,0 never occurs.

2025-04-08  Bruno Haible  <bruno@clisp.org>

	ls: fix crash of "ls -Z ." on OpenBSD's /dev/wd0a disk
	* src/ls.c (file_has_aclinfo_cache): Add new static variable
	'unsupported_cached'. Don't assume that device 0 never occurs.

2025-04-07  Jim Meyering  <meyering@meta.com>

	build: use _GL_ATTRIBUTE_NONSTRING attribute to avoid new warnings
	Avoid warnings like this from GCC 15:
	src/basenc.c:1139:20: error: initializer-string for array of 'char'
	truncates NUL terminator but destination lacks 'nonstring' attribute
	(9 chars into 8 available) [-Werror=unterminated-string-initialization]
	* src/basenc.c (z85_encoding, do_decode): Mark two more variables as
	non-terminated.

2025-04-07  Pádraig Brady  <P@draigBrady.com>

	maint: avoid syntax-check failures from recent commit
	* gl/lib/dtimespec-bound.h: Indent, Spellcheck.
	* gl/local.mk: Add new gl files.

2025-04-07  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention workaround for combining hex floats with suffixes
	* doc/coreutils.texi (hexDuration): Mention the p style exponent trick.

	build: update gnulib submodule to latest

	timeout: don’t sleep less than requested
	Also, change sleep and tail to not sleep less than requested.
	* bootstrap.conf (gnulib_modules): Add dtimespec-bound.
	* gl/lib/dtimespec-bound.c, gl/lib/dtimespec-bound.h:
	* gl/modules/dtimespec-bound: New files.
	* src/sleep.c, src/tail.c, src/timeout.c: Include dtimespec-bound.h.
	* src/sleep.c, src/tail.c: Don’t include xstrtod.h.
	* src/sleep.c (apply_suffix, main):
	* src/tail.c (parse_options):
	* src/timeout.c (apply_time_suffix):
	Don’t sleep less than the true number of seconds.
	* src/timeout.c: Don’t include ctype.h.
	(is_negative): Remove; no longer needed.
	(parse_duration): Use a slightly looser bound on the timeout, one
	that doesn’t need -lm on GNU/Linux.  Clear errno before calling
	cl_strtod.

2025-04-06  Jim Meyering  <jim@meyering.net>

	maint: silence a -Wunterminated-string-initialization warning
	* src/basenc.c (base16_encode): Mark BASE16 as not NUL-terminated.

2025-04-06  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest

2025-04-06  Pádraig Brady  <P@draigBrady.com>

	timeout: remove dependence on libm
	This was seen to add about 100,000 ns to the startup time,
	on a 2.6 GHz i7-5600U with glibc 2.40.

	* .gitignore: Remove /lib/fenv.h.
	* bootstrap.conf: Remove fenv-rounding and signbit deps.
	* src/local.mk: Remove fenv lib dependency.
	* src/timeout.c (is_negative): A new helper function to
	be equivalent of signbit in the underflow case.
	(parse_duration): Remove the rounding up logic,
	as a nanosecond here or there has no significance.

2025-04-06  Pádraig Brady  <P@draigBrady.com>

	doc: mention the edge case of hex durations with 'd' suffix
	* doc/coreutils.texi (sleep invocation): Mention that suffixes are
	best avoided with hex arguments.
	(timeout invocation): Likewise.
	* tests/misc/sleep.sh: Ensure 'd' is not interpreted as "day".

2025-04-05  Pádraig Brady  <P@draigBrady.com>

	maint: adjustments to recent timeout change
	* .gitignore: Add /lib/fenv.h to ignore list.
	* tests/timeout/timeout-parameters.sh: Use a sleep length of 10s
	to be consistent with the pattern where we use this larger time
	when it does not slow down a test, but also provides protection
	against a hung test, and better avoidance of false failures due
	to races on very loaded systems.  Also fix the setting of FAIL.
	* tests/timeout/timeout-large-parameters.sh: Remove duplicated test.

2025-04-05  Paul Eggert  <eggert@cs.ucla.edu>

	timeout: round timeouts up
	This handles timeouts like 16777216.000000001 correctly;
	formerly the subsecond part of that timeout was ignored.
	* bootstrap.conf (gnulib_modules): Add fenv-rounding, signbit.
	* src/local.mk (src_timeout_LDADD): Append $(FENV_ROUNDING_LIBM).
	* src/timeout.c: Include fenv.h, math.h.
	Don’t include xstrtod.h, as xstrtod’s checking now gets in the way.
	(parse_duration): Round up when calling cl_strtod.
	Check for -1e-1000.  Don’t double-round 1e-9.
	* tests/timeout/timeout-parameters.sh: Test for -0.1,
	-1e-1000, 1e-1000.

2025-04-04  Collin Funk  <collin.funk1@gmail.com>

	maint: ensure that new "make syntax-check"-run sc_codespell passes
	* cfg.mk (codespell_ignore_words_list): Ignore false-positives.
	(exclude_file_name_regexp--sc_codespell): Skip some file names.
	* doc/coreutils.texi (mktemp invocation): Use "alphanumeric" which is
	consistent with the rest of the documentation.
	* src/expand-common.c: Fix typo.
	* src/ls.c: Likewise.
	* tests/split/l-chunk-root.sh: Likewise.

2025-04-04  Pádraig Brady  <P@draigBrady.com>

	timeout: ensure infinitesimal timeouts timeout quickly
	* src/timeout.c (parse_duration): Clamp infinitesimal values to 1ns.
	* tests/timeout/timeout-large-parameters.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/77535

	tests: fix false failure with multi-byte thousands separators
	* tests/sort/sort-h-thousands-sep.sh: sv_SE defaults to UTF-8
	on macOS 18, so avoid the test for multi-byte separators.
	Fixes https://bugs.gnu.org/77509

2025-03-31  Pádraig Brady  <P@draigBrady.com>

	ls: suppress ENOENT errors when reading ACL info
	* src/ls.c (gobble_file): Indicating unknown ACL info with '?'
	suffices for the edge case of a file being removed while reading,
	or older cygwin when reading through dangling symlinks.
	Reported by Corinna Vinschen.

2025-03-30  Pádraig Brady  <P@draigBrady.com>

	ls: print correct xattr error on all platforms
	* src/ls.c (gobble_file): Output errno, as u.err
	is not populated by file_has_aclinfo() on all platforms.
	* NEWS: Mention the bug fix.

2025-03-23  Paul Eggert  <eggert@cs.ucla.edu>

	mv: port test to OpenBSD 7.5
	Problem reported by Bruno Haible <https://bugs.gnu.org/75685>.
	* tests/mv/sticky-to-xpart.sh: Also allow OpenBSD behavior.

2025-03-22  Pádraig Brady  <P@draigBrady.com>

	doc: id: be direct about valid options with -nr
	* src/id.c (usage): State what options are valid with -nr,
	rather than just stating the default format is invalid.
	Fixes https://bugs.gnu.org/77163

	doc: id: make option combinations more searchable
	* src/id.c (usage): Add commas to make options more searchable.
	Don't add spaces since that would overflow 80 cols.
	Fixes https://bugs.gnu.org/77162

2025-03-21  Pádraig Brady  <P@draigBrady.com>

	ls: fix crash on systems with SELinux but without xattr support
	This was seen on termux on Android with ./configure --disable-xattr
	where listxattr() and getxattr() returned ENOTSUP.
	Then the valid security context obtained by file_has_aclinfo()
	was discounted, and problematically then freed multiple times.
	Reported at https://github.com/termux/termux-packages/issues/23752

	* src/ls.c (file_has_aclinfo_cache): Only discount the returned
	acl info when all components are defaulted due to being unsupported.

2025-03-15  Pádraig Brady  <P@draigBrady.com>

	dircolors: add vt220 as a color capable terminal
	This isn't strictly historically accurate
	but most practical these days, especially since
	systemd uses this as its default TERM type.
	See https://github.com/coreutils/coreutils/issues/96

	Tested with:
	  $ LS_COLORS= COLORTERM= TERM=vt220 src/ls --color
	  $ COLORTERM= TERM=vt220 src/dircolors

	* src/dircolors.hin: Add vt220.

2025-03-10  Pádraig Brady  <P@draigBrady.com>

	tests: dd: ensure posix_fadvise errors are handled
	* tests/dd/nocache_fail.sh: Add a test case for the recent fix.

2025-03-10  Frédéric Yhuel  <frederic.yhuel@dalibo.com>

	dd: fix error detection with "nocache" flag
	* NEWS: Mention the bug fix.
	* src/dd.c (invalidate_cache): Adjust to the unusual
	error propagation sematics of posix_fadvise().

2025-03-10  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-03-09  Pádraig Brady  <P@draigBrady.com>

	doc: mention logname improvement in NEWS
	* NEWS: Mention the improvement in gnulib commit 90840606.
	Addresses https://bugs.gnu.org/76876

2025-02-26  Grisha Levit  <grishalevit@gmail.com>

	build: fix LIBCRYPTO_SONAME value with config cache
	* configure.ac (LIBCRYPTO_SONAME): Store library name in cache so we
	do not end up with an empty value for it when a cache file is used.
	The configure variable name is changed from utils_cv_dlopen_libcrypto
	to utils_cv_libcrypto_soname.

2025-02-24  Lukáš Zaoral  <lzaoral@redhat.com>

	who: fix -m with guessed tty names
	* who.c (scan_entries): Account for guessed tty names (e.g.
	'sshd pts/1') from the readutmp module when using the systemd backend.
	* bootstrap.conf (gnulib_modules): Add str_endswith.
	* News: Mention the bug fix.
	Addresses https://bugzilla.redhat.com/2343998

2025-02-20  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to 757345e8.
	* src/who.c: Adjust to new defines.

	maint: fix sc_tight_scope failure
	This reverts commit 83fb600a21c6bad362b5739e7a9a9780639fa550.

	maint: fix sc_preprocessor_indentation failure
	* src/cksum.h: Indent appropriately.

2025-02-19  Paul Eggert  <eggert@cs.ucla.edu>

	sort: improve -u brief doc
	* src/sort.c (usage): Reword -u help (Bug#76290).

	du: update debug option setup
	Current Gnulib arranges for fts debugging if GNULIB_FTS_DEBUG
	is defined, so key off that rather than off DU_DEBUG.
	* src/du.c (fts_debug): Remove decl, as Gnulib does this now.
	(FTS_CROSS_CHECK): Remove; all uses removed.
	(FTS_DEBUG) [!GNULIB_FTS_DEBUG]: Remove.
	(long_options) [GNULIB_FTS_DEBUG]: Add a ---debug option.
	(du_files): Call fts_cross_check only if fts_debug and GNULIB_FTS_DEBUG.
	(main): Set fts_debug if GNULIB_FTS_DEBUG, not DU_DEBUG.

	maint: omit function defn extern
	* src/chown-core.c, src/copy.c, src/cp-hash.c, src/csplit.c:
	* src/expand-common.c, src/find-mount-point.c, src/force-link.c:
	* src/group-list.c, src/iopoll.c, src/operand2sig.c:
	* src/show-date.c, src/wc_avx2.c:
	Omit unnecessary ‘extern ’ at the start of function defns.
	This is less wordy, makes it a bit easier to grep for issues such
	as the missing consistency checking in cksum.

	cksum: check API better
	* src/cksum_avx2.c, src/cksum_avx512.c, src/cksum_pclmul.c:
	* src/cksum_vmull.c:
	Include cksum.h instead of copying its decls/includes by hand.
	This is a better way to ensure consistency among defns and uses.

	cksum: minor crctab generation cleanups
	* src/cksum.c [CRCTAB]: Include only config.h and stdio.h,
	to simplify the crctab-generating code.
	[!CRCTAB]: Do not include stdint.h or stdio.h, as cksum.h does it now.
	(BIT, r, crc_remainder, main) [CRCTAB]: Use unsigned int, not
	uint_fast32_t or uint32_t, as this is good enough for GNU where
	unsigned int is guaranteed to be at least 32 bits, and this way we
	needn’t worry about mismatches between %08x formats and uint_fast32_t.
	(main) [CRCTAB]: Prefer more-local decls.  Do not output
	unnecessary directives to include stdint.h or stdio.h.
	No need for ‘return EXIT_SUCCESS;’ nowadays.
	* src/crctab.c: Regenerate.

	cksum: make cksum.h standalone
	* src/cksum.h: Include stdint.h, stdio.h so that this file
	can be included in any order, after config.h.
	Add a copyright notice.

	build: update gnulib submodule to latest

2025-02-17  Paul Eggert  <eggert@cs.ucla.edu>

	cksum: port to 32-bit uint_fast32_t
	* src/cksum_vmull.c (cksum_vmull): Don’t assume
	uint_fast32_t can hold 64 bits.
	Problem reported by Alyssa Ross (Bug#76360).

	cksum: fix test for missing
	* tests/cksum/cksum.sh: Don’t output confusing diagnostic.
	Problem reported by Alyssa Ross (Bug#76360).

2025-02-16  Mike Swanson  <mikeonthecomputer@gmail.com>

	dircolors: recognize “jxl” (JPEG XL) files

2025-02-14  Paul Eggert  <eggert@cs.ucla.edu>

	cat: fix plain ‘cat’ bug
	* src/cat.c (main): Do not fail with plain ‘cat’ where input and
	output are both /dev/tty, if the output happens to have O_APPEND set.
	Problem reported by lilydjwg <https://bugs.gnu.org/76255>.
	Also, don’t report an error if the seek position is at or after EOF,
	even if O_APPEND is set.

	cat: omit unnecessary lseek
	* src/cat.c (main): Don’t bother to try lseek on a fifo or socket,
	as it will fail.

	cat: port to platforms with shm, tmo
	* src/cat.c (main): Work even on platforms that have shared memory
	objects and typed memory objects, which means st_dev and st_ino do
	not work.

2025-02-05  Pádraig Brady  <P@draigBrady.com>

	doc: remove extraneous new lines in some man pages
	* local.mk: Add the --loose-indent option, which results in help2man
	avoiding extraneous new lines in expr.1, id.1, numfmt.1, shred.1,
	tail.1, and timeout.1.
	Fixes https://bugs.gnu.org/74107

	doc: sync help2man to latest version
	* man/help2man: sync changes to commit 8fe02612
	The main change here is to Use \f(CR for monospace text
	when using groff in troff mode.
	Previously \f(CW was used, but that's not portable.

	tests: du: avoid intermittent false failure
	* tests/du/long-sloop.sh: Avoid failure due to
	intermittent reception of FTS_DNR, seen on BTRFS at least.

2025-02-04  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-02-03  Paul Eggert  <eggert@cs.ucla.edu>

	maint: pacify ‘gcc -Wswitch-enum’
	I thought of a way to pacify -Wswitch-enum without much trouble.
	Either add all the enums, or if that’s too verbose use ‘switch (+E)’
	to indicate to the reader that there need not be a case for
	every enum value.  Since this approach improves static checking,
	make the change everywhere and check it with -Wswitch-enum.
	* configure.ac: Compile with -Wswitch-enum if it works and
	--enable-gcc-warnings.  No need to remove -Wswitch-default
	since Gnulib no longer adds it.
	* src/chmod.c (describe_change):
	* src/chown-core.c (describe_change):
	* src/copy.c (copy_debug_string, copy_debug_sparse_string):
	* src/df.c (decode_output_arg, get_dev):
	* src/du.c (main):
	* src/factor.c (print_factors):
	* src/head.c (diagnose_copy_fd_failure):
	* src/ls.c (time_type_to_statx, calc_req_mask)
	(decode_line_length, get_funky_string, parse_ls_color)
	(gobble_file, print_long_format):
	* src/split.c (main):
	* src/sync.c (sync_arg):
	* src/tr.c (is_char_class_member):
	* src/wc.c (main):
	Add switch cases to pacify -Wswitch-enum.
	* src/copy.c (copy_debug_string, copy_debug_sparse_string):
	Add unreachable () for unreachable cases.
	* src/digest.c (main):
	* src/od.c (decode_one_format):
	* src/tr.c (get_next, get_spec_stats):
	switch (E) → switch (+E).
	* src/digest.c (main):
	* src/tr.c (get_next):
	Omit unnecessary ‘default: break;’ that merely pacified GCC,
	as the new pacification style is better.
	* src/ls.c (decode_line_length):
	Add default unreachable case to prevent warning that function
	might not return a value.
	(gobble_file): Distinguish DEREF_NEVER from unreachable cases.

	build: update gnulib submodule to latest

2025-01-29  Pádraig Brady  <P@draigBrady.com>

	doc: ls: clarify --format options
	* src/ls.c (usage): Use parentheses to be less ambiguous as
	to what are WORDs and equivalent short options.  This is also
	consistent with the description of --sort and --indicator-style.
	Fixes https://bugs.gnu.org/75916

2025-01-28  Pádraig Brady  <P@draigBrady.com>

	doc: support --with-packager-bug-reports
	* src/system.h (emit_ancillary_info): Output
	PACKAGE_PACKAGER_BUG_REPORTS if the build is configured
	--with-packager-bug-reports.
	Reported by Bruno Haible.

2025-01-22  Pádraig Brady  <P@draigBrady.com>

	sort: drop "note" from a --debug message
	* src/sort.c (key_warnings): Remove "note " from the start
	of a usually informational message, as this simplifies translation.
	* tests/sort/sort-debug-warn.sh": Adjust accordingly.
	Fixes https://bugs.gnu.org/75763

2025-01-20  Pádraig Brady  <P@draigBrady.com>

	tests: avoid ENAMETOOLONG ERROR on some systems
	* tests/du/long-from-unreadable.sh: Relax to a skip_ for now,
	as this was seen to error on ext4 on Debian 11 in a docker container.

2025-01-20  Collin Funk  <collin.funk1@gmail.com>

	maint: tests: remove duplicate uses of 'my' in Perl
	* tests/env/env-S.pl (cf): Remove uses of 'my' after the variable has
	been declared.
	* tests/factor/factor.pl (t): Likewise.
	* tests/misc/fold.pl (prog): Remove duplicate assignment.

2025-01-20  Pádraig Brady  <P@draigBrady.com>

	tests: remove use of unprotected 'set'
	* cfg.mk (sc_prohibit_bare_set): A new syntax check to
	ensure we protect use of set with '--', so that args
	beginning with '-' are not interpreted as options,
	and if no args are present, all existing args are cleared.
	* tests/cp/symlink-slash.sh: Add -- to unprotected use of set.
	* tests/ls/ls-time.sh: Likewise.
	* tests/ls/symlink-slash.sh: Likewise.
	* tests/mkdir/perm.sh: Likewise.
	* tests/mkdir/selinux.sh: Likewise.
	* tests/mkdir/smack-no-root.sh: Likewise.
	* tests/mkdir/smack-root.sh: Likewise.
	* tests/mv/part-hardlink.sh: Likewise.
	* tests/nice/nice.sh: Likewise.
	* tests/stty/stty-row-col.sh: Likewise.

2025-01-19  Daniel Hofstetter  <dhofstet@gmail.com>

	tests: fix typo in tests/ls/ls-time.sh
	* tests/ls/ls-time.sh: s/--sort-name -t/-t --sort=name/.

2025-01-19  G. Branden Robinson  <g.branden.robinson@gmail.com>

	doc: fix superscript in Texinfo manual's math
	The numeral "3" in the exponent was set at full size on the baseline.

2025-01-18  Pádraig Brady  <P@draigBrady.com>

	ls: fix crash with --context
	* src/ls.c (main): Flag that we need to stat()
	if we're going to get security context (call file_has_aclinfo_cache).
	(file_has_aclinfo_cache): Be defensive and only lookup the device
	for the file if the stat has been performed.
	(has_capability_cache): Likewise.
	* tests/ls/selinux-segfault.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Reported by Bruno Haible.

2025-01-17  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.6
	* NEWS: Record release date.

	build: update gnulib submodule to latest
	Mainly to avoid make dist-check failure with --disable-nls

2025-01-16  Bruno Haible  <bruno@clisp.org>

	build: fix compilation error on CentOS 8 Stream
	* configure.ac (USE_AVX512_CRC32): Set to false if the function
	_mm512_set_epi8 does not exist.

2025-01-16  Pádraig Brady  <P@draigBrady.com>

	tests: tail-c.sh: avoid failure on Linux kernels <= 2
	tests/tail/tail-c.sh: Exclude older kernels from timeout failure.

2025-01-16  Bruno Haible  <bruno@clisp.org>

	ls: Fix compilation error on CentOS 6
	* src/ls.c (XATTR_NAME_CAPS): Define fallback.

2025-01-16  Paul Eggert  <eggert@cs.ucla.edu>

	sort: fix --debug buffer overrun
	* src/sort.c (debug_key): Fix undefined behavior when a key ends
	before it starts.  Problem reported by Bruno Haible
	<https://bugs.gnu.org/75606>.

2025-01-16  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure with replaced readdir
	* tests/rm/rm-readdir-fail.sh: Simulate EIO rather than ENOENT,
	as gnulib absorbs the latter since commit 5a2d28df.

	ls: suppress ENOTSUP errors on virtiofs
	* gnulib: Update to latest to pick up commit caf76886.
	* NEWS: Mention the bug fix.

2025-01-15  Pádraig Brady  <P@draigBrady.com>

	tests: misc/write-errors.sh: increase memory limit
	* tests/head/head-c.sh: Use a larger VM limit to avoid
	mem allocation failures, which were seen on CheriBSD.

	tests: head: avoid false failure on some systems
	* tests/head/head-c.sh: Pass a more similar operation
	to get_min_ulimit_v_, so we get a more appropriate limit.
	This was seen to be significant with CheriBSD.

	yes: avoid failure on CHERI protected systems
	* src/yes.c (main): Don't reuse the argv array as CHERI's
	capability bounds do not allow for that, failing like:
	  $ yes $(seq 156) | head -n1
	  In-address space security exception (core dumped)

2025-01-15  Pádraig Brady  <P@draigBrady.com>

	tac: avoid out of bounds access
	This was flagged on CheriBSD on ARM Morello with the error:
	"In-address space security exception (core dumped)"
	triggered with: tac -s '' /dev/null

	* src/tac.c (main): Ensure we don't read beyond the
	end of the supplied optarg.

2025-01-15  Pádraig Brady  <P@draigBrady.com>

	tests: avoid ERRORs with no mntent.h
	* tests/df/skip-duplicates.sh: Just skip this test if we fail
	to build the shared lib.  This fails on Solaris 11 at least
	due to no HAVE_MNTENT_H.  Note HAVE_SYS_MNTENT_H does not
	suffice for this wrapper code.
	* tests/df/no-mtab-status.sh: Likewise.

	tests: avoid false failure with many mountpoints
	* tests/ls/readdir-mountpoint-inode.sh: Only take the first 64.

	tests: printf: avoid false failure
	* tests/printf/printf-surprise.sh: Increase the VM limit
	to avoid false failures in rare cases.

	tests: avoid slow ulimit -v behavior
	* init.cfg (ulimit_supported_): skip_ if the ulimit -v
	takes too long, which was seen with bash 5.2 on Solaris 11,
	where fork() returned EAGAIN under memory constraints,
	and bash retried for about 16 seconds.
	(get_min_ulimit_v_): Break early if skipped.
	* tests/misc/write-errors.sh: Be more conservative and
	skip on failure to determine min ulimit.

	tests: use more portable timeout presence check
	* init.cfg: timeout(1) on FreeBSD doesn't support --version
	(or --help with success status), so use syntax compatible
	with both FreeBSD and GNU.

	tests: tail: avoid failure on Solaris 11
	* tests/tail/tail-c.sh: On Solaris 11, tail -c 4096 /dev/urandom,
	will induce an lseek(,-4096,SEEK_END) which returns -4096 without
	setting errno, and a subsequent read() then gives EINVAL.
	Since tailing the end of a psuedo device is an edge case,
	we just verify that we don't spin reading the device forever.

	maint: avoid syntax-check failure
	* src/cksum.c: Use spaces to indent, not tabs.

2025-01-15  Paul Eggert  <eggert@cs.ucla.edu>

	cksum: port to Oracle Developer Studio 12.6
	* src/cksum.c (cksum_fp_t): New typedef.
	(pclmul_supported, avx2_supported, avx512_supported)
	(vmull_supported): Return this new type instead of bool.
	All callers changed.  That way, callers do not need to
	refer to functions like cksum_avx512 that might not
	exist on this platform.  Although GCC optimizes such
	references away, the C standard does not require this
	optimization.

	build: update gnulib submodule to latest

2025-01-14  Collin Funk  <collin.funk1@gmail.com>

	tests: env-S.pl: unset GNU/Hurd env vars
	* tests/misc/env-S.pl: Unset LD_ORIGIN_PATH.

2025-01-13  Paul Eggert  <eggert@cs.ucla.edu>

	ls: readdir errno fixes
	* src/ls.c (print_dir): Fix bug: file_failure can set errno to
	something other than EOVERFLOW but the code assumed it didn’t.
	Also, omit ENOENT bug workaround with glibc 2.3 and later,
	for consistency with Gnulib.

2025-01-13  Pádraig Brady  <P@draigBrady.com>

	tail: fix regression in open() flags used
	* src/tail.c (tail_file): Fix precedence issue introduced
	in commit v9.5-231-g177fcec66 so that we pass correct flags to open().
	Effectively this meant we would have dropped the O_BINARY flag
	on windows, since O_RDONLY is generally 0.
	Issue spotted by coverity.

	build: update to latest gnulib
	Ensure WCOREDUMP is always defined,
	and ensure --enable-silent-rules is honored with crc code generation.

2025-01-12  Pádraig Brady  <P@draigBrady.com>

	all: fix program name with --enable-single-binary=shebangs
	* gnulib: Pick up gnulib commit f11caad4fd which ensures
	we diagnose the actual utility name, and not just "coreutils"
	when in single binary mode.  This adjustment is required
	since gnulib commit 959152ba37 which enforced use of gnulib's
	error() once verror is used, and gnulib's error() always
	outputs the base name of the command, which the new gnulib
	commit now keeps up to date.

	tests: make misc/write-errors.sh immune to default signal disposition
	* tests/misc/write-errors.sh: Reset SIGPIPE to the default (terminate)
	disposition, so that the test doesn't erroneously fail due to an
	ignored SIGPIPE in the test environment.

2025-01-11  Pádraig Brady  <P@draigBrady.com>

	ls: fix inaccurate indication of ACLs on NFS
	* gnulib: Update to latest to pick up gnulib commit 05c63bc908
	which ensures accurate determination of the presence of NFSv4 ACLs.
	* NEWS: Adjust accordingly.
	Related to https://bugs.gnu.org/74692

2025-01-10  Pádraig Brady  <P@draigBrady.com>

	csplit: avoid extraenous output files given empty input
	* src/csplit.c (get_first_line_in_buffer): Don't exit here
	upon empty input, rather indicate no input in the return
	to let callers handle in a more consistent fashion.
	* NEWS: Mention the bug fix.
	* tests/csplit/csplit.sh: Add a test case.
	Reported by Daniel Hofstetter.

2025-01-10  Pádraig Brady  <P@draigBrady.com>

	ls: suppress "Permission denied" errors on NFS
	NFS (on Linux 6.12 at least) was seen to return EACCES
	from listxattr() for files without read access.
	We started using listxattr() in coreutils 9.4.

	* src/ls.c (gobble_file): Map EACCES from file_has_aclinfo()
	to '?', rather than displaying the error.
	* doc/coreutils.texi (ls invocation): Document the '?' flag.
	* NEWS: Mention the bug fix.
	Addresses https://bugs.gnu.org/74692

2025-01-10  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-01-08  Paul Eggert  <eggert@cs.ucla.edu>

	ls: update comment
	* src/ls.c (file_has_aclinfo_cache): Fix comment.

2025-01-08  Pádraig Brady  <P@draigBrady.com>

	tail: honor --pid with fifos
	* src/tail.c (tail_file): Open files with O_NONBLOCK
	if we might need async processing.
	(pipe_bytes): Ignore EAGAIN read() errors.
	(pipe_lines): Likewise.
	* tests/tail/pid-pipe.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the bug fix.
	Reported by Berhard Voelker.

2025-01-07  Pádraig Brady  <P@draigBrady.com>

	cp,mv: decouple --update from -f,-i,-n options
	* src/copy.h: Change update member from bool to enum.
	* src/copy.c: s/interactive == I_ALWAYS_NO/update == UPDATE_NONE_FAIL/;
	              s/interactive == I_ALWAYS_SKIP/update == UPDATE_NONE/;
	              s/update/update == UPDATE_OLDER/;
	* src/install.c: Init with UPDATE_ALL, rather than false.
	* src/cp.c: Likewise.  Simply parse -f,-i,-n to x.interactive,
	and parse --update to x.update.
	* src/mv.c: Likewise.
	* tests/cp/cp-i.sh: Add a test case where -n --update -i
	honors the --update option, which would previously have been
	ignored due to the preceding -n.

2025-01-06  Pádraig Brady  <P@draigBrady.com>

	cp,mv: ensure -i,f are not overridden by -u
	Since coreutils 9.3 we had --update={all,older} override -i.
	In coreutils 9.5 this was expanded to -u
	(to make it consistent with --update=older).

	This patch reinstates things so that -i combines with -u instead.
	I.e. have -i be protective, rather than selective (like -u).

	The -f option of mv is similarly adjusted in this patch,
	so now --update does not override any of -f,-i,-n.

	* NEWS: Mention the bug fix.
	* src/cp.c (main): Don't have -u disable prompting.
	* src/mv.c (main): Likewise.
	* tests/cp/cp-i.sh: Add a test case for -i.
	* tests/mv/update.sh: Likewise.
	* tests/mv/i-3.sh. Add a test case for -f.
	Fixes https://bugs.gnu.org/70887

2025-01-06  Pádraig Brady  <P@draigBrady.com>

	doc: clarify mv -f operation in texinfo
	* doc/coreutils.texi (mv invocation): Be less ambiguous,
	in that -f is significant for any replacement operation
	on the destination, not just unlinking.

2025-01-01  Pádraig Brady  <P@draigBrady.com>

	maint: update all copyright year number ranges
	Update to latest gnulib with new copyright year.
	Run "make update-copyright" and then...

	* gnulib: Update included in this commit as copyright years
	are the only change from the previous gnulib commit.
	* tests/init.sh: Sync with gnulib to pick up copyright year.
	* bootstrap: Likewise.
	* tests/sample-test: Adjust to use the single most recent year.

2025-01-01  Pádraig Brady  <P@draigBrady.com>

	pwd: fix erroneous leading slash on some systems
	* gnulib: Pull in the fix to getcwd() from gnulib.
	* NEWS: Mention the fix.

2024-12-30  Pádraig Brady  <P@draigBrady.com>

	numfmt: don't require a suffix with --from=iec-i
	* src/numfmt.c (simple_strtod_human): Only look for 'i'
	after detecting a suffix.
	* tests/misc/numfmt.pl: Add a test case.
	* NEWS: Mention the bug fix.
	Reported at https://bugs.debian.org/1091758

	maint: fix syntax-check error
	* src/seq.c: Adjust line length.

2024-12-30  Paul Eggert  <eggert@cs.ucla.edu>

	maint: adjust to Gnulib module renaming
	* bootstrap.conf, gl/modules/buffer-lcm, gl/modules/randperm:
	* gl/modules/randread, gl/modules/strnumcmp, gl/modules/targetdir:
	* gl/modules/xdectoint, gl/modules/xfts:
	Adjust to recent renaming of Gnulib modules, e.g., stdbool → bool,
	inttypes → inttypes-h.

	build: update gnulib submodule to latest

	date: improve doc for ambiguous formats
	Problem reported by Tim Connors <https://bugs.gnu.org/75208>.
	* doc/coreutils.texi (Date conversion specifiers):
	* src/date.c (usage):
	Warn about ambiguous formats like %D.

	maint: ISDIGIT → c_isdigit
	* gl/lib/strnumcmp-in.h (ISDIGIT):
	* src/system.h (ISDIGIT): Remove.  All uses replaced by c_isdigit,
	with appropriate inclusions of c-ctype.h.  This is more regular,
	and is more portable to existing (but unlikely) platforms where
	INT_MAX == UINT_MAX.

2024-12-30  Sylvestre Ledru  <sylvestre@debian.org>

	tests: improve the chmod/symlinks.sh test
	The variable of the loop isn't passed to the command making
	it less interesting

	* tests/chmod/symlinks.sh: Fix the test case.

2024-12-23  Pádraig Brady  <P@draigBrady.com>

	kill: with -l,-t list signal 0
	The 0 (EXIT) signal is valid as input
	(and useful to determine existence of a pid),
	so list it along with other signals.

	* doc/coreutils.texi (signal specifications): Document 0, "EXIT".
	* src/kill.c (list_signals): Start loops at 0, not 1.
	* tests/misc/kill.sh: Add a test case.
	* NEWS: Mention the change in behavior.

2024-12-21  Pádraig Brady  <P@draigBrady.com>

	maint: correct © dates for hardware optimized crc routines
	* src/cksum_pclmul.c: 2021-2024.
	* src/cksum_avx2.c: 2024.
	* src/cksum_avx512.c: 2024.
	* src/cksum_vmull.c: 2024.

	tail: always fail when followed files become inaccessible
	* src/tail.c (tail_forever): Without --retry, exit with failure
	status like we do for the inotify case (since v8.11-15-g61de57cd2).
	This is also consistent with the failure exit if no file was
	accessible at tail startup.
	* tests/tail/follow-stdin.sh: Tweak due to earlier exit.
	* tests/tail/follow-name.sh: Test with and without inotify.
	* NEWS: Mention the bug fix.

2024-12-20  Pádraig Brady  <P@draigBrady.com>

	cksum: update to pclmul optimized crc32b from gnulib
	* bootstrap.conf: Depend on crc-x86_64 rather than crc.
	* gnulib: Update to latest.
	* src/cksum.c (crc32b_sum_stream): Add --debug info.
	* NEWS: Mention the performance improvement.

2024-12-16  Daniel Hofstetter  <dhofstet@gmail.com>

	maint: tests: update deprecated perl backreference syntax
	* tests/basenc/basenc.pl: perl warns that $1 is better than \1,
	so update to the preferred form.

2024-12-12  Paul Eggert  <eggert@cs.ucla.edu>

	maint: sync help2man to latest version
	* man/help2man: sync changes from version 1.48.5 through 1.49.3.
	This doesn't materially change the generated man pages.

2024-12-05  Sam Russell  <sam.h.russell@gmail.com>

	cksum: use ARMv8 SIMD extensions
	* configure.ac: Add check for ARMv8 VMULL support.
	* src/cksum.c: Add ARMv8 VMULL detection function.
	* src/cksum.h: Add ARMv8 VMULL implementation declaration.
	* src/cksum_vmull.c: ARMv8 VMULL implementation.
	* src/local.mk: Add build flags for ARMv8 VMULL.
	* NEWS: Mention the ARMv8 SIMD improvement.

2024-12-05  Pádraig Brady  <P@draigBrady.com>

	tail: ensure --follow=name unfollows renamed files
	Require --retry to continue to track files upon rename.
	We already unfollowed a file if it was renamed
	to another file system (unlinked), so this makes the behavior
	consistent if renaming to a file in the same file system.
	I.e. --follow=name without --retry, means unfollow if the
	name is unlinked or moved, so this change ensures that
	behavior for all rename cases.
	Related commits: v8.0-121-g3b997a9bc, v8.23-161-gd313a0b24

	* src/tail.c (tail_forever_notify): Remove watch for a renamed file
	if --retry is not specified.
	* tests/tail/F-vs-rename.sh: Related test cleanup.
	* tests/tail/follow-name.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/74653

2024-11-26  Sam Russell  <sam.h.russell@gmail.com>

	cksum: use AVX2 and AVX512 for speedup
	* configure.ac: Add checks for avx2 and avx512 support.
	* src/cksum_avx2.c: AVX2 implementation.
	* src/cksum_avx512.c: AVX512 implementation.
	* src/local.mk: Add build flags for avx2 and avx512.
	* src/cksum.c: Add avx2 and avx512 detection functions.
	* src/cksum.h: Add avx2 and avx512 implementation declarations.
	* NEWS: Mention the AVX2 and AVX512 improvement.

2024-11-26  Pádraig Brady  <P@draigBrady.com>

	tail,tee: fix broken pipe detection on darwin 9
	* src/iopoll.c (): Restrict use of poll() on macOS
	to >= 11 (darwin 20), as it was seen to fail on macOS 10.5.
	Fixes https://bugs.gnu.org/74503

2024-11-24  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure with unicode decomposed file systems
	* tests/ls/dired.sh: macOS normalizes unicode characters to decomposed
	(NFD) form when storing names in the file system, which breaks the
	round-trip comparison employed by the test.  So instead use a character
	which does not decompose; verified with:
	  echo æ | uconv -f utf8 -t utf8 -x nfd | od -Ax -tx1z

2024-11-20  Paul Eggert  <eggert@cs.ucla.edu>

	dd: port big-offset test to macOS 12.6
	* tests/dd/skip-seek-past-file.sh: Do not assume that
	seek to exactly OFF_T_MAX should fail; it works on macOS 12.6
	and POSIX allows this.  Come to think of it, it should work
	on Solaris too, if someone ever comes across a Solaris host
	with a file system that allows such files.

2024-11-20  Collin Funk  <collin.funk1@gmail.com>

	maint: update .gitignore
	* .gitignore (/lib/crc-sliceby8.h): Add file generated by Gnulib.

	maint: prefer mbszero over memset
	* src/df.c (replace_invalid_chars): Use mbszero.

2024-11-20  Paul Eggert  <eggert@cs.ucla.edu>

	ls: port to Oracle Developer Studio 12.6
	Oracle Developer Studio 12.6 for sparc mishandles
	‘sizeof ((char []) {'x', 'y'})’: it says
	“warning: null dimension: sizeof()” and then generates
	the wrong length in data.  Work around the compiler bug
	by counting sizes by hand, which may be a bit clearer anyway,
	if a bit more error-prone.
	* src/ls.c (BIN_STR): Remove.
	(color_indicator): Spell out instead of using BIN_STR.

	factor: fix ‘return’ typo
	* src/factor.c (lbuf_putint): Don’t use ‘return E;’ in
	a void function’s body, fixing a recently-introduced typo.

2024-11-19  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention "printf %d ''" change

2024-11-19  Pádraig Brady  <P@draigBrady.com>

	tests: fix inconsistent use of getlimits_
	* tests/dd/skip-seek-past-file.sh: s/eval $(getlimits)/getlimits_/

	tests: printf: avoid iconv issues on macOS
	* tests/printf/printf-cov.pl: Since gnulib commit v1.0-1103-ge5b82978e2
	we avoid iconv() on ASCII range 0x32 - 0x7F inclusive, so adjust
	this test to fall within that range.
	Addresses https://bugs.gnu.org/74428

2024-11-19  Paul Eggert  <eggert@cs.ucla.edu>

	chown: port test to macOS 12.6 nogroup user
	* tests/chown/preserve-root.sh (id_g): Set to empty if id -gn
	reports that it is nogroup, and skip that part of the test.

	maint: omit unnecessary to_uchar
	* src/df.c (replace_control_chars):
	* src/dircolors.c (parse_line):
	* src/printf.c (print_esc):
	* src/ptx.c (unescape_string):
	* src/stat.c (print_it):
	* src/tr.c (star_digits_closebracket):
	Omit to_uchar calls that aren’t needed, because the parent
	expression works with ‘char’ as well as with ‘unsigned char’.

	tests: Remove stray ‘i’

	printf: diagnose empty args correctly
	Also, port better to macOS.
	* src/printf.c (verify_numeric): Don’t assume that when s == end
	then errno is zero; it is EINVAL on macOS, and POSIX allows this.
	(print_direc): Treat missing arg as zero for numeric conversions,
	and as an empty string for the others.
	(print_formatted): Use null pointer, not an empty string,
	to represent missing arg.
	* tests/printf/printf.sh: Test empty and space widths and precisions.

	printf: do n$ overflow checking by hand
	* src/printf.c (get_curr_arg): Mark as pure to pacify GCC 14.
	Do overflow checking by hand rather than relying on strspn
	and strtoimax.

	printf: refactor macros to function
	* src/printf.c (struct arg_cursor): New struct.
	(get_curr_arg): New function.
	(print_formatted): Use it instead of ...
	(GET_CURR_ARG, SET_CURR_ARG): ... these removed macros.
	This makes the code a bit easier to follow, and any efficiency
	cost should be minimal.

2024-11-18  Pádraig Brady  <P@draigBrady.com>

	maint: avoid a syntax-check failure
	This was also updated in gnulib.

	* bootstrap: s/can not/cannot/

2024-11-18  Pádraig Brady  <P@draigBrady.com>

	doc: describe "New programs" consistently in NEWS
	* NEWS: s/New commands/New programs/

2024-11-18  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	Also, copy bootstrap from gnulib/build-aux/bootstrap.

	factor: pacify -Wunused-macros
	* src/factor.c: Also use __GMP_GNUC_PREREQ

2024-11-15  Paul Eggert  <eggert@cs.ucla.edu>

	ls: refactor gobble_file get_scontext
	* src/ls.c (gobble_file): Simplify by pulling get_scontext
	out of ‘if’.

2024-11-12  Pádraig Brady  <P@draigBrady.com>

	tests: ls: also test security context output for symlinks
	* tests/ls/selinux.sh: Test symlinks as well as files.

	tests: avoid false failure with --disable-selinux
	* tests/ls/selinux-segfault.sh: Move recent addition to ...
	* tests/ls/selinux.sh: ... this new test that uses require_selinux_
	to skip appropriately when we've built without selinux support.
	Also add a non root test that checks we output '.' along with the
	mode for files, to indicate a security context is present.
	* tests/local.mk (Reference the new test).

2024-11-11  Pádraig Brady  <P@draigBrady.com>

	ls: fix security context indication in --long mode
	* src/ls.c (gobble_file): Always get the security context with -l
	so that we can indicate a context with '.' if present.

2024-11-11  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	This also fixes a problem with ls -Z when configured with
	--disable-acl, reported by Pádraig Brady
	<https://bugs.gnu.org/73418#52>.
	* src/ls.c (gobble_file): Pass ACL_GET_SCONTEXT to
	file_has_aclinfo, if -Z is used.

2024-11-11  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib to latest
	* NEWS: Mention the fix to nproc honoring the affinity mask
	on systems with more than 1024 processors.

2024-11-10  Paul Eggert  <eggert@cs.ucla.edu>

	ls: add test case for ls -Z bug
	Problem reported by Pádraig Brady <https://bugs.gnu.org/73418#35>.
	This bug was fixed by the recent gnulib update.
	* tests/ls/selinux-segfault.sh:
	Also test for ls -Z on broken symlinks.

	build: update gnulib submodule to latest

2024-11-09  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure on older valgrind
	* src/shuf.c (main): In dev mode call randint_all_free()
	to avoid false failure with valgrind 3.16.1 at least.
	Note this partially reinstates commit v9.0-109-g0106b5a4b.
	This was noticed on a debian 11 system running CI tests.

2024-11-09  Paul Eggert  <eggert@cs.ucla.edu>

	seq: seq_fast always exits now
	* src/seq.c (seq_fast): Always exit.  Don’t bother freeing
	just before exit.

	seq: simplify cmp calls
	* src/seq.c (seq_fast): Call cmp in just one place, not two.
	Redo loop structure to make it work.

	seq: use full_write instead of fwrite
	* src/seq.c: Include full-write.h.
	(seq_fast): Since we’re doing all the buffering work anyway,
	we might as well use syscalls instead of stdio to write.
	Use full_write instead of fwrite.

	seq: simplify output buffer management
	* src/seq.c (seq_fast): Simplify by using an output buffer of
	known size (BUFSIZ) on the stack, rather than a heap buffer that
	might grow.  For the number buffer, don’t bother appending NUL
	since nobody uses the NUL, and xpalloc from nullptr not p0 since
	we need to move the buffer data by hand anyway.

	seq: omit unnecessary malloc for upper bound
	* src/seq.c (seq_fast): Speed up test for "inf".
	Do not allocate and free a copy of B, as it is fine as-is.

	seq: simplify cmp
	* src/seq.c (cmp): Simplify, and change some size_t to idx_t.
	(INITIAL_ALLOC_DIGITS): Now a constant, not a macro.

	seq: explicate incr
	* src/seq.c (incr): Change API to make the code easier to follow,
	and also to avoid undefined behavior on hypothetical platforms
	where '9' == INT_MAX (!).  Caller changed.

	env: prefer xpalloc to xrealloc
	* src/env.c (extract_varname): Prefer free+xpalloc to
	xrealloc, since the old buffer contents don’t matter.

	shuf: prefer xpalloc to xnrealloc
	* src/shuf.c (RESERVOIR_LINES_INCREMENT): Remove.
	All uses removed.
	(read_input_reservoir_sampling, main):
	Prefer idx_t to size_t for sizes related to xpalloc.
	(read_input_reservoir_sampling): Prefer xpalloc to xnrealloc.

	pwd: prefer xpalloc to xnrealloc
	* src/pwd.c (struct file_name, file_name_prepend):
	Prefer idx_t to size_t for sizes related to xpalloc,
	(file_name_init): Don’t overflow if PATH_MAX == INT_MAX.
	(file_name_prepend): Prefer xpalloc to by-hand resizing.
	Simplify by using memcpy return value.

	du: prefer xpalloc to xnrealloc
	* src/du.c (prev_level, process_file):
	Prefer idx_t to size_t for sizes related to xpalloc,
	and to nesting levels (since that’s what fts_level does anyway).
	(process_file): Prefer xpalloc to xnrealloc.

	df: prefer xpalloc to xnrealloc
	* src/df.c (ncolumns, nrows, print_table, get_header, get_dev):
	Prefer idx_t to size_t for sizes related to xpalloc.
	(ncolumns_alloc, nrows_alloc): New static vars.
	(alloc_table_row, alloc_field): Prefer xpalloc to xnrealloc.

	basenc: prefer xpalloc to xnrealloc
	* src/basenc.c (prepare_inbuf): Prefer xpalloc to xnrealloc.

	ls: prefer xpalloc to xnrealloc
	* src/ls.c (cwd_n_alloc, cwd_n_used, clear_files)
	(extract_dirs_from_files, initialize_ordering_vector)
	(update_current_files_info, sort_files, print_current_files)
	(print_many_per_line, print_horizontal, print_with_separator)
	(init_column_info, calculate_columns):
	Prefer idx_t to size_t for sizes related to xpalloc.
	(main): Let the compiler fold constants.
	(gobble_file, init_column_info): Use xpalloc, not xnrealloc.
	(print_many_per_line): Fix very-unlikely integer overflow.

	df: simplify via xasprintf
	* src/df.c: Include xvasprintf.h.
	(get_header, get_dev): Simplify by using xasprintf and xstrdup
	rather than doing the error checking ourselves.

	csplit: port to IDX_MAX < INT_MAX
	* src/csplit.c (max_out): Defend against unlikely IDX_MAX < INT_MAX.

	pr: prefer xpalloc to x2realloc
	* src/pr.c (buff_allocated, main):
	Prefer idx_t to size_t for sizes.
	(main, store_char): Use xpalloc, not x2realloc.
	(init_store_cols): Check for multiplication overflow ourselves
	and use ximalloc, not xnmalloc.  This is a bit simpler.
	* src/system.h (X2REALLOC): Remove; no longer used.

	od: prefer xpalloc to x2realloc
	* src/od.c (string_min, dump_strings): Prefer idx_t to size_t for
	sizes.  Use xpalloc, not x2realloc.

	fold: prefer xpalloc to x2realloc
	* src/fold.c (fold_file): Prefer idx_t to size_t for sizes.
	Use xpalloc, not x2realloc.

	sort: prefer xpalloc to x2nrealloc
	* src/sort.c (struct buffer, temp_dir_count, temp_dir_alloc)
	(create_temp_file, add_temp_dir, fillbuf):
	Prefer idx_t to ptrdiff_t/size_t for nonnegative directory counts.
	(add_temp_dir, fillbuf): Use xpalloc, not x2nrealloc.
	* src/system.h (X2NREALLOC): Remove; no longer used.

	cut,numfmt: prefer xpalloc to x2nrealloc
	* src/set-fields.c (n_frp, n_frp_allocated, complement_rp, set_fields):
	Prefer idx_t to ptrdiff_t/size_t for nonnegative sizes.
	(add_range_pair): Use xpalloc, not x2nrealloc.

	ptx: prefer xpalloc to x2nrealloc
	* src/ptx.c (line_width, gap_size, WORD, WORD_TABLE)
	(maximum_word_length, reference_max_width, occurs_alloc)
	(number_of_occurs, half_line_width, truncation_string_length)
	(compare_words, search_table, digest_word_file)
	(find_occurs_in_text, fix_output_parameters)
	(generate_all_output, main, find_occurs_in_text)
	(fix_output_parameters, generate_all_output):
	Prefer idx_t to ptrdiff_t/size_t for nonnegative sizes.
	(first, second): Remove macros, replacing them with locals.
	(search_table): Use hi (for highest + 1) to simplify.
	Avoid unlikely overflow by not computing lo + hi.
	(digest_word_file, find_occurs_in_text): Use xpalloc, not x2nrealloc.

	od: prefer xpalloc to x2nrealloc
	* src/od.c (n_specs, n_specs_allocated, write_block, get_lcm, main):
	Use idx_t instead of size_t for some sizes, so that we can
	use xpalloc.
	(decode_format_string): Prefer xpalloc to X2NREALLOC.

	expand: check for colno overflow
	* src/expand-common.c (get_next_tab_column): Check for tab
	stop overflow here.  All callers changed to not check.
	* src/expand.c (expand): Use colno for column number.

	ls: fix aclinfo cache bug
	Found when testing on a new platform with a new file system.
	* src/ls.c (file_has_aclinfo_cache): For failures, also cache
	return value, scontext, and scontext_err, and when using cached
	values make sure buf and size have reasonable values for
	aclinfo_free etc.

	ls: use Gnulib’s unsupported errno list
	* bootstrap.conf (gnulib_modules): Add acl-permissions, which
	supplies acl_errno_valid, and which we are already using
	indirectly via file-has-acl.
	* src/ls.c (errno_unsupported): Remove.  All calls replaced
	by !acl_errno_valid.

	expand: use signed colno
	* src/expand-common.h (colno): Now intmax_t, not uintmax_t.

	expand: refactor to introduce ‘colno’
	* src/expand-common.h (colno): New typedef.
	All uses of uintmax_t for column numbers replaced by colno.
	* src/expand-common.c (add_tab_stop): Use xpalloc
	instead of X2NREALLOC, and use ckd_add to check for overflow.

	expand: prefer xpalloc to x2nrealloc
	* src/expand-common.c (max_column_width, n_tabs_allocated)
	(first_free_tab, add_tab_stop, parse_tab_stops, validate_tab_stops)
	(get_next_tab_column):
	Use idx_t for sizes.  All uses changed.
	(add_tab_stop): Use xpalloc instead of X2NREALLOC.
	Use ckd_add to check for overflow, instead of doing it by hand.

	env: prefer xpalloc to x2nrealloc
	* src/env.c (usvars_alloc): Use idx_t for size.
	(append_unset_var): Use xpalloc instead of x2nrealloc.

	chroot: expand heap a bit less aggressively
	* src/chroot.c (parse_additional_groups, main):
	Prefer idx_t to size_t for sizes.
	(parse_additional_groups): Use xpalloc instead of x2nrealloc.

	maint: expand heap a bit less aggressively
	* gl/lib/heap.c (struct heap, heap_alloc, heap_insert)
	(heapify_down, heapify_up): Prefer idx_t to size_t for sizes.
	(heap_insert): Use xpalloc instead of x2nrealloc.
	(heapify_down): Return void since no caller cares about value.
	* gl/modules/heap: Depend on idx.

2024-11-03  Bruno Haible  <bruno@clisp.org>

	build: Regenerate distributed built files in $(top_srcdir)
	* src/local.mk (src/dircolors.h, src/fs-is-local.h, src/fs.h): Generate
	in $(top_srcdir).

2024-11-02  Pádraig Brady  <P@draigBrady.com>

	cksum: add support for --algorithm=crc32b
	  $ echo -n '123456789' | cksum --raw -a crc32b | basenc --base16
	  CBF43926

	* bootstrap.conf: Explicitly depend on the crc module.
	* doc/coreutils.texi (cksum): Add "crc32b" as an argument to -a.
	* src/cksum.c (crc32b_sum_stream): A new function similar to
	crc_sum_stream, but which does not include the length in
	the CRC calculation.
	* src/cksum.h: Add crc32b_sum_stream prototype.
	* src/digest.c: Add "crc32b" as an argument to -a.
	* tests/cksum/cksum.sh: Refactor to test both crc and crc32b.
	* tests/cksum/cksum-a.sh: Add "crc32b" case.
	* tests/cksum/cksum-base64.pl: Likewise.
	* tests/misc/read-errors.sh: Likewise.
	* NEWS: Mention the new feature.

2024-11-02  Collin Funk  <collin.funk1@gmail.com>

	test: add string operators added by POSIX 2024
	* src/test.c (binop): Recognize the ">" and "<" operators.
	(three_arguments): Likewise.
	(binary_operator): Implement the "<" and ">" operators.
	(usage): Add operators to --help output.
	* tests/test/test.pl (@Tests): Add functionality tests.
	* doc/coreutils.texi (test invocation, String tests): Document new
	operators.
	* NEWS: Mention the new feature.

2024-11-01  Pádraig Brady  <P@draigBrady.com>

	doc: mention new timeout short options in NEWS
	* NEWS: Mention the timeout -f and -p options.

2024-11-01  Collin Funk  <collin.funk1@gmail.com>

	stty: adjust --help to match POSIX 2024
	* src/stty.c (usage): Mark cols, rows, and size as standardized by
	POSIX.
	* doc/coreutils.texi (Special): Likewise.

2024-11-01  Pádraig Brady  <P@draigBrady.com>

	doc: fix timeout --help for -p
	* src/timeout.c (usage): Fix typo of period with comma.
	* tests/timeout/timeout.sh: Only test a single option variant,
	as tests/misc/usage_vs_getopt.sh suffices for basic option validation.

2024-10-30  Pádraig Brady  <P@draigBrady.com>

	timeout: add -f and -p short options as per POSIX 2024
	* src/timeout.c: Support -f and -p short options, corresponding to
	--foreground and --preserve-status respectively.  This adds
	compatability with POSIX 2024 and OpenBSD.
	(usage): Separate translations, and reorder the option descriptions.
	* doc/coreutils.texi (timeout invocation): Adjust accordingly,
	and also reorder the option descriptions alphabetically.
	* tests/timeout/timeout.sh: Also test short option variants.

2024-10-20  Sylvestre Ledru  <sylvestre@debian.org>

	tests: cksum: verify --check with comments
	* tests/cksum/cksum-c.sh: Add a test case with a comment.

	tests: improve ls --dired with symlink testing
	* tests/ls/dired.sh: Verify ls --dired with symlink.

2024-10-14  Pádraig Brady  <P@draigBrady.com>

	maint: add syntax-check to ensure all gl/ files are distributed
	* cfg.mk (sc_gldist_missing): Add a new target to ensure we don't
	forget to distribute any new gl/ files.
	* gl/local.mk: Remove generation comment since it's
	now encapsulated in the syntax-check, which outputs a consumable
	diff to make any future adjustments.
	Also adjust ordering to that of the C locale used in the syntax check.

2024-10-14  Bruno Haible  <bruno@clisp.org>

	build: distribute the gl/ directory in the tarballs
	Suggested by Michael Pratt in
	<https://mail.gnu.org/archive/html/coreutils/2024-10/msg00010.html>.

	* gl/local.mk: New file, based on gettext/gnulib-local/Makefile.am.
	* Makefile.am: Include it.

2024-10-12  Masatake YAMATO  <yamato@redhat.com>

	cp,mv: align the descriptions of long options
	* src/cp.c (usage): Adjust white spaces for --update.
	* src/mv.c (usage): Ditto.
	Fixes https://bugs.gnu.org/73772

2024-10-07  Collin Funk  <collin.funk1@gmail.com>

	chroot,whoami: use uintmax_t for printing uids
	* src/chroot.c (main): Cast the uid to uintmax_t instead of int.
	* src/whoami.c (main): Cast the uid to uintmax_t instead of unsigned
	long int.

2024-10-06  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: adjust check-ls-dircolors to recent change in ls.c
	'make distcheck' would fail since commit 75b34c77e43a, because the
	comparison by check-ls-dircolors fails.

	* Makefile.am (check-ls-dircolors): Adjust sed(1) expression to the
	changed data initialization.

2024-10-03  Pádraig Brady  <P@draigBrady.com>

	ls: fix spurious output with -Z
	* src/ls.c (gobble_file): Only output an error if there actually
	was an error.

	tests: ls: don't always skip a capability test
	* tests/ls/no-cap.sh: Move to being a root only test, since
	commit v9.5-132-g2a6bed933 we now need to call setcap
	to make the test effective.  Otherwise we would have always
	just skipped the test.

2024-10-03  Paul Eggert  <eggert@cs.ucla.edu>

	ls: tune usage of getxattr/stat syscalls
	Update gnulib submodule to latest.  This changes the file_has_aclinfo
	API, so at the same time do the following changes to ls.c, which
	adjusts to these changes among other things.
	* src/ls.c (filetype_d_type, d_type_filetype): New static constants.
	(format_needs_capability): New static var.
	(main): Set and use it.  Don’t set format_needs_stat merely
	because print_scontext, as we needn’t call stat to get the
	scontext.  Instead, set format_needs_type if print_scontext but
	not format_needs_stat.
	(print_dir): Use new static tables to determine filetype
	more efficiently.
	(file_has_aclinfo_cache): Adjust to Gnulib file_has_aclinfo API change.
	(gobble_file): Check stat if format_needs_type but the type is
	unknown.  Be conservative, and when deciding whether to check stat
	but the type is unknown, assume it might be directory.  Similarly
	for normal files when classifying; if the type is unknown assume
	it might be normal.  Use new static constants and IFTODT to
	compute filetype more straightforwardly.  Get ACLs and check for
	capability less often.
	(get_color_indicator): Omit unnecessary call to is_colored (C_CAP),
	since f->has_capability can be true only if is_colored (C_CAP).

	ls: omit cast from gobble_file
	* src/ls.c (gobble_file): Minor refactoring.  Last arg is now null
	pointer, not "", for no directory.  All callers changed.
	Avoid need for cast from char const * to char *.

	ls: check FILETYPE_INDICATORS cardinality
	* src/ls.c (filetype_cardinality): New constant.
	(filetype_letter): Omit unnecessary trailing NUL.
	(FILETYPE_INDICATORS): Remove, moving definiens to ...
	(get_color_indicator): ... here, and check its cardinality too.

	ls: tune indicator_name
	* src/ls.c (indicator_name): Simplify type; it is now merely
	a 2-dimensional array of char.  All uses changed.

	ls: omit some unnecessary NULs
	* src/ls.c (BIN_STR): New macro, replacing LEN_STR_PAIR.
	All uses changed.  This avoids the need to store the
	trailing \0 in each string.  This change is more for clarity,
	to make it clear the \0 is not needed.

	ls: tune is_colored
	* src/ls.c (is_colored): Tune.
	This shrinks the machine code considerably on x86-64.

	ls: omit unnecessary test
	* src/ls.c (gobble_file): Omit redundant test of variable that
	must be false here.

2024-10-02  Pádraig Brady  <P@draigBrady.com>

	ls: reinstate capability checking in more cases
	The recent commit v9.5-119-g4ce432ad8 restricted capability checking
	to only files with XATTR_NAME_CAPS set.  If this is done then we need
	to adjust tests/ls/no-cap.sh so that it doesn't always skip.  More
	problematically XATTR_NAME_CAPS was only determined in long listing
	mode, thus breaking capability coloring in short listing mode
	as evidenced by the failing tests/ls/capability.sh test.

	Note capability checking does have a large overhead, but we've
	disabled capability checking by default anyway through the default
	color configuration since v9.0-187-g6b5134770

	So for these reasons revert to checking capabilities as before.

	* src/ls.c (gobble_file): Check for capabilities in all modes
	if enabled in color config.

2024-10-02  Lukáš Zaoral  <lzaoral@redhat.com>

	doc: ls: fix regression in -k description
	The description of -k regressed in coreutils 9.0

	* doc/coreutils.texi (ls invocation): Fix incomplete paragraph
	describing -k introduced by a mistake in commit v8.32-180-g1625916a1.

2024-10-02  Pádraig Brady  <P@draigBrady.com>

	tests: df: avoid false failure due to fuse.portal
	* tests/df/skip-rootfs.sh: Explicitly exclude "fuse.portal"
	file systems as these give EPERM errors from statfs().

2024-10-02  Pádraig Brady  <P@draigBrady.com>

	tests: fix skipping of mtab simulation tests
	Where rpl_fopen() is used rather than fopen(),
	wrapping fopen() is ineffective.
	Note rpl_fopen() is used as of glibc-2.39 at least
	(due to fflush and fclose being replaced).

	* tests/df/no-mtab-status.sh: Wrap open() rather than fopen().
	* tests/df/skip-duplicates.sh: Likewise.

2024-09-30  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: avoid sc_preprocessor_indentation failure in factor.c
	Prompted by the following 'make syntax-check' failure:
	  cppi: src/factor.c: line 175: not properly indented
	  cppi: src/factor.c: line 176: not properly indented
	  maint.mk: incorrect preprocessor indentation
	  make: *** [cfg.mk:750: sc_preprocessor_indentation] Error 1

	* src/factor.c: Filter through 'cppi -a'.

2024-09-30  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: add fold(1) test for --bytes option
	Inspired by:
	- https://access.redhat.com/solutions/3459791
	- https://src.fedoraproject.org/rpms/coreutils/c/8080f5a15a20362c

	* tests/misc/fold.pl (bw1, bw2): Add tests for 'fold -b'.

2024-09-30  Paul Eggert  <eggert@cs.ucla.edu>

	ls: use fewer xattr-related syscalls
	* src/ls.c: Do not include <selinux/selinux.h> or "smack.h".
	Include <linux/attr.h> if HAVE_LINUX_ATTR_H, for XATTR_NAME_CAPS.
	(free_ent): Use aclinfo_scontext_free to free f->scontext.
	(getfilecon_cache): Remove; no longer needed.
	(file_has_aclinfo_cache): Rename from file_has_acl_cache,
	and use file_has_aclinfo instead of file_has_acl.  All uses changed.
	(gobble_file): Use file_has_aclinfo instead of file_has_acl, so
	that we get more info about the file before deciding whether to
	issue further syscalls for it.  Let file_has_aclinfo worry about
	smack and SELinux.  Call has_capability only if the xattr list
	mentions XATTR_NAME_CAPS.

	build: update gnulib submodule to latest

2024-09-28  Paul Eggert  <eggert@cs.ucla.edu>

	factor: eliminate print_uuint recursion
	* src/factor.c (lbuf_putint_append): New function, with
	most of the old lbuf_putint body.  Do the umaxtostr stuff
	by hand so that we needn’t worry about the trailing NUL.a
	Do the string copy by hand since the string is so short.
	(lbuf_putint): Reimplement in terms of lbuf_putint_append.
	Omit last arg, which is no longer needed.  All callers changed.
	(print_uuint): Rewrite to avoid recursion, using
	lbuf_putint_append for the usual case.

	factor: lessen print_uuint recursion
	* src/factor.c (BIG_POWER_OF_10, LOG_BIG_POWER_OF_10):
	New constants.
	(print_uuint): Use them to lessen recursion depth.

	factor: print_uuint accepts uuint
	* src/factor.c (print_uuint): Rename from print_uintmaxes
	and accept a uuint rather than two uintmax_t values.
	Alll uses changed.

	factor: simplify table count
	* src/factor.c (PRIMES_PTAB_ENTRIES): Simplify.

	factor: macro refactoring
	* src/factor.c (W_TYPE_SIZE): Simplify by always defining
	to UINTMAX_WIDTH.
	(W): Remove.  All uses replaced by W_TYPE_SIZE.
	We no longer need one of its static_asserts.

	factor: improve gmp-related buffering
	Previously, the code used stdio buffers for gmp numbers,
	and did its own buffering for smaller numbers.  This meant
	for more flushing than was needed.  The code now uses its
	own buffering for all standard output, which makes for
	less flushing and fewer writes.
	* src/factor.c (lbuf_half_flush): New function, taken from the
	body of lbuf_putnl.
	(lbuf_putnl): Use it.
	(lbuf_putmpz): New function, to output an mpz without using stdio.
	(print_factors): Output via functions instead of via stdio.

	factor: buffer stdout like other progs do
	* src/factor.c (lbuf_putnl): Don’t worry about whether
	stdin is a tty when deciding whether to buffer stdout.

	factor: improve fd buffering
	* src/factor.c (struct lbuf_, lbuf, lbuf_alloc): Remove.
	All uses removed.
	(FACTOR_PIPE_BUF): Now a constant instead of a macro.
	Increase to PIPE_BUF if available.
	(lbuf_buf, lbuffered): New static vars, replacing lbuf.
	All uses changed.
	(lbuf_flush): Avoid unlikely recursion on write failure.
	(lbuf_putc): Now simply adds a byte to the buffer.
	(lbuf_putnl): Do the work of the old lbuf_putc ('\n').
	Use changed.  Use memrchr to find the newline.
	(lbuf_putint): Widths are now int, not size_t.

	factor: powm2 returns uuint
	* src/factor.c (powm2): Return uuint rather than half via
	pointer. All callers changed.

	factor: factor_using_division returns uuint
	* src/factor.c (factor_using_division): Return uuint rather than
	half via pointer. All callers changed.

	factor: gcd2_odd returns uuint
	* src/factor.c (gcd2_odd): Return uuint rather than half via pointer.
	All callers changed.

	factor: mod2 now returns uuint
	* src/factor.c (uuset): New function.
	(mod2): Return uuint rather than having half the returned value
	stored via a pointer.  This makes the code a bit easier to read
	and can help the compiler avoid aliasing issues.  All callers changed.

	factor: new type uuint
	This refactors to add a new type, a uintmax_t pair, which
	can simplify some code without slowing it down.
	* src/factor.c (uuint): New type.
	(lo, hi, hiset, make_uuint): New functions.
	(struct factors.plarge): Use the new type.  All uses changed.

	factor: tweak prime_p zero counting
	* src/factor.c (prime_p): Use stdc_trailing_zero here too.
	This doesn’t make much of a performance difference but
	we might as well be consistent.

	factor: tweak gcd2_odd performance
	* src/factor.c (gcd2_odd): Use stdc_trailing_zeros here too.

	factor: tweak gcd_odd performance
	* src/factor.c (gcd_odd): Use stdc_trailing_zeros instead of
	counting zeros by hand.

	factor: switch to stdc_leading_zeros etc
	* bootstrap.conf (gnulib_modules): Add stdc_trailing_zeros.
	* cfg.mk (_gl_TS_unmarked_extern_vars): Remove factor_clz_tab,
	as it’s no longer present.
	* src/factor.c: Include stdbit.h.
	(__clz_tab, factor_clz_tab): Remove.
	(ASSERT, UHWtype, __GMP_DECLSPEC): Use simpler way to pacify
	-Wunused-macros.
	(count_leading_zeros, count_trailing_zeros):
	Remove.  All uses replaced by stdc_leading_zeros, stdc_trailing_zeros.
	(factor_using_division, prime2_p): Add a couple of ‘assume’s
	so that GCC knows the stdc_* calls are nonzero and can
	optimize accordingly.

	factor: port to platforms
	* src/factor.c (mod2): Work even if cntd <= cnta.  The old version
	of the code assumed that shifts by N had unspecified behavior
	unless 0 <= N < wordsize.  Although this assumption is portable to
	all known practical platforms, the C standard says these shifts
	have undefined behavior and some pedantic platforms check this.
	* tests/factor/create-test.sh:
	* tests/local.mk (factor_tests): New test t37.

2024-09-23  Pádraig Brady  <P@draigBrady.com>

	doc: remove extraneous periods from option --help
	* src/df.c (usage): Remove period from --help description.
	* src/cksum.c (usage): Likewise.
	* src/cp.c (usage): Likewise.
	* src/mkdir.c (usage): Likewise.
	* src/mv.c (usage): Likewise.
	* src/tee.c (usage): Likewise.

	doc: sort: be more descriptive than 'manual'
	* src/sort.c (usage): Don't mention the ambiguous "manual",
	rather "full documentation", echoing the language at the
	bottom of each coreutils man page.
	Fixes https://bugs.gnu.org/72914

	doc: env: simplify extra info in the man page
	* man/env.x: Avoid confusion in the [OPTIONS] section
	by renaming to [SCRIPT OPTION HANDLING], and removing info
	regarding default signal handling, which is best
	restricted to the full info manual.
	Addresses https://bugs.gnu.org/72914

	doc: improve printf(1) reference in echo man page
	* src/echo.c (usage): Use printf(1) rather than 'printf',
	which is marked up more appropriately, and can be
	referenced by some man page readers.
	Fixes https://bugs.gnu.org/72914

	doc: fix option markup in chgrp, chown, chmod man pages
	* src/system.h (emit_symlink_recurse_options): Remove quotes
	so that help2man markup is applied to the option.
	Fixes https://bugs.gnu.org/72914

2024-09-13  Pádraig Brady  <P@draigBrady.com>

	printf: add indexed argument support
	* src/printf.c (print_formatted): Add support for %i$ indexed args.
	* tests/printf/printf-indexed.sh: Add a new file of test cases.
	* tests/local.mk: Reference the new test file.
	* doc/coreutils.texi (printf invocation): Mention how mixed
	processing of indexed and sequential references are supported,
	unlike the printf(2) library function.
	* NEWS: Mention the new (POSIX:2024) feature.
	Addresses https://bugs.gnu.org/73068

2024-09-04  Collin Funk  <collin.funk1@gmail.com>

	maint: assume C89 escape sequences
	* src/ptx.c (unescape_string) [!__STDC__]: Assume compiler supports '\a'
	and '\v' escape sequences.

2024-08-29  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest

2024-08-28  Pádraig Brady  <P@draigBrady.com>

	all: fix error checking in gl/lib/xdectoint.c
	This issue was noticed with -flto on GCC 14.2.1

	* gl/lib/xdectoint.c (__xnumtoint): Only inspect the
	returned value if LONGINT_INVALID is not set,
	as the returned value is uninitialized in that case.
	Fixes https://bugs.gnu.org/72842

2024-08-25  Pádraig Brady  <P@draigBrady.com>

	maint: avoid a syntax check failure
	* tests/df/no-mtab-status.sh: mntent.h is always provided now by gnulib.
	* tests/df/skip-duplicates.sh: Likewise.

2024-08-25  Collin Funk  <collin.funk1@gmail.com>

	maint: adjust to Gnulib acl changes
	* src/copy.c (copy_reg, copy_interal): Use xcopy_acl instead of
	copy_acl.  Use xset_acl instead of set_acl.
	* src/cp.c (re_protect): Likewise.

	build: update gnulib submodule to latest
	* bootstrap: Update from Gnulib.

2024-08-19  Pádraig Brady  <P@draigBrady.com>

	install: dereference source symlinks when comparing
	* NEWS: Mention the change in behavior.
	* src/install.c (need_copy): s/lstat/stat/ for the source.
	* tests/install/install-C.sh: Add test cases
	(and improve existing test case which wan't valid
	due to the existing non standard modes on test files).
	Addresses https://bugs.gnu.org/72707

2024-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	maint: adjust to recent removal of verror.c
	* po/POTFILES.in: Remove lib/verror.c

	build: update gnulib submodule to latest
	* boostrap.conf (gnulib.modules): Add xvasprintf, which
	had been omitted by mistake.
	* src/copy.c, src/dd.c, src/test.c: Don't include verror.h,
	as Gnulib removed it.

2024-08-11  Pádraig Brady  <P@draigBrady.com>

	ls: add support for explicit file name sorting
	Support overriding previous sorting options
	with an explicit --sort=name option.

	* doc/coreutils.texi (ls invocation): Document the new option.
	* src/ls.c (usage): Likewise.
	(sort_args): Add the "name" entry, and sort to be consistent
	with the ordering presented in --help.
	* tests/ls/ls-time.sh: Add test cases.
	* NEWS: Mention the new feature.
	Suggested by: Tzvetelin Katchov

2024-08-11  Pádraig Brady  <P@draigBrady.com>

	maint: fix syntax-check failure
	* gl/lib/xdectoint.h: Reinstate indentation enforced with cppi.
	* src/head.c: Remove now redundant inclusion of "quote.h".

	doc: printf %b: clarify octal processing
	* src/printf.c: Remove redundant comment.
	State explicitly that the leading 0 is the exception
	from normal escape processing.  Remove a full stop for consistency.
	* doc/coreutils.texi (printf invocation): Add a reference
	to C99 string escapes since these are not mentioned
	in the referenced glibc printf info. Also explicitly state
	the leading 0 exception.  Also use NNN rather than OOO
	to be consistent with the --help documentation.
	Also remove and extraneous '\' and fix grammar in the info
	regarding the ninth bit.
	Addresses https://bugs.gnu.org/72657

2024-08-11  Paul Eggert  <eggert@cs.ucla.edu>

	maint: adjust to Gnulib safe_read etc. changes
	Although these patches don’t affect user-visible behavior,
	they do clean up the source code a bit, and the
	machine code should be a tiny bit more efficient.
	* src/cat.c (simple_cat, cat):
	* src/csplit.c (read_input):
	* src/head.c (copy_fd, elide_tail_bytes_pipe)
	(elide_tail_lines_pipe, elide_tail_lines_seekable, head_bytes)
	(head_lines):
	* src/install.c (have_same_content):
	* src/tac-pipe.c (buf_init_from_stdin):
	* src/tac.c (tac_seekable, copy_to_temp):
	* src/tail.c (dump_remainder, file_lines, pipe_lines)
	(pipe_bytes, start_bytes, start_lines, tail_forever_inotify):
	* src/tr.c (plain_read):
	Adjust to recent Gnulib changes by using new types
	for safe_read, safe_write, full_read, full_write.

	maint: list Gnulib sys_types directly
	* bootstrap.conf (gnulib_modules): Add sys_types.
	Although it’s already brought in indirectly, coreutils
	code includes <sys/types.h> directly.

	build: update gnulib submodule to latest

	head: fix overflows in elide_tail_bytes_pipe
	Not clear that the overflows could be exploited,
	but they made the code confusing.
	* src/head.c (elide_tail_bytes_pipe): Don’t convert uintmax_t
	to size_t first thing; wait until it’s known the value will fit,
	and then use idx_t rather than size_t to prefer signed types.
	Prefer idx_t in nearby code, too.
	Rename locals n_elide_0 to n_elide (for consistency elsewhere)
	and n_elide to in_elide.
	Remove bogus (SIZE_MAX < n_elide + READ_BUFSIZE) test;
	in the typical case where n_elide’s type was the same as
	that of SIZE_MAX, the test never succeeded, and in the
	less-common case where n_elide was wider than size_t,
	the addition could silently overflow, causing the test
	to fail when it should succeed.  The test is not needed anyway now.
	Add static asserts to document code assumptions.
	Redo the ! (n_elide <= HEAD_TAIL_PIPE_BYTECOUNT_THRESHOLD) case
	so that it works with enormous values of n_elide even on
	32-bit platforms; for example, n_bufs is now uintmax_t not size_t.
	Simplify by using xpalloc instead of by-hand code.
	Remove bogus ‘if (rem)’ test, as rem is always nonzero.

	head: new test for big count
	* tests/head/head-c.sh: Also test head -c with a number
	much bigger than UINTMAX_MAX.

	tail: support counts > 2**64
	* src/tail.c (tail_lines): If skipping all input, use lseek if
	possible.
	(parse_options): Allow counts to exceed 2**64.
	(main): Don’t subtract 1 from UINTMAX_MAX, since it stands
	for infinity in this context.
	(main): Also don’t read anything when given infinite elisions.
	* tests/tail/tail.pl: Adjust to match new behavior.  Rename err-5
	test to big-c and expect the invocation to succeed, since ‘tail
	-c99999999999999999999’ now succeeds instead of (unnecessarily)
	failing.

	head: off_t not uintmax_t for file offset
	* src/head.c (elide_tail_lines_pipe):
	Use off_t, not uintmax_t, for a local var that is
	a file offset.

	nproc: support --ignore counts > 2**64
	* src/nproc.c (main): Allow --ignore arg to exceed 2**64.

	nl: support -l counts > 2**64
	* src/nl.c (main): Allow -l arg to exceed 2**64.

	head: support counts > 2**64
	* src/head.c (head): Optimize for -n-HUGE, where HUGE exceeds
	2**64 - 2.
	(string_to_integer): Return UINTMAX_MAX for too-large numbers,
	instead of failing.
	(main): Omit no-lnger-necessary test for byte count overflow.

	digest: improve -l overflow diagnostic
	* src/digest.c (main): Use better diagnostic for -l overflow,
	by using XTOINT_MAX_QUIET to suppress the worse diagnostic.

	maint: distinguish EOVERFLOW vs ERANGE better
	Also, prepare for allowing some arguments to overflow
	without that being an error.
	* gl/lib/xdectoint.c: Do not include stddef.h,
	since we no longer use ‘unreachable’.
	(xnumtoimax, xnumtoumax, __xnumtoint):
	New arg FLAGS.  All callers changed.
	Stop using __xdectoint_signed.  All definers removed.
	* gl/lib/xdectoint.h (XTOINT_MIN_QUIET, XTOINT_MAX_QUIET)
	(XTOINT_MIN_RANGE, XTOINT_MAX_RANGE): New flag constants.
	* src/fmt.c (main):
	* src/fold.c (main):
	* src/nl.c (main):
	* src/pr.c (getoptnum):
	* src/split.c (main):
	Use XTOINT_MIN_RANGE and XTOINT_MAX_RANGE if appropriate.
	* src/pr.c (getoptnum): Return int rather than returning void
	and storing through int *.
	* src/stty.c (apply_settings):
	Use ckd_add to check for overflow instead of doing it by hand.
	(integer_arg): Accept and return uintmax_t, not unsigned long.

2024-08-08  Richard Purdie  <richard.purdie@linuxfoundation.org>

	tests: df-P.sh: fix intermittent false failure
	The test writes to the disk and means the space used changes. If this
	crosses a number boundary, the heading spacing can change:

	-Filesystem     1024-blocks  Used Available Capacity Mounted on
	+Filesystem     1024-blocks   Used Available Capacity Mounted on

	* tests/df/df-P.sh: Squash spaces with tr to avoid alignment variations.

2024-08-04  Paul Eggert  <eggert@cs.ucla.edu>

	build: modernize AC_CHECK_TYPE usage
	* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES):
	Use current form of AC_CHECK_TYPE instead of the
	no-longer-documented obsolescent form.

2024-08-04  Pádraig Brady  <P@draigBrady.com>

	maint: avoid warning on older GCC compilers
	* src/shuf.c: Avoid -Werror=maybe-uninitialized on GCC 10.2.1 at least.
	This issue does seem to be addressed on GCC 12.

	tests: limit mem usage on potentially expensive test
	* tests/misc/write-errors.sh: Limit mem usage if possible,
	as some implementations may use unbounded memory for
	the tests cases used here.

	tests: ensure utils support writing to a closed pipe
	* tests/misc/write-errors.sh: A closed pipe is a common scenario,
	and should not induce an error.  The general case is discussed at:
	https://www.pixelbeat.org/programming/sigpipe_handling.html

	doc: reference 'dircolors invocation' from ls --color info
	* doc/coreutils.texi: Reference how to configure colors,
	from the ls --color description.

	doc: clarify which ls color attributes don't apply to dirs
	* src/dircolors.hin: Clarify that SETUID, SETGID, CAPABILITY, and EXEC
	coloring, only apply to regular files.

2024-08-04  Paul Eggert  <eggert@cs.ucla.edu>

	shuf: tiny simplification
	* src/shuf.c (main): Omit redundant assignment.

	shuf: avoid integer overflow on huge inputs
	* gl/lib/randperm.c: Include <stdckdint.h>.
	(randperm_bound): Return SIZE_MAX if the multiplication overflows.
	Do not overflow when converting bit count to byte count.

	shuf: fix randomness bug
	Problem reported by Daniel Carpenter <https://bugs.gnu.org/72445>.
	* gl/lib/randread.c (randread_new): Fill the ISAAC buffer
	instead of storing at most BYTES_BOUND bytes into it.

2024-07-30  Collin Funk  <collin.funk1@gmail.com>

	maint: remove unnecessary inttostr usage in printf
	* src/cksum.c (output_crc): Use '%ju' instead of umaxtostr.
	* src/shred.c (dopass): Likewise.
	* src/csplit.c (handle_line_error, regexp_error, close_output_file)
	(parse_patterns): Use '%jd' instead of offtostr.
	* src/tail.c (xlseek): Likewise.
	* src/head.c (elseek): Likewise.
	* src/group-list.c (gidtostr_ptr): Remove function.
	(gidtostr): Remove macro.
	(print_group): Use '%ju' instead of umaxtostr.
	* src/id.c (gidtostr_ptr, uidtostr_ptr): Remove functions.
	(gidtostr, uidtostr): Remove macros.
	(print_user, print_full_info): Use '%ju' instead of umaxtostr.
	* src/sort.c (specify_nmerge): Use '%u' instead of uinttostr.

2024-07-22  Pádraig Brady  <P@draigBrady.com>

	build: support creating reproducible tarball contents
	We already support reproducible builds since commit v8.24-99-gc1b3d6587,
	and this adjusts that change to also support reproducible
	tarball contents with subsequent runs of `make dist`.

	* Makefile.am: Don't create a varying .timestamp file, instead ...
	* man/local.mk: Rely on the timestamp of the .tarball-version file.
	Fixes https://bugs.gnu.org/72232

2024-07-16  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port to noatime file systems
	On these file systems the atime is always zero.
	Problem found with ZFS on Ubuntu 24.04 LTS.
	* tests/stat/stat-birthtime.sh (check_timestamps_updated):
	* tests/stat/stat-nanoseconds.sh:
	Work even if atimes are always zero.
	* tests/stat/stat-nanoseconds.sh:
	Fix typo: print_ver_ called before init.sh sourced.

	maint: update bootstrap from Gnulib

	maint: adjust to Gnulib -Wsystem-headers change
	* configure.ac: Don’t suppress -Wsystem-headers since Gnulib no
	longer enables it.

	build: update gnulib submodule to latest

2024-07-10  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: add fold(1) test for non-existent files
	* tests/misc/fold.pl: Add 'enoent' test.

2024-07-04  Collin Funk  <collin.funk1@gmail.com>

	maint: import tests/init.sh from Gnulib during bootstrap
	* bootstrap.conf (bootstrap_post_import_hook): Use gnulib-tool
	--copy-file to import tests/init.sh.
	* tests/init.sh: Remove file.
	* .gitignore (/tests/init.sh): Add entry.

2024-07-03  Pádraig Brady  <P@draigBrady.com>

	doc: remove 'proposed' in regard to $'' descriptions
	$'' is POSIX standard syntax as of POSIX.1-2024, as per:
	https://www.austingroupbugs.net/view.php?id=249

	* doc/coreutils.texi (quotingStyles): Remove 'proposed'.
	* src/printf.c: Likewwise.
	Reported at https://bugs.debian.org/1074776

2024-07-02  Pádraig Brady  <P@draigBrady.com>

	tests: fix improper use of grep -v
	* tests/cksum/cksum-c.sh: Remove improper use of `grep -v`.

2024-07-02  Sylvestre Ledru  <sylvestre@debian.org>

	tests: cksum: check when several files are missing or incorrect
	 * tests/cksum/cksum-c.sh: Add test cases when several files with errors

2024-07-01  Collin Funk  <collin.funk1@gmail.com>

	maint: silence deprecated module warning
	* bootstrap.conf (gnulib_modules): Use putenv-gnu instead of putenv.

2024-06-29  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer endian.h for byte order conversions
	* bootstrap.conf (gnulib_modules): Remove byteswap. Add endian.
	* src/cksum.c: Include endian.h instead of byteswap.h.
	(SWAP): Remove macro.
	(cksum_slice8): Use htobe32 instead of SWAP.
	(output_crc): Likewise.
	* src/sum.c: Include endian.h instead of byteswap.h.
	(SWAP): Remove macro.
	(output_bsd): Use htobe16 instead of SWAP.
	(output_sysv): Use htobe16 instead of SWAP.
	* .gitignore: Add /lib/endian.h.

	build: update gnulib submodule to latest
	* gnulib: Update to latest

2024-06-27  Pádraig Brady  <P@draigBrady.com>

	ls: treat --time=mtime consistently with other time selectors
	* src/ls.c: Track if --time=mtime is explicitly specified,
	so that we can apply the GNU extension of sorting by the
	specified time, when not displaying (-l not specified),
	and not explicitly sorting (-t not specified).
	* tests/ls/ls-time.sh: Add / Update test cases.
	Fixes https://bugs.gnu.org/71803

2024-06-26  Pádraig Brady  <P@draigBrady.com>

	doc: document the c-maybe quoting style
	* doc/coreutils.texi (ls invocation): Document the "c-maybe"
	--quoting-style, which was added as an option in 2008.
	Reported at https://bugs.debian.org/1074334

2024-06-25  Bruno Haible  <bruno@clisp.org>

	stat: reactivate a translator comment (lost on 2012-01-09)
	* src/stat.c (default_format): Move translator comment to immediately
	precede the _() invocation.

2024-06-01  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: improve ERE in sc_tests_list_consistency
	The ERE used lacks the grouping of the extensions and therefore would
	also match files where the first two patterns are not at the end of
	the line:
	  grep -E '\.sh|\.pl|\.xpl$'

	* cfg.mk (sc_tests_list_consistency): Add grouping (...) around the
	sub-patterns.  While at it, also remove the redundant escaping, i.e.,
	\$$ -> $$ to be consistent with the rest of this file.

2024-05-28  Pádraig Brady  <P@draigBrady.com>

	stat,tail: sync with latest Linux file systems
	* src/stat.c (human_fstype): Rename "FUSEBLK" to "FUSE" to sync with
	kernel adjustments.  Add "bcachefs", and "pidfs".  Both are local,
	with the latter being similar to "proc" which is also local.
	* NEWS: Mention the change in behavior, and the improvement.

2024-05-24  Paul Eggert  <eggert@cs.ucla.edu>

	ls: improve sorting doc
	Problem reported by Dan Jaobson (Bug#71171).
	* doc/coreutils.texi: Clarify that directory entries are sorted,
	not command-line arguments.
	* src/ls.c (usage): Be less chatty about -U and
	about --group-directories-first.

2024-05-22  Sylvestre Ledru  <sylvestre@debian.org>

	tests: cksum: extend with --status, --ignore-missing and --warn
	* tests/cksum/cksum-c.sh: Add test cases for these option combinations.

2024-05-21  Pádraig Brady  <P@draigBrady.com>

	build: fix build failure in --enable-single-binary mode
	* src/local.mk: Avoid overriding automake generated DEPENDENCIES,
	so that it applies its adjustments to LDADD to avoid propagating
	flags (like -Wl,-rpath) into make targets.  This was seen on FreeBSD
	where LIBINTL is set to:
	/usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib
	Instead let automake generate a sanitized src_coreutils_DEPENDENCIES
	(based on LDADD), which we then augment with the EXTRA_... variable.

	maint: add lib/stdbit.h to .gitignore
	Following recent gnulib update

2024-05-20  Paul Eggert  <eggert@cs.ucla.edu>

	stty: port test to Alpine Linux
	* tests/stty/stty.sh: Port to Alpine Linux 3.20.0_rc1, whose musl
	implementation’s printf invokes ioctl on stdout, so --version
	does an ioctl.

2024-05-17  Paul Eggert  <eggert@cs.ucla.edu>

	dd: skip some alloc tests on ZFS
	* tests/dd/sparse.sh: Skip some tests on ZFS.

	maint: prefer stdbit.h to count-leading-zeros.h
	<stdbit.h> is in C23 and should be more portable in the long run,
	now that Gnulib supports it.
	* bootstrap.conf (gnulib_modules): Remove count-leading-zeros.
	Add stdc_leading_zeros.
	* gl/lib/randperm.c, src/ioblksize.h:
	Include stdbit.h instead of count-leading-zeros.h.
	* gl/lib/randperm.c (floor_lg): Remove; no longer needed.
	(randperm_bound): Use stdc_bit_width instead of floor_lg;
	* gl/modules/randperm (Depends-on): Remove count-leading-zeros.
	Add stdc_bit_width.
	* src/ioblksize.h (io_blksize): Use stdc_leading_zeros_ull
	instead of count_leading_zeros_ll.

	maint: port test warnings to GCC 14
	* configure.ac: Disable GCC 14’s -Wmissing-variable-declarations
	in the test directory, as it’s not worth the aggravation there.
	Likewise for GCC's -Wsuggest-attribute=cold.

	maint: update bootstrap from Gnulib

	build: update gnulib submodule to latest

	sort: better -Wmissing-variable-declarations
	* src/sort.c: Ignore -Wmissing-variable-declarations only
	with GCC 14 and newer, since it didn’t exist earlier.
	Ignore the warning only when including md5.h, where it
	needs to be ignored, as the warning might be useful elsewhere.

	cksum: improve API consistency checking
	* src/cksum.c (main) [CRCTAB]: Generate updated crctab.c (see below).
	* src/crctab.c: Include cksum.h, to check consistency
	between decl and defn.  Include stdio.h since cksum.h needs it.

2024-05-15  Nikolaos Chatzikonstantinou  <nchatz314@gmail.com>

	doc: improve the man page for sleep
	This patch is part of work done for a project from Google Summer of
	Code, see the project details at
	<https://summerofcode.withgoogle.com/programs/2024/projects/E9Jp7RUx>.

	* src/sleep.c (usage): Directly mention the floating-point option,
	which is typical for sleeping milliseconds.
	Also reorganize the text to be 3 lines rather than 4.

2024-05-11  Sylvestre Ledru  <sylvestre@debian.org>

	tests: cksum: add incorrect data to verify --check & --strict
	* tests/cksum/cksum-c.sh: Add test cases.

2024-05-09  Pádraig Brady  <P@draigBrady.com>

	wc: increase I/O size from 16 KiB to 256KiB
	Similarly to commit v9.4-143-gfcfba90d0,
	and enabled for AVX by commit v9.5-25-g0e4450103.

	This was seen to improve AVX performance by about 10%
	on an AMD 7800X3D (Ryzen 7 (2023)) CPU,
	while having neutral AVX performance,
	on an Intel i7-5600U (Broadwell-U (2015)) CPU.
	With avx not enabled, this gives about a 3% performance boost,
	on an Intel i7-5600U.

	* src/wc.c: Use the centrally configured optimum buffer size.
	* src/wc_avx2.c: Likewise.
	* NEWS: Mention the change in performance.

2024-05-09  Evgeny Nizhibitsky  <nizhibitsky@gmail.com>

	wc: simplify and generalize AVX code
	* src/wc_avx2.c (wc_lines_avx2): Change from
	_mm256_sub_epi8() + _mm256_sad_epu8() to
	_mm256_movemask_epi8() + __builtin_popcount().
	This will allow adjusting the I/O size above 16KiB.
	* configure.ac: Align check with routines used in wc_avx2.c.

2024-05-07  Bruce Jerrick  <bmj001@gmail.com>

	doc: pwd: improve the -P help description
	* src/pwd.c (usage): Say that symlinks are resolved,
	rather than the somewhat ambiguous "avoided".

2024-05-05  Nikolay Nechaev  <Nikolay_Nechaev@mail.ru>

	maint: rename octhexdigits macros
	isodigit -> isoct; octtobin -> fromoct; hextobin -> fromhex.
	* src/octhexdigits.h: Rename macros.
	* src/stat.c, src/printf.c: Use new macros.

	maint: factor out common macros of stat and printf
	* src/octhexdigits.h: isodigit, hextobin, octtobin macros.
	* src/stat.c, src/printf.c: Use octhexdigits.h.
	* src/local.mk: Corresponding adjustments.

	maint: factor out the common show_date functionality
	* src/show-date.{h,c}: Declaration and definition of show_date.
	* src/du.c: Wse the common show_date instead of the previous local
	function.
	* src/date.c: Wse the common show_date via a wrapper show_date_helper.
	* src/local.mk: Corresponding adjustments.

2024-05-04  Sylvestre Ledru  <sylvestre@debian.org>

	cksum: add tests to verify the presence of "*"
	* tests/cksum/cksum-a.sh: Add a test case.

2024-05-03  Pádraig Brady  <P@draigBrady.com>

	cp: actually support --update=none-fail
	* src/cp.c: Add the entries for the --update=none-fail option.
	* tests/mv/update.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/70727

2024-05-01  Collin Funk  <collin.funk1@gmail.com>

	maint: pacify GCC 14 -Wmissing-variable-declarations
	* src/local.mk: Include extern decl for 'Version'.
	* src/crctab.c (crctab): Add an extern decl.
	* src/cksum.c: Generate an extern decl.

2024-05-01  Pádraig Brady  <P@draigBrady.com>

	maint: pacify GCC 14 -Wmissing-variable-declarations wrt md5.h
	* src/sort.c: Use pragmas to avoid warnings with our
	openssl adjustment and to minimize coupling with openssl.

	maint: avoid syntax check failure with long lines
	* cfk.mk: Exclude bootstrap from sc_long_lines
	as it comes from gnulib.

2024-04-27  Pádraig Brady  <P@draigBrady.com>

	build: bootstrap with python gnulib-tool by default
	* gnulib: Update to support bootstrapping with python by default.
	* bootstrap: Sync with gnulib.
	* cfg.mk: Don't force python implementation with `make world`,
	rather rely on the auto selection of python if appropriate.

2024-04-23  Pádraig Brady  <P@draigBrady.com>

	doc: sort: give example for sorting on the last field
	* doc/coreutils.texi (sort invocation): Give a DSU example
	for sorting names which may have a variable number of fields.
	Addresses https://bugs.gnu.org/70532

	build: provide way to bootstrap with python gnulib-tool
	* cfg.mk: Add a new "world" default target so that one
	can bootstrap (using the python implementation), configure,
	and make, by using `make -f cfg.mk`.
	* gnulib: Update to latest primarily to test the
	bootstrap python implementation which is now in beta test.
	* README-hacking: Document the `make -f cfg.mk` shortcut.

2024-04-20  Paul Eggert  <eggert@cs.ucla.edu>

	tail: avoid infloop with -c on /dev/zero
	Problem reported by Ionut Nicula in:
	https://bugs.gnu.org/70477
	* src/tail.c (tail_bytes): Do not loop forever on commands
	like 'tail -c 4096 /dev/zero'.
	* tests/tail/tail-c.sh: Test this fix.

2024-04-17  Paul Eggert  <eggert@cs.ucla.edu>

	ls: -f now means -a -U
	Problem reported by Toby Kelsey <https://bugs.gnu.org/70418>.
	* src/ls.c (decode_switches): -f now simply means -a -U.
	(usage): Adjust to match.

2024-04-17  Collin Funk  <collin.funk1@gmail.com>

	maint: remove unnecessary stdbool.h include
	* src/temp-stream.c: Don't include <stdbool.h> since it is defined in
	config.h if the compiler does not support the C23 keyword.

2024-04-12  Pádraig Brady  <P@draigBrady.com>

	join: fix error message for -a and -v
	* src/join.c (main): s/field/file/ in the error message
	for -a and -v, introduced in TEXTUTILS-1_13-24-g6f63d53e1.
	Reported at https://bugs.debian.org/1068864

2024-04-07  Pádraig Brady  <P@draigBrady.com>

	doc: NEWS: mention sort being more efficient with /proc files
	* NEWS: Mention the improvement in commit v9.5-6-g8ff390328

2024-04-06  Paul Eggert  <eggert@cs.ucla.edu>

	split: don’t trust st_size on /proc files
	* src/split.c (create): Don’t trust st_size == 0.

	sort: don’t trust st_size on /proc files
	Problem and fix reported by Takashi Kusumi in:
	https://bugs.gnu.org/70231
	* src/sort.c (sort_buffer_size): Don’t trust st_size == 0.

	dd: don’t trust st_size on /proc/files
	* src/dd.c (skip): Don’t trust st_size == 0.

	cat: don’t trust st_size on /proc files
	* src/cat.c (main):
	Improve test for when copying will exhaust the output device.
	Do not rely on st_size, which is unreliable in /proc.
	Use lseek instead; this is good enough here.
	* tests/cat/cat-self.sh: Test the relaxation of the heuristic
	for self-copying.

2024-04-04  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest.
	* NEWS: Document 2 bugs fixed.

2024-04-01  Pádraig Brady  <P@draigBrady.com>

	doc: chown,chgrp: fix missing full stop in --help
	* src/chown.c (usage): Add a missing full stop.
	Fixes https://bugs.gnu.org/70126

2024-03-28  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.5
	* NEWS: Record release date.

2024-03-27  Bruno Haible  <bruno@clisp.org>

	tests: od: avoid outputting undefined floating point values
	od was seen to abort() on glibc on ia64 and m68k with the error:
	Fatal glibc error: printf_fp.c:501 (__printf_fp_buffer_1):
	assertion failed:
	  cy == 1 || (p.frac[p.fracsize - 2] == 0 && p.frac[0] == 0)

	* tests/od/od-multiple-t.sh: Avoid outputting long double floats
	to avoid undefined behavior. 'float' and 'double' are standardized
	by IEEE 754 (except on Linux/m68k) and don't have undefined values.

2024-03-26  Pádraig Brady  <P@draigBrady.com>

	build: update with gnulib fixes
	* gnulib: Update to incorporate gnulib fixes
	from Bruno Haible

	tests: numfmt: fix false failures on some systems
	* tests/misc/numfmt.pl: Verify that printf field width specs
	count characters and not bytes before enabling locale tests.
	This was seen on FreeBSD 14.0 and Solaris 11 OpenIndiana.
	Reported by Bruno Haible

	ls: avoid ENOENT from readdir() on FreeBSD 14
	* src/ls.c (print_dir): readdir() on FreeBSD 14 was
	seen to pass ENOENT through.  ENOENT in this context
	means "Directory unlinked but still open".
	Reported by Bruno Haible with tests/ls/removed-directory.sh

2024-03-26  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure due to mismatched isblank()
	There is a mismatch between isblank() used by tr and c32isblank() now
	used by uniq on Solaris 11 OpenIndiana. isblank() was seen to return
	true for non breaking space, while c32isblank() returned false.
	Interestingly on Solaris, non breaking space is considered a blank
	character, and isblank() and c32isblank() honor this in all locales.

	* tests/uniq/uniq.pl: Adjust the blank check to use join(1) rather than
	tr(1), as join uses the same blank determination routines as uniq(1).

2024-03-25  Pádraig Brady  <P@draigBrady.com>

	cp: with --no-preserve=mode ensure set-group-ID bits maintained on dirs
	This issue was introduced in commit v8.19-145-g24ebca6

	* src/copy.c (copy_internal): On systems that don't support ACLs,
	the fallback default chmod done on directories should maintain
	the set-group-ID, as that's generally auto-set by the system.
	* NEWS: Mention the fix.
	Reported by Bruno Haible on Alpine (with tests/cp/preserve-mode.sh)

2024-03-25  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure with partial locale info
	* tests/misc/numfmt.pl: Some systems with the fr_FR.UTF-8
	locale installed, do not have a thousands grouping character defined.
	In this case we skip the locale tests which depend on a non empty
	grouping character.

	tests: avoid triggering obsolete tail option processing
	* tests/ls/dired.sh: With 2 options, the latter is taken
	as a file name on some systems.  This avoids a false
	failure on Solaris and FreeBSD at least.

	tests: remove debugging from a test
	* tests/ls/dired.sh: Remove temp debugging output.

	tests: fix false failure on systems that can chmod symlinks
	* tests/chmod/symlinks.sh: The count of adjusted modes was
	one more on systems where symlink modes can be adjusted.
	Therefore only include the non symlinks in the count.

2024-03-24  Pádraig Brady  <P@draigBrady.com>

	doc: fix translation issue in chown/chgrp amalgamation
	* src/chown-core.h (emit_from_option_description): The conditional
	string composition here caused issues for translators.
	Instead move to a more general description ...
	(src/chown.c (usage): ... here.
	Fixes https://bugs.gnu.org/69985

	doc: fix various translation issues
	 src/chown.c (usage): Translate parameterized strings.
	 src/copy.c (copy_internal): Translate each part of ternary.
	* src/cp.c (usage): Fix typo; s/exisiting/existing/.

	test: avoid false failure with setgid directories
	* tests/chmod/symlinks.sh: Ensure this new test is immune
	to setgid directories by resetting modes with =777 rather than 777.
	Also output more debugging in all failure cases.

	tests: avoid false failure on new mv --exchange test
	* tests/mv/mv-exchange.sh: Canonicalize different
	"operation not supported" messages, so we can ignore correctly.
	Reported by Bruno Haible on AIX, NetBSD, and OpenBSD.

	doc: update THANKS related to env --argv0 option
	* THANKS.in: Add Matheus who was central to the env --argv0
	addition in commit v9.4-167-g193449b17.

2024-03-24  Stephane Chazelas  <stephane@chazelas.org>

	doc: ls: detail output format for device files
	* doc/coreutils.texi (ls invocation): State that device numbers
	are output, instead of file size.

2024-03-23  Pádraig Brady  <P@draigBrady.com>

	doc: remove older ChangeLog items
	* Makefile.am: Update the oldest documented version
	to 8.31 which is now about 5 years old.

2024-03-23  Paul Eggert  <eggert@cs.ucla.edu>

	mv: treat --exchange more like non-exchange
	Also, improve quality of diagnostics.
	Problems/suggestions by Bernhard Voelker in
	<https://bugs.gnu.org/69532#82>.
	* src/copy.c (emit_verbose): New arg FORMAT.  All uses changed,
	to improve quality of diagnostics when --exchange is used.
	(copy_internal): Don’t try to optimize --exchange so much; this
	simplifies the code and keeps it closer to the non --exchange case.

	cp,ln,mv: improve dir vs nondir diagnostics
	* src/copy.c (copy_internal): Simplify logic for copying
	from directory to non-directory or vice versa, and always
	diagnose with both source and destination file names.

2024-03-22  Pádraig Brady  <P@draigBrady.com>

	env: add -a,--argv0 to set the first argument passed to exec
	Using the shell's exec -a feature can be awkward
	so add support for setting overriding argv[0].
	This gives env full control over the arguments it passes.

	* src/env.c: Accept -a,--argv0 and set argv[0] appropriately.
	* tests/env/env.sh: Add test cases.
	* doc/coreutils.texi (env invocation): Describe -a,--argv0.
	* NEWS: Mention the new feature.

2024-03-21  Pádraig Brady  <P@draigBrady.com>

	doc: pr: give solution to expanding TABs in multicolumn output
	* doc/coreutils.texi (pr invocation): Explicitly state that
	multicolumn output will convert spaces to TABs, and show that
	this can be undone with the `pr -t -e` or `expand` commands.
	Suggested by Douglas McIlroy in https://bugs.gnu.org/69807

2024-03-20  Paul Eggert  <eggert@cs.ucla.edu>

	doc: clarify mv --exchange
	In the manual, say it exchanges all data and metadata.
	Suggested by Pádraig Brady in:
	https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69532#59

	mv: new option --exchange
	* src/copy.h (struct cp_options): New member 'exchange'.
	* src/copy.c (copy_internal): Support the new member.
	* src/mv.c (EXCHANGE_OPTION): New constant.
	(long_options): Add --exchange.
	(usage): Document --exchange.
	(main): Support --exchange.
	* tests/mv/mv-exchange.sh: New test case.
	* tests/local.mk (all_tests): Add it.

2024-03-19  Pádraig Brady  <P@draigBrady.com>

	chmod: fix TOCTOU security issue with symlink replacement
	This is an issue with -[H]R mode, where an attacker
	may replace a traversed file with a symlink
	between where we stat() the file and chmod() the file.

	* src/chmod.c (process_file): Remove the first !S_ISLNK guard
	as that's now just an optimization, and instead consistently
	apply fchmodat() to files/symlinks.  Ensure AT_SYMLINK_NOFOLLOW
	is set when traversing in default (-H) mode.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/11108

2024-03-19  Pádraig Brady  <P@draigBrady.com>

	chmod: add support for -h, -H,-L,-P, --dereference options
	There have been various requests to add -h to avoid following symlinks
	for security reasons.  This wasn't provided previously as chmod(1)
	already ignored symlinks unless specified on the command line.
	Note chmod defaults to -H mode rather than the chown default of -P,
	as usually chown can work directly on symlinks and so defaults
	to not traversing those specified on the command line.
	Note FreeBSD chmod does default to -P mode, but we retain the -H mode
	default also for compatibility with existing chmod behavior.

	Adding -HLP will allow chmod to disable traversing CLI symlinks to dirs.
	Adding -h will allow to disable following CLI symlinks to files/dirs,
	  also operating on all symlinks on systems that support that.
	Adding --dereference will be significant with -H (the default).  I.e.
	  symlinks to dirs not recursed, but symlinks are dereferenced.
	Adding these options will also be consistent with chown(1), chgrp(1),
	and chmod(1) on other systems.

	Note since chmod(1) currently ignores symlinks by default,
	and -h is primarily a mechanism to avoid following symlinks, rather than
	for operating on the symlink itself, we make -h try to chmod a symlink,
	but ignore ENOTSUP.  In that way we're consistent with chown(1)
	where it also ignores ENOTSUP for symlinks, and we don't fail when
	trying to be extra secure with command line params.

	* doc/coreutils.texi (chmod invocation): Reference the -H,-L,-P
	descriptions, and adjust the corresponding macros to say
	the default is -H or -P as appropriate.
	Add --dereference and -h,--no-dereference descriptions.
	* man/chmod.x: Adjust discussion of symlink handling.
	* src/chmod.c (main): Accept new options and set
	fts flags appropriately.
	(process_file): Process / dereference symlinks as necessary.
	* src/system.h (emit_symlink_recurse_options): A new function
	refactored from chown.c and chmod.c usage().
	* tests/chmod/symlinks.sh: New test for the new options.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.

2024-03-19  Pádraig Brady  <P@draigBrady.com>

	maint: basenc: consistently check buffer bounds when encoding
	* src/basenc.c (base16_encode, base2msbf_encode, base2lsbf_encode):
	Ensure we don't overflow the output buffer, whose length is
	passed in the OUTLEN parameter.  This issue was flagged by clang
	with -Wunused-but-set-parameter.

2024-03-19  Pádraig Brady  <P@draigBrady.com>

	pinky: disable location canonicalization by default
	Behave like who(1) in requiring --lookup to enable this
	often slow feature.  pinky(1) is supposed to be lightweight after all.

	* doc/coreutils.texi (who invocation): Adjust the description to no
	longer reference dialup, and be more general about the still significant
	delays.
	(pinky invocation): Reference the same --lookup description.
	* src/pinky.c (main): Accept --lookup to enable DNS lookups.
	* NEWS: Mention the change in behavior.
	Fixes https://bugs.debian.org/628815

2024-03-18  Pádraig Brady  <P@draigBrady.com>

	doc: fix stale --dereference info for chown/chgrp
	Following v5.2.1-679-g7e29ef8b8 symlinks specified on the command line
	no longer induce an error if lchown() is not supported on the system.

	* doc/coreutils.texi (chown invocation, chgrp invocation): Adjust
	accordingly, and also use a macro to avoid duplication.
	* src/chown-core.c: Use our more standard is_ENOTSUP() wrapper
	in the code related to this.

2024-03-17  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2024-03-15  Pádraig Brady  <P@draigBrady.com>

	build: provide a cross-compiling default for 16 bit float checks
	* configure.ac: Provide a conservative 16 bit float support default
	when cross-compiling, to avoid configure failing in that case.

2024-03-13  Grisha Levit  <grishalevit@gmail.com>

	env,kill,timeout: support unnamed signals
	Some signals with values less that the max signal number for the system
	do not have defined names.  For example, currently on amd64 Linux,
	signals 32 and 33 do not have defined names, and Android has a wider
	gap of undefined names where it reserves some realtime signals.

	Previously the signal listing in env ended up reusing the name
	of the last printed valid signal (the repeated HUP below):

	    $ env --list-signal-handling true
	    HUP        ( 1): IGNORE
	    HUP        (32): BLOCK
	    HUP        (38): IGNORE

	..and the corresponding signal numbers were rejected as operands for the
	env, kill, and timeout commands.

	This patch removes the requirement that sig2str returns 0 for a signal
	number associated with an operand.  This allows unnamed signals to be in
	the sets `env' attempts to manipulate when a --*-signal option is used
	with no argument, and kill(1) and timeout(1) to send such unnamed
	signals.

	* src/operand2sig.c (operand2sig): Drop signame argument, accept all
	signal numbers <= SIGNUM_BOUND.  All callers updated.
	* src/env.c (parse_signal_action_params, reset_signal_handlers)
	(parse_block_signal_params, set_signal_proc_mask)
	(list_signal_handling): Accept all signal numbers <= SIGNUM_BOUND,
	use SIG%d for printing if necessary.
	* src/kill.c (list_signals, main): Likewise.
	(send_signals): Check errno from kill(3) for bad signo.
	* src/timeout.c (main): Update operand2sig call.
	* tests/misc/kill.sh: Test listing all signal numbers.
	* NEWS: Mention the improvement.

2024-03-13  Pádraig Brady  <P@draigBrady.com>

	build: add caching for involved configure checks
	* configure.ac: Wrap the following with AC_CACHE_VAL,
	so that they can be cached / overridden.  We use
	the "utils_cv_" prefix as they're coreutils specific overrides.
	utils_cv_avx2_intrinsic_exists,
	utils_cv_brain_16_bit_supported,
	utils_cv_ieee_16_bit_supported,
	utils_cv_pclmul_intrinsic_exists,
	utils_cv_stdbuf_supported.

2024-03-13  Grisha Levit  <grishalevit@gmail.com>

	build: strengthen 16 bit float support checks
	Recent clang provides __bf16 on aarch64 but it is broken.

	If built with -O0, the conversion is wrong:

	    $ printf '\x3F\x80' | od --end=big -An -tfB | tr -d ' '
	    1.875

	If built with -O1 or higher, compilation fails:

	    fatal error: error in backend:
	    Cannot select: 0xb400007a58d29780: f32 = fp_extend 0xb40000...
	    0xb40000...: bf16,ch = CopyFromReg 0xb40000..., Register:bf16 %13
	    0xb40000...: bf16 = Register %13
	    In function: print_bfloat

	The latter issue does not cause the existing configure test to fail
	because the promotion is optimized out.

	* configure.ac: Ensure 16 bit float promotion code does not get
	optimized out, and produces an expected result.

2024-03-12  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer minmax.h instead of defining our own
	* src/comm.c (min): Remove.
	(compare_files): Use MIN which is referenced by system.h.

2024-03-12  Ville Skyttä  <ville.skytta@iki.fi>

	dircolors: add more archive extensions
	* src/dircolors.hin: Add .apk (Alpine Linux/Android package); .drpm
	(delta rpm); .egg, .pyz, and .whl (Python related); and .udeb (form of
	.deb).

2024-03-12  Collin Funk  <collin.funk1@gmail.com>

	doc: add basic documentation for 'pinky'
	* doc/coreutils.texi: Add 'pinky' under 'who'.

2024-03-12  Pádraig Brady  <P@draigBrady.com>

	timeout: fix narrow race in failing to kill processes
	* src/timeout.c (main): Block cleanup signals earlier so that cleanup()
	is not runnable until monitored_pid is in a deterministic state.
	This ensures we always send a termination signal to the child
	once it's forked.
	* NEWS: Mention the bug fix.
	Reported at https://github.com/coreutils/coreutils/issues/82

2024-03-11  Pádraig Brady  <P@draigBrady.com>

	timeout: fix race where we might kill arbitrary processes
	* src/timeout.c (cleanup): Handle the case where monitored_pid
	might be -1, which could happen if a signal was received
	immediately after a failed fork() call.  In that case it would
	send the termination signal to all processes that the timeout
	process has permission to send signals too.
	* NEWS: Mention the bug fix.

2024-03-06  Pádraig Brady  <P@draigBrady.com>

	cksum: ensure appropriate "binary" mode with --untagged
	* src/digest.c (main): If --binary was enabled with a previous --tag,
	then reset the binary mode to auto select if --untagged then specified.
	* tests/cksum/cksum-a.sh: Add a test case.

2024-03-05  Pádraig Brady  <P@draigBrady.com>

	mv: revert add --swap (-x) option
	Since this functionality is recently available
	in the exch(1) utility from util-linux,
	it was thought best not to complicate mv with it.

	This reverts commit 6cd2d5e5335b5c286ff39e154e9dd38ba6923775

2024-03-04  Pádraig Brady  <P@draigBrady.com>

	cksum: consistently validate --length attributes
	* src/digest.c (main): Only validate the last used --length
	for being a multiple of 8.
	* tests/cksum/b2sum.sh: Add a test case.
	Fixes https://bugs.gnu.org/69546

2024-03-03  Pádraig Brady  <P@draigBrady.com>

	doc: fix spellings in NEWS
	* NEWS: s/user/uses/; s/exisiting/existing/

2024-03-03  Petr Malat  <oss@malat.biz>

	mv: add --swap (-x) option to atomically swap 2 paths
	renameat2() syscall allows atomically swapping 2 paths on one
	file system. Expose this ability to the user with --swap.

	* doc/coreutils.texi: Describe mv --swap option.
	* src/mv.c (main): Support --swap.
	* tests/mv/mv-swap.sh: Add test for mv -x.
	* tests/local.mk: Reference new test.
	* NEWS: Mention the new option.

2024-02-28  Pádraig Brady  <P@draigBrady.com>

	cat,cp,mv,dd,install,split: set the default IO size to 256KiB
	* src/ioblksize.h: Add updated test results and
	increase value from 128KiB to 256KiB, which was last
	updated 10 years ago.
	* NEWS: Mention the improvement.

2024-02-27  lvgenggeng  <lvgenggeng@uniontech.com>

	mktemp: fix template diagnostic with --suffix
	* src/mktemp.c (main): When --suffix is specified, TEMPLATE
	points to the meraged buffer DEST_NAME. As X's in the suffix are
	not significant to the generated random characters, the diagnostic
	for too few X's should only refer to the template portion.
	* tests/misc/mktemp.pl: Adjust accordingly.
	* NEWS: Mention the bug fix.

2024-02-27  Pádraig Brady  <P@draigBrady.com>

	tests: move join tests to their own directory
	* tests/misc/join-utf8.sh: Move to tests/join
	since there are now multiple join tests.
	* tests/misc/join.pl: Likewise.

	tests: simplify treatment of the $LOCALE_FR_UTF8 variable
	* tests/df/problematic-chars.sh: Rely on gnulib setting
	this to "none" where not usable.
	* tests/misc/sleep.sh: Likewise.
	* tests/printf/printf-mb.sh: Likewise.
	* tests/printf/printf-quote.sh: Likewise.
	* tests/sort/sort-debug-keys.sh: Likewise.

2024-02-27  Bruno Haible  <bruno@clisp.org>

	join: avoid test failure on systems with no French UTF-8 locale
	* tests/misc/join-utf8.sh: Test the value of LOCALE_FR_UTF8 against
	'none', not against a missing value.
	Fixes https://bugs.gnu.org/69418

	sort: make the startup time optimization effective on glibc < 2.34
	* configure.ac: Test where to find the dlopen function. Set LIB_DL.
	Use it in the DLOPEN_LIBCRYPTO test.
	* src/local.mk (src_sort_LDADD): Add $(LIB_DL).

2024-02-26  Pádraig Brady  <P@draigBrady.com>

	build: improve libcrypto library detection
	* configure.ac: Match literal '.' in the file name
	to avoid potential mismatches with similarly named libs.
	Reported by Andreas Schwab

2024-02-26  Aearil  <aearil@paranoici.org>

	wc: fix -w with breaking space over UCHAR_MAX
	* src/wc.c (wc): Fix regression introduced in commit v9.4-48-gf40c6b5cf.
	* tests/wc/wc-nbsh.sh: Add test cases for "standard" spaces.
	Fixes https://bugs.gnu.org/69369

2024-02-26  Pádraig Brady  <P@draigBrady.com>

	cp,mv: add --update=none-fail to fail if existing files
	* src/cp.c (main): Add support for --update=none-fail to provide the
	functionality of diagnosing files in the destination,
	and exiting with failure status.
	(usage): Mark -n as deprecated.
	* src/mv.c: Likewise.
	* src/copy.h: Add UPDATE_NONE_FAIL definition.
	* src/system.h (emit_update_parameters_note): Add --update=none-fail
	description.
	* doc/coreutils.texi (cp invocation): Likewise.
	Also mention why -n is deprecated.
	* tests/mv/update.sh: Add a test case, including precedence
	with -n and other --update options.
	* tests/cp/cp-i.sh: Verify that --backup and --update=none{,-fail}
	are mutually exclusive.
	* tests/mv/mv-n.sh: Likewise.
	* NEWS: Mention the new feature.
	Addresses https://bugs.gnu.org/62572

	cp,mv: reinstate that -n exits with success if files skipped
	* src/cp.c (main): Adjust so that -n will exit success if skipped files.
	* src/mv.c (main): Likewise.
	* doc/coreutils.texi (cp invocation): Adjust the description of -n.
	* src/system.h (emit_update_parameters_note): Adjust --update=none
	comparison.
	* tests/cp/cp-i.sh: Adjust -n exit status checks.
	* tests/mv/mv-n.sh: Likewise.
	* NEWS: Mention the change in behavior.
	Fixes https://bugs.gnu.org/62572

2024-02-26  Pádraig Brady  <P@draigBrady.com>

	build: fix libcrypto version linked by sort at runtime
	One should link the versioned lib at runtime,
	and the unversioned lib at build time,
	as the unversioned lib may not be installed,
	and better couples the binary with the required version.

	* configure.ac: Define LIBCRYPTO_SONAME, determined from
	the test binary linked with -lcrypto.  Also document
	why we use SHA512() in the check, rather than MD5().
	* src/sort.c (link_libcrypto): Use the versioned lib in dlopen().

2024-02-26  Pádraig Brady  <P@draigBrady.com>

	maint: avoid sc_tight_scope failure in sort.c
	* cfg.mk: Exclude the ptr_MD5_* symbols added in
	commit v9.4-130-g7f57ac2d2, as there is no way
	to declare these static given they way they're defined.

2024-02-26  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention -lcrypto change in NEWS

	sort: dynamically link -lcrypto if -R
	This saves time in the usual case, which does not need -lcrypto.
	* configure.ac (DLOPEN_LIBCRYPTO): New macro.
	* src/sort.c [DLOPEN_LIBCRYPTO && HAVE_OPENSSL_MD5]: New macros
	MD5_Init, MD5_Update, MD5_Final.  Include "md5.h" after defining
	them.  Include <dlfcn.h>, and define new functions link_failure
	and symbol_address.
	(link_libcrypto): New function.
	(random_md5_state_init): Call it before using crypto functions.

	doc: de-“note” the documentation
	* doc/coreutils.texi, man/readlink.x, man/runcon.x:
	* src/comm.c (usage):
	* src/digest.c (usage):
	* src/echo.c (usage):
	* src/join.c (usage):
	* src/ln.c (usage):
	* src/rm.c (usage):
	* src/stat.c (usage):
	* src/system.h (USAGE_BUILTIN_WARNING):
	* src/test.c (usage):
	* src/touch.c (usage):
	* src/uniq.c (usage):
	Rewrite to avoid most uses of “Note that” and similar wording.
	These circumlocutions are rarely needed, and avoiding them
	improves readability and lessens preaching.

2024-02-22  Daan De Meyer  <daan.j.demeyer@gmail.com>

	cp: add --keep-directory-symlink option
	When recursively copying files into OS trees, it often happens that
	some subdirectory of the source directory is a symlink in the target
	directory. Currently, cp will fail in that scenario with the error:

	"cannot overwrite non-directory %s with directory %s"

	However, we'd like cp in this scenario to follow the destination
	directory symlink and copy the files into the symlinked directory
	instead. Let's support this by adding a new option
	--keep-directory-symlink that makes cp follow destination directory
	symlinks.

	We name the option --keep-directory-symlink to keep consistent with
	tar which has the same option with the same effect.

	* doc/coreutils.texi (cp invocation): Describe the new option.
	* src/copy.h: Add the new setting.
	* src/copy.h: Adjust to follow symlinks if setting enabled.
	* src/cp.c (usage): Describe the new option.
	(main): Accept the new option.
	* tests/cp/keep-directory-symlink.sh: A new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.

2024-02-19  Michel Lind  <michel@michel-slm.name>

	dircolors: update list of archive file extensions
	* src/dircolors.hin: Sort archive section by extension.
	Treat .crate (Rust archives) as archive files
	(they're essentially tar.gz files).

2024-02-19  Collin Funk  <collin.funk1@gmail.com>  (tiny change)

	maint: prefer #include <...> for gnulib substitute headers
	* src/shuf.c: Change #include "getopt.h" to #include <getopt.h>.
	* src/stat.c: Change #include "getopt.h" to #include <getopt.h>.
	* src/system.h: Change #include "error.h" to #include <error.h>.

2024-02-19  Pádraig Brady  <P@draigBrady.com>

	doc: add '[' to the info index
	* doc/coreutils.texi (test invocation): Add '[' to the index.

2024-02-18  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	nohup: document GCC bug number
	* src/nohup.c: Add GCC bug number to comment.

	ls: remove unnecessary pragmas
	* src/ls.c (decode_switches): Remove pragmas.  They are no longer
	needed to pacify GCC 13.2.1 with --enable-gcc-checking, and there’s
	little point keeping them around for older GCC versions.

	maint: update GCC version comment
	* src/copy.c: Update comment.

	maint: document fix for GCC bug 109628
	* src/fmt.c [14 <= __GNUC__]: Stop using pragma workaround,
	as the GCC folks say the bug is no longer present in GCC 14.

	maint: remove unneeded suggest-attributes pragmas
	* gl/lib/fadvise.c: Remove pragma that works around GCC bug 83559
	<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83559>.
	This bug was fixed in GCC 9, and we needn’t worry about
	--enable-gcc-warnings for compilers that old.
	* src/test.c: Likewise.

2024-02-17  Greg Wooledge  <greg@wooledge.org>

	doc: fix typo in shred example
	* doc/coreutils.texi (shred invocation): Fix the example
	to correctly close file descriptor 3.
	* THANKS.in: Remove old email since now recorded in repo history.
	Reported at https://bugs.debian.org/1063837

2024-02-07  Collin Funk  <collin.funk1@gmail.com>  (tiny change)

	maint: avoid -Wshadow warning under clang
	* src/env.c (parse_signal_action_params, parse_signal_block_params):
	Rename OPTARG to ARG so that it does not conflict with OPTARG used by
	getopt.

2024-02-07  Pádraig Brady  <P@draigBrady.com>

	build: fix od build on clang < 17
	* configure.ac: Ensure the compiler can promote 16 bit floating point
	types to float, before enabling that code in od.  This was an issue
	with clang 16 at least.
	* src/od.c: Adjust for the new defines.
	* tests/od/od-float.sh: Likewise.  Also port to the dash shell,
	whose inbuilt printf doesn't support hex escapes.

2024-02-05  Pádraig Brady  <P@draigBrady.com>

	od: support half precision floating point
	Rely on compiler support for _Float16 and __bf16
	to support -fH and -fB formats respectively.
	I.e. IEEE 16 bit, and brain 16 bit floats respectively.
	Modern GCC and LLVM compilers support both types.

	clang-sect=half-precision-floating-point
	https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
	https://clang.llvm.org/docs/LanguageExtensions.html#$clang-sect
	https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0192r4.html
	https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1467r9.html

	This was tested on:
	gcc 13, clang 17 x86 (Both types supported)
	gcc 7 aarch64 (Only -fH supported)
	gcc 13 ppc(be) (Neither supported. Both will be with GCC 14)

	* src/od.c: Support -tf2 or -tfH to print IEEE 16 bit floating point,
	or -tfB to print Brain 16 bit floating point.
	* configure.ac: Check for _Float16 and __bf16 types.
	* doc/coreutils.texi (od invocation): Mention the new -f types.
	* tests/od/od-float.sh: Add test cases.
	* NEWS: Mention the new feature.
	Addresses https://bugs.gnu.org/68871

2024-01-29  Paul Eggert  <eggert@cs.ucla.edu>

	seq: say why not ‘x += step’
	* src/seq.c (print_numbers): Add comment.

2024-01-18  Pádraig Brady  <P@draigBrady.com>

	doc: split -C: test and document a heap overflow
	This was introduced in coreutils 9.2 through commit v9.1-184-g40bf1591b,
	and was fixed in coreutils 9.5 through commit v9.4-111-gc4c5ed8f4.
	This issue has been assigned CVE-2024-0684.

	* NEWS: Mention the bug fix.
	* tests/split/line-bytes.sh: Add a test case.
	Reported by Valentin Metz.

2024-01-17  Pádraig Brady  <P@draigBrady.com>

	tests: make ulimit -v interact better with ASAN
	ulimit -v is generally not supported with ASAN, giving errors like:
	  "ReserveShadowMemoryRange failed while trying to map 0x... bytes.
	   Perhaps you're using ulimit -v"

	* tests/cp/link-heap.sh: Mention ASAN as a possible reason for skipping.
	* tests/csplit/csplit-heap.sh: Likewise.
	* tests/cut/cut-huge-range.sh: Likewise.
	* tests/dd/no-allocate.sh: Likewise.
	* tests/printf/printf-surprise.sh: Likewise.
	* tests/rm/many-dir-entries-vs-OOM.sh: Likewise.
	* tests/head/head-c.sh: Only skip the part of the test needing ulimit.
	* tests/split/line-bytes.sh: Likewise.

2024-01-17  Paul Eggert  <eggert@cs.ucla.edu>

	split: do not shrink hold buffer
	* src/split.c (line_bytes_split): Do not shrink hold buffer.
	If it’s large for this batch it’s likely to be large for the next
	batch, and for ‘split’ it’s not worth the complexity/CPU hassle to
	shrink it.  Do not assume hold_size can be bufsize.

2024-01-10  Sylvestre Ledru  <sylvestre@debian.org>

	tests: ls: add a test to verify that '+' is added
	* tests/ls/acl.sh: Add a new test.
	* tests/local.mk: Reference the new test.

2024-01-06  Samuel Tardieu  <sam@rfc1149.net>

	maint: add attributes to two functions without side effects
	* src/date.c (res_width): This function computes its result solely
	from the value of its parameter and qualifies for the const attribute.
	* src/tee.c (get_next_out): This function has no side effect and
	qualifies for the pure attribute.
	* THANKS.in: Remove duplicate now that author has a commit in the repo.

	Those two functions were flagged by GCC 12.3.0,
	though not by GCC 13.2.1.

2024-01-01  Pádraig Brady  <P@draigBrady.com>

	maint: update all copyright year number ranges
	Update to latest gnulib with new copyright year.
	Run "make update-copyright" and then...

	* gnulib: Update included in this commit as copyright years
	are the only change from the previous gnulib commit.
	* tests/init.sh: Sync with gnulib to pick up copyright year.
	* bootstrap: Manually update copyright year,
	until we fully sync with gnulib at a later stage.
	* tests/sample-test: Adjust to use the single most recent year.

2024-01-01  Paul Eggert  <eggert@cs.ucla.edu>

	maint: pacify recent clang better
	* configure.ac: Clang now seems to have -Wformat-extra-args,
	-Wimplicit-const-int-float-conversion, and
	-Wtautological-constant-out-of-range-compare on by default,
	so disable them even if --enable-gcc-warnings is not used.
	Rely on Gnulib’s check for clang rather than rolling our own.

	maint: pacify clang -Winclude-next-absolute-path
	* gl/lib/xdectoint.c: Use #include <...> instead of #include "...".

	build: update gnulib submodule to latest

	ls: omit bad_cast
	* src/ls.c (decode_switches): Declare some local vars to be
	char const *, not char *, and omit unnecessary bad_cast calls.

	split: omit bad_cast
	* src/split.c (infile): Now char const *, not char *.
	(main): Omit unnecessary bad_cast calls.

2023-12-29  Pádraig Brady  <P@draigBrady.com>

	sort: fix thousands grouping handling on single byte locales
	* gl/lib/strnumcmp-in.h (numcompare): After commit v9.0-8-g6cafb122f,
	we need to treat characters as signed to avoid invalid comparisons
	between negative integers and unsigned characters.
	* NEWS: Mention the bug fix.

	tests: numfmt: fix test related to lower case 'k' SI unit
	* tests/misc/numfmt.pl: Following on from v9.4-86-g615167cc4,
	adjust this test accordingly.  This test was being skipped
	on some systems, and so only noticed now.
	Reported by Jim Meyering.

	tests: run locale tests on more systems
	* tests/misc/numfmt.pl: Determine the thousands grouping character
	in use, rather than skipping locale tests when it's not a space.
	For example fr_FR.UTF-8 uses "NARROW NO-BREAK SPACE" as the grouping
	char on modern glibc systems at least.
	* tests/sort/sort-h-thousands-sep.sh: Likewise.

	maint: distribute new header from previous commit
	* src/local.mk: Reference the new header, so it's distributed.

2023-12-27  Pádraig Brady  <P@draigBrady.com>

	maint: merge chgrp and chown sources
	chown is a close superset of chgrp functionality,
	so merge sources to avoid unwanted divergence in future.
	This removes about 300 lines in chgrp.c

	* build-aux/gen-single-binary.sh: Generate new rules for chgrp.
	* cfg.mk: Exclude new wrappers.
	* po/POTFILES.in: Remove chgrp.c
	* src/chgrp.c: Remove.
	* src/chown-chgrp.c: New wrapper.
	* src/chown-chown.c: Likewise.
	* src/chown.c (main): Prepend ':' for chgrp(1).
	* src/chown.h: Define both operating modes.
	(usage): Adjust depending on utility being called.
	* src/coreutils-chgrp.c: Likewise.
	* src/local.mk: Reference new wrappers.

2023-12-19  Christian Göttsche  <cgzones@googlemail.com>

	copy,install: avoid unnecessary security context translations
	Do not perform SELinux context translation for operations not involving
	user input or output.  Context translation converts MCS/MLS labels into
	human readable form, which is useful for user facing applications like
	ls(1) or the --context=CTX argument of cp(1).

	* src/copy.c (set_process_security_ctx): Use raw selinux variants.
	* src/install.c (need_copy): Likewise.
	(setdefaultfilecon): Likewise.
	* src/selinux.c (computecon): Likewise.
	(defaultcon): Likewise.
	* tests/cp/no-ctx.sh: Add raw variants to preload lib.
	* NEWS: Mention the improvement.

2023-12-19  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib to latest
	* gnulib: Primarily to get raw selinux wrappers

2023-12-17  Pádraig Brady  <P@draigBrady.com>

	maint: avoid false positive warning with newer gcc
	* src/pr.c (read_line): GCC 13.2.1 can't discern that CHARS
	is not used with '\n', so avoid the -Werror=maybe-uninitialized
	issue in dev builds.

	doc: cp --no-clobber: improve documentation
	* doc/coreutils.texi (cp invocation): Reference the related --update
	option, like we had already done in mv invocation.
	* src/cp.c (usage): State clearly what --no-clobber does,
	indicating it's protection focused, rather than being update focused.

2023-12-15  Pádraig Brady  <P@draigBrady.com>

	chgrp: add --from parameter similar to chown
	* doc/coreutils.texi (chown invocation): Convert --from option
	description to a macro and call from ...
	(chgrp description): ... here.
	* src/chown-core.h (emit_from_option_description): A new function
	refactored from ...
	* src/chown.c (usage): ... here, and called from ...
	* src/chgrp.c (usage): ... here.
	(main): Accept the --from option as chown(1) does.
	* po/POTFILES.in: Add chown-core.h as now translated.
	* tests/chown/basic.sh: Decouple the root user from id 0.
	* tests/chgrp/from.sh: A new test largely based on chown/basic.sh.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.
	Suggested by Ed Neville.

2023-12-11  Pádraig Brady  <P@draigBrady.com>

	maint: remove obsolete AC_PROG_GCC_TRADITIONAL
	* configure.ac: Remove obsolete macro call.
	Recent autoconf warns that it is obsolete.
	AC_PROG_CPP sets up the -traditional-cpp option if required.
	GCC ignores -traditional since commit f458d1d5 (2002).
	Fixes https://bugs.gnu.org/67756

2023-12-11  Pádraig Brady  <P@draigBrady.com>

	doc: ls: fix regression in -f description
	The description of -f regressed in coreutils 9.0

	* doc/coreutils.texi (ls invocation): Detail which options
	are enabled/disabled with -f.
	* src/ls.c (usage): Likewise.
	(decode_switches): Update comments.
	Fixes https://bugs.gnu.org/67765

2023-12-11  Pádraig Brady  <P@draigBrady.com>

	maint: add list/obstack.h to .gitignore
	Following recent gnulib update

2023-12-10  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* bootstrap: Copy from latest Gnulib,
	to fix --bootstrap-sync with other options.

2023-12-06  Pádraig Brady  <P@draigBrady.com>

	doc: touch: clarify --time description in man page
	* src/touch.c (usage): Reorganise the description to be similar to
	the format used for the ls --time description, which formats better
	when converted to a man page.  Also separate the description
	to allow for more granular translations.
	Fixes https://bugs.gnu.org/67656

2023-12-01  dann frazier  <dann.frazier@canonical.com>

	tail: fix tailing sysfs files where PAGE_SIZE > BUFSIZ
	* src/tail.c (file_lines): Ensure we use a buffer size >= PAGE_SIZE when
	searching backwards to avoid seeking within a file,
	which on sysfs files is accepted but also returns no data.
	* tests/tail/tail-sysfs.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/67490

2023-11-27  Pádraig Brady  <P@draigBrady.com>

	numfmt: support lowercase 'k' for Kilo and Kibi
	For consistency with the "SI" standard, and with other coreutils
	which output a lowercase 'k' in "SI" mode.

	* src/numfmt.c (suffix_power): Treat 'k' like 'K' on input.
	(double_to_human): Output lowercase 'k' in SI mode.
	(usage): Adjust accordingly.
	* doc/coreutils.texi: Mention 'k' accepted, and printed in SI mode.
	* tests/misc/numfmt.pl: Adjust accordingly.
	* NEWS: Mention the change in behavior.
	Fixes https://bugs.gnu.org/47103

2023-11-16  Paul Eggert  <eggert@cs.ucla.edu>

	uniq: fix bug with -w in multibyte locales
	-w counted bytes not characters, which is wrong in multibyte locales.
	This bug exists even in Fedora, which is why the recently-added
	test cases from Fedora didn’t catch it.
	* src/uniq.c (find_field): New arg PLEN.  All callers changed.
	Compute length of field correctly in multi-byte locales.
	(different): Don’t worry about check_chars; find_field now does that.
	* tests/uniq/uniq.pl: Test for this bug.

	tests: omit inapplicable test code
	* tests/misc/join.pl, tests/uniq/uniq.pl:
	Remove test for "invalid byte, character or field list" message
	that is not generated.

	uniq: change macro to function
	* src/uniq.c (swap_lines): New static function, replacing
	the old SWAP_LINES macro.  These days this is just as fast.
	All uses changed.

	uniq: prefer static init
	* src/uniq.c (skip_fields, skip_chars, check_chars, count_occurrences)
	(output_unique, output_first_repeated, output_later_repeated)
	(delimit_groups): Initialize statically, rather than in ‘main’.
	This shrinks the executable a bit.

	uniq: simplify and fix unlikely bug by using bool
	* src/uniq.c (enum countmode): Remove this type.
	(count_occurrences): New static var, replacing the old countmode,
	and of type boolean instead of a two-value enum type that was
	confusing (and which caused a hard-to-test bug when the count
	exceeded INTMAX_MAX - 1).  All uses changed.

2023-11-15  Paul Eggert  <eggert@cs.ucla.edu>

	uniq: prefer signed integers
	* src/uniq.c (skip_fields, skip_chars, check_chars, size_opt)
	(find_field, different, writeline, check_file, main):
	Prefer signed to unsigned integer types, since this allows
	for better runtime checking with -fsanitize=undefined.

	maint: DECIMAL_DIGIT_ACCUMULATE uses stdckdint.h
	* src/system.h: Include <stdckdint.h>, since the new
	DECIMAL_DIGIT_ACCUMULATE uses it.
	Do not include stdckdint.h from files that also include system.h.
	(DECIMAL_DIGIT_ACCUMULATE): Omit last arg, which is no longer needed.
	Reimplement by using C23-style stdckdint.h’s ckd_mul and ckd_add,
	as that’s more standard and is more likely to generate better code.

2023-11-11  Paul Eggert  <eggert@cs.ucla.edu>

	pinky: fix string size calculation
	* src/pinky.c (count_ampersands): Simplify and return idx_t.
	(create_fullname): Compute proper destination string size,
	basically, by adding (ulen - 1) * ampersands rather than ulen *
	(ampersands - 1).  Problem found on CHERI-64.

	maint: port randread to FreeBSD 14
	* gl/lib/randread.c (POINTER_IS_ALIGNED): Rename from
	ALIGNED_POINTER to avoid a collision with <machine/param.h>
	on FreeBSD 14.

	build: update gnulib submodule to latest

2023-11-03  Pádraig Brady  <P@draigBrady.com>

	ls: fix recent regression in size alignment
	* src/ls.c (print_long_format): Use correct column width,
	introduced due to a copy/paste error in commit v9.4-2-gcbb6dfec5
	* tests/ls/size-align.sh: Add a test.
	* tests/local.mk: Reference the new test.
	Fixes https://bugs.gnu.org/66919

2023-10-30  Paul Eggert  <eggert@cs.ucla.edu>

	join: fix recently introduced NUL bug
	* src/join.c (xfields): Simplify and fix bug with fields
	that start with a NUL byte when -t is not used.
	* tests/misc/join-utf8.sh: Also test when -t is not used,
	and when a field starts with NUL.

	maint: pacify ‘make syntax-check’
	* tests/misc/join-utf8.sh: Omit fail=0.
	Fix framework_failure_ typo.
	* tests/misc/join.pl: Change ` to '.

	maint: copy join, uniq tests from Fedora
	* tests/misc/join.pl, tests/uniq/uniq.pl:
	Copy from Fedora 39.  This adds more multi-byte tests.

	join,uniq: support multi-byte separators
	* NEWS: Mention this.
	* bootstrap.conf (gnulib_modules): Remove cu-ctype, as this module
	is now more trouble than it’s worth.  All uses removed.
	Add skipchars.
	* gl/lib/cu-ctype.c, gl/lib/cu-ctype.h, gl/modules/cu-ctype:
	Remove.
	* gl/lib/skipchars.c, gl/lib/skipchars.h, gl/modules/skipchars:
	* tests/misc/join-utf8.sh:
	New files.
	* src/join.c: Include skipchars.h and mcel.h instead of cu-ctype.h.
	(tab): Now mcel_t, not int.  All uses changed.
	(output_separator, output_seplen): New static vars.
	(eq_tab, newline_or_blank, comma_or_blank): New functions.
	(xfields, prfields, prjoin, add_field_list, main):
	Support multi-byte characters.
	* src/numfmt.c: Include ctype.h, skipchars.h.
	Do not include cu-ctype.h.
	(newline_or_blank): New function.
	(next_field): Support multi-byte characters.
	* src/sort.c: Include ctype.h instead of cu-ctype.h.
	(inittables): Open-code field_sep since it no longer exists.
	‘sort’ is not multi-byte safe yet, but when it is this code
	will need revamping anyway.
	* src/uniq.c: Include mcel.h and skipchars.h instead of cu-ctype.h.
	(newline_or_blank): New function.
	(find_field): Support multi-byte characters.
	* tests/local.mk (all_tests): Add tests/misc/join-utf8.sh

	test: allow non-blank white space in numbers
	* src/test.c (find_int): Use isspace, not isblank,
	for compatibility with how strtol works, which
	is how most other shells do this.

	stdbuf: port to oddball toupper
	* src/stdbuf.c: Do not include ctype.h.
	(set_libstdbuf_options): Use c_toupper, not toupper,
	since the C locale is intended here.

	dircolors: assume C-locale spaces
	* src/dircolors.c: Include c-ctype.h, not ctype.h.
	(parse_line): Use c_isspace, not isspace, as the .dircolors
	file format (which does not seem to be documented!) appears
	to be ASCII.

	maint: port to oddball tolower
	* src/digest.c (hex_equal): Work even in oddball locales
	where tolower does not work as expected on ASCII letters.

2023-10-30  Paul Eggert  <eggert@cs.ucla.edu>

	maint: include ctype.h selectively
	Include ctype.h only in files that need it.  Many of its uses
	are incorrect, as they assume single-byte locales.  The idea is
	to remove the incorrect uses later, when there is time.
	* src/chroot.c, src/csplit.c, src/dd.c, src/digest.c, src/dircolors.c:
	* src/expand-common.c, src/expand.c, src/fmt.c, src/fold.c, src/ls.c:
	* src/od.c, src/pinky.c, src/pr.c, src/ptx.c, src/seq.c:
	* src/set-fields.c, src/split.c, src/stdbuf.c, src/test.c:
	* src/tr.c, src/truncate.c, src/unexpand.c, src/wc.c:
	Include ctype.h.
	* src/system.h: Do not include ctype.h.

	include ctype.h.o

2023-10-30  Paul Eggert  <eggert@cs.ucla.edu>

	maint: move field_sep into separate module
	This is so that we don’t need to have every source file
	include ctype.h.
	* bootstrap.conf (gnulib_modules): Add cu-ctype.
	* gl/lib/cu-ctype.c, gl/lib/cu-ctype.h, gl/modules/cu-ctype:
	New files.
	* src/join.c, src/numfmt.c, src/sort.c, src/uniq.c:
	Include cu-ctype.h, for field_sep.
	* src/system.h (field_sep): Remove; now supplied by cu-ctype.

	digest: omit unnecessary b2sum includes
	* src/blake2/b2sum.c: Do not include string.h, errno.h,
	ctype.h, unistd.h, getopt.h.

	maint: prefer c_isxdigit when that is the intent
	* src/digest.c (valid_digits, split_3):
	* src/echo.c (main):
	* src/printf.c (print_esc):
	* src/ptx.c (unescape_string):
	* src/stat.c (print_it):
	When the code is supposed to support only POSIX-locale hex digits,
	use c_isxdigit rather than isxdigit.  Include c-ctype.h as needed.
	This defends against oddball locales where isxdigit != c_isxdigit.

2023-10-28  Pádraig Brady  <P@draigBrady.com>

	maint: fix syntax check issue
	* src/basenc.c: Fix preprocessor indentation.

2023-10-28  Pádraig Brady  <P@draigBrady.com>

	base32,base64: disallow non-canonical encodings
	This will make decoding more resilient to corruption
	whether due to transmission errors or nefarious adjustment.
	See https://eprint.iacr.org/2022/361.pdf

	* gnulib: Update to commit 3f463202bd enforcing canonical encoding.
	* tests/basenc/base64.pl: Add test cases, and adjust existing cases.
	* NEWS: Mention the change in behavior.

2023-10-25  Paul Eggert  <eggert@cs.ucla.edu>

	basenc: fix unlikely locale issue; tune
	This sped up ‘basenc -d --base16’ by 60% on my old platform,
	AMD Phenom II X4 910e, Fedora 38.
	* src/basenc.c (struct base16_decode_context): Simplify by
	omitting have_nibble.  ‘nibble’ is now negative if it’s missing.
	All uses changed.
	(B16): New macro, inspired by ../lib/base64.c.
	(base16_to_int): New static var, likewise.
	(isubase16): Reimplement using base16_to_int, since isxdigit is
	not guaranteed to succeed on the chars we want when the locale is
	oddball.
	(base16_decode_ctx): Tune by using base16_to_int and by

2023-10-25  Paul Eggert  <eggert@cs.ucla.edu>

	basenc: tweak checks to use unsigned char
	This tends to generate better code, at least on x86-64,
	because callers are just as fast and callees can avoid a conversion.
	* src/basenc.c: The following renamings also change the arg type
	from char to unsigned char.  All uses changed.
	(isubase): Rename from isbase.
	(isubase64url): Rename from isbase64url.
	(isubase32hex): Rename from isbase32hex.
	(isubase16): Rename from isbase16.
	(isuz85): Rename from isz85.
	(isubase2): Rename from isbase2.

	2023-10-24  Paul Eggert  <eggert@cs.ucla.edu>

	* src/basenc.c (struct base16_decode_context):
	Simplify by storing -1 for missing nibbles.  All uses changed.

2023-10-25  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2023-10-25  Pádraig Brady  <P@draigBrady.com>

	basenc: --base16: also allow lower case with --ignore-garbage
	* src/basenc.c (isbase16): Also return true for lower case.
	* tests/basenc/basenc.pl: Add a test case.
	Reported by Paul Eggert.

2023-10-23  Pádraig Brady  <P@draigBrady.com>

	basenc: --base16: support lower case hex digits
	* src/basenc.c (base16_decode_ctx): Convert to uppercase
	before converting from hex.
	* tests/basenc/basenc.pl: Add a test case.
	* NEWS: Mention the change in behavior.
	Addresses https://bugs.gnu.org/66698

	doc: fix RFC references
	* doc/coreutils.texi: Adjust RFC URLs as the original
	now give 404 errors.

2023-10-06  Pádraig Brady  <P@draigBrady.com>

	tests: move all basenc tests to their own directory
	* tests/misc/base64.pl: Move to tests/basenc/base64.pl
	* tests/misc/basenc.pl: Move to tests/basenc/basenc.pl
	* tests/local.mk: Adjust accordingly

2023-10-06  Pádraig Brady  <P@draigBrady.com>

	basenc: auto pad base32 and base64 inputs when decoding
	Padding of encoded data is useful in cases where
	base64 encoded data is concatenated / streamed.
	I.e. where there are padding chars _within_ the stream.
	In other cases padding is optional and can be inferred.
	Note we continue to treat partial padding as invalid,
	as that would be indicative of truncation.

	* src/basenc.c (do_decode): Auto pad the end of the input.
	* NEWS: Mention the change in behavior.
	* tests/misc/base64.pl: Adjust to not fail for missing padding.
	Addresses https://bugs.gnu.org/66265

2023-09-29  Paul Eggert  <eggert@cs.ucla.edu>

	sort: improve --help
	Problem reported by Jorge Stolfi (bug#66253).
	* src/sort.c (usage): Suggest looking at the manual for -n details.

2023-09-25  Pádraig Brady  <P@draigBrady.com>

	doc: rm --help: mention that '.' or '..' are rejected
	* src/rm.c (usage): State that '.' or '..' are rejected.

2023-09-24  Paul Eggert  <eggert@cs.ucla.edu>

	wc: pacify ‘make syntax-check’
	* src/wc_avx2.c (wc_lines_avx2): Explicitly make it ‘extern’.
	Not sure why this is needed.

	wc: distribute src/wc.h
	* src/local.mk (noinst_HEADERS): Add src/wc.h.

	wc: goto considered harmful
	* src/wc.c: Do not include assure.h.  Replace the only
	use of ‘assure’ with ‘unreachable’ which is good enough.
	(wc, main): Remove labels and gotos.  This doesn’t affect
	performance in any way I can measure, and makes the code
	a bit easier to follow.

	wc: prefer signed integers
	Prefer signed to unsigned integers, to make it easier to catch
	integer overflow errors.
	* src/wc.c: Do not include safe-read.
	(total_lines_overflow, total_words_overflow, total_chars_overflow)
	(total_bytes_overflow): Now bool, not uintmax_t.  All uses changed.
	(max_line_length): Now intmax_t, not uintmax_t.  All uses changed.
	The total_... vars are still uintmax_t because overflow into them
	is checked.
	(page_size): Now idx_t, not size_t.
	(wc_lines, wc, get_input_fstatus, compute_number_width, main):
	Prefer signed to unsigned ints where either should do.
	(wc_lines, wc): Use read rather than safe_read, since we don’t
	need safe_read’s checks for huge buffers.
	(wc): Redo call to mbrtoc32 to lessen the number of comparisons
	against its returned value.  Do this partly by keeping a pointer
	to the end of the buffer rather than a count.  Simplify
	overflow-checking code.
	(compute_number_width): Check for integer overflow.
	Don’t assume size_t fits into unsigned long.
	* src/wc.h (struct wc_lines): Prefer signed integers.
	* src/wc_avx2.c: Do not include safe-read.h.
	(wc_lines_avx2): Prefer signed integers.  Use read, not safe_read.

	wc: improve avx2 API
	* src/wc.c: Use "#include <...>" for files not in the current dir.
	Include "wc.h" instead of declaring wc_lines_avx2 by hand.
	(wc_lines): New API, with no file name (no longer needed) and
	with a return struct rather than arg pointers.  All uses changed.
	Use avx2_supported directly instead of using a function pointer.
	Exploit C99-style declarations after statements.
	Multiply by 15 rather than dividing; it’s faster and more accurate
	and cannot overflow here.
	(wc): Simplify based on wc_lines API change.
	* src/wc.h: New file.
	* src/wc_avx2.c: Include it, to check API better.
	(wc_lines_avx2): Use new API.  All uses changed.  Exploit C99.
	Make locals more local.

2023-09-23  Paul Eggert  <eggert@cs.ucla.edu>

	factor,tail: avoid quadratic reallocation
	* src/factor.c (struct mp_factors): New member nalloc.
	(mp_factor_init): Initialize it.
	* src/factor.c (mp_factor_insert):
	* src/tail.c (parse_options): Use xpalloc to avoid quadratic
	worst-case behavior on reallocation.
	* src/tail.c (pids_alloc): New static var.

	doc: mention Unicode exceptions for wc

	wc: simplify by removing SUPPORT_OLD_MBRTOWC
	* src/wc.c (SUPPORT_OLD_MBRTOWC): Remove.  All uses removed.
	(wc): Simplify by assuming C99-or-later behavior for mbrtoc32,
	which after all is a C11 API.  Fix the !SUPPORT_OLD_MBRTOWC
	code, which evidently was never tested seriously.

	wc: 3× speedup in C locale
	The 3× speedup was measured by invoking 'wc $(find * -type f)'
	on the coreutils sources etc. on an Ubuntu 23.04 x86-64.
	These changes also speed up wc 20% in UTF-8 locales.
	* src/wc.c (wc_isprint, wc_isspace): New static vars.
	(wc): Use them for speed.
	(main): Initialize them if needed.
	(isnbspace): Remove; no longer used.

	wc: treat encoding errors as non white space
	* src/wc.c (wc): Treat encoding errors like non white space
	characters.

	wc: fix word count bug
	* bootstrap.conf (gnulib_modules): Remove c32isprint.
	* src/wc.c (wc): Consider all non-white-space characters
	to be word constituents, even if they are not printable.
	POSIX requires this, and it is what BSD does.
	Partly do this by simplifying the check for a word,
	by counting word starts rather than word ends.
	* tests/wc/wc.pl: Test for the bug.

	maint: omit some unused function tests
	* m4/jm-macros.m4: Do not check for ftruncate, iswspace,
	mkfifo, mbrlen, sysctl.  Coreutils no longer uses the
	corresponding HAVE_* macros, typically because Gnulib
	handles them now.
	* src/wc.c (iswspace): Remove; unused.

	sort: not a special case for mbrtowc
	* configure.ac (GNULIB_MBRTOWC_SINGLE_THREAD): Define.

	maint: prefer char32_t to wchar_t
	This should work better on non-glibc platforms that don’t
	use Unicode for wchar_t.  However, POSIX appears to prohibit
	this for printf.c so leave that alone.
	* bootstrap.conf (gnulib_modules): Add btoc32, c32iscntrl,
	c32isprint, c32isspace, c32width, mbrtoc32.  Remove btoc, wcwidth.
	* src/df.c, src/ls.c, src/wc.c:
	Include uchar.h instead of wchar.h and wctype.h.
	* src/df.c (replace_invalid_chars):
	* src/ls.c (quote_name_buf):
	* src/wc.c (isnbspace, wc):
	Use char32_t instead of wchar_t.

	wc: simplify #if MB_LEN_MAX
	* src/wc.c: Don’t have special #ifs for platforms where
	MB_LEN_MAX is 1.  On these platforms, MB_CUR_MAX is 1 as well,
	so the compiler should optimize away all multi-byte code.

	wc: avoid undefined conversion state
	* src/wc.c (wc): When mbrtowc returns (size_t) -1, zero the
	conversion state, since POSIX says it’s undefined.

	maint: use mbszero
	* bootstrap.conf (gnulib_modules): Add mbszero.
	* src/df.c (replace_invalid_chars):
	* src/ls.c (quote_name_buf):
	* src/pathchk.c (portable_chars_only):
	* src/printf.c (STRTOX):
	* src/wc.c (wc):
	Prefer mbszero to clearing an mbstate_t by hand.

	maint: prefer mcel
	This causes Gnulib code to also use mcel, which is more consistent.
	* bootstrap.conf (avoided_gnulib_modules): Avoid mbuiter
	and mbuiterf, since we can now just use mcel.  This avoids
	the need to ship and compile mbchar and these modules.
	(gnulib_modules): Change mcel to mcel-prefer.

	wc: stop worrying about EBCDIC, shift-JIS, etc
	* src/wc.c: Do not include mbchar.h.
	(wc): Check for ASCII characters instead of using is_basic.
	Other parts of Gnulib and coreutils already assume the encoding
	is upward compatible with ASCII, and the old code wouldn’t
	have worked anyway with shift-JIS.

	expr: use mcel
	The mcel API is simpler and corresponds more closely to how
	Emacs etc. behave when the input has encoding errors,
	since it treats each encoding-error byte separately.
	* bootstrap.conf (gnulib_modules): Add mcel.
	* src/expr.c: Include mcel.h instead of mbuiter.h.
	(mbs_logical_cspn, mbs_logical_substr, mbs_offset_to_chars):
	Use mcel API.
	(mbs_logical_substr): Use ximemdup0 so as not to waste memory in
	the result, fixing a FIXME.

	build: update gnulib submodule to latest

2023-09-21  Pádraig Brady  <P@draigBrady.com>

	build: avoid build failures on gcc <= 10, or clang
	On gcc 10 the following build failure occurs:
	  "error: a label can only be part of a statement
	   and a declaration is not a statement"
	This is because the current code is non standards conforming,
	but GCC >= 11 will compile it (even with the -Wpedantic option).
	This issue is tracked for GCC at:
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111526

	* src/tail.c (parse_options): Avoid a declaration after label,
	by using a surrounding block.

2023-09-20  Stephen Kitt  <skitt@redhat.com>

	tail: allow multiple PIDs
	tail can watch multiple files, but currently only a single writer. It
	can be useful to watch files from multiple writers, or even processes
	not directly related to the files (e.g. watch log files written by a
	server process, for the duration of a test driven by a separate
	client).

	* src/tail.c (writers_are_dead): New function.
	(tail_forever): Use it to wait for writers.
	(tail_forever_inotify): As above.
	(parse_options): Manage --pid options in an array.
	* doc/coreutils.texi: Update documentation.
	* tests/tail/pid.sh: Add a variant with two PIDs.
	* News: Mention the new feature.

2023-09-17  Sylvestre Ledru  <sylvestre@debian.org>

	ls: --dired now implies long format with hyperlinks disabled
	Currently --dired is silently ignored
	with conflicting output formats

	* src/ls.c (decode_switches): Set default format and hyperlink mode
	when the --dired option is specified.
	* tests/ls/dired.sh: Check that formats are implied / overridden.
	* NEWS: Mention the change in behavior.
	* doc/coreutils.texi (ls invocation): Adjust --dired description.

2023-09-15  Sylvestre Ledru  <sylvestre@debian.org>

	tests: improve ls --dired testing
	* tests/ls/dired.sh: Verify ls --dired output against varying offsets.

2023-09-13  Pádraig Brady  <P@draigBrady.com>

	maint: use C99 int size specifiers rather than PRI.MAX defines
	Following on from commit v9.3-128-gf31229ebd
	replace all uses of the PRI.MAX portability defines
	with C99 size specifiers %z, %j, and %t.

2023-09-11  Pádraig Brady  <P@draigBrady.com>

	doc: add subsections for cksum nodes
	* doc/coreutils.texi: Specify each of the cksum nodes as a subsection,
	so that the docs are organised appropriately in the pdf and html manual.

2023-09-09  Paul Eggert  <eggert@cs.ucla.edu>

	cp,mv,install: add copy_internal comment
	* src/copy.c (copy_internal): Add comment about
	some particularly tricky logic.

	cp: avoid needless unlinkat after fstatat ELOOP
	* src/copy.c (copy_internal): When cp -f's fstatat fails on the
	destination with ELOOP, report an error immediately when fstatat
	used AT_SYMLINK_NOFOLLOW, as the later unlinkat would fail too.

	cp,mv,install: minor copy_internal refactoring
	* src/copy.c (copy_internal): Redo to avoid need for calculating
	fstatat_flags when not needed.  This is for clarity, not speed.

	cp,mv,install: fix comment punctuation
	* src/copy.h: Fix punctuation in comment.

	cp,mv,install: simplify copy_internal
	* src/copy.c (copy_internal): Simplify.

2023-09-05  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer psame_inode, PSAME_INODE, STP_*
	Prefer psame_inode, PSAME_INODE, STP_NBLOCKS, and STP_BLKSIZE,
	which take addresses of objects, to their counterparts that
	take the whole objects.  In some cases the whole objects might
	not be initialized, which would be undefined behavior strictly
	speaking.
	* gl/lib/root-dev-ino.h (ROOT_DEV_INO_CHECK):
	* src/cp-hash.c (src_to_dest_compare):
	* src/ls.c (dev_ino_compare):
	* src/pwd.c (robust_getcwd):
	Prefer PSAME_INODE to SAME_INODE.
	* src/chown-core.c (restricted_chown):
	* src/copy.c (copy_reg, same_file_ok, source_is_dst_backup)
	(copy_internal):
	* src/ln.c (do_link):
	* src/pwd.c (logical_getcwd):
	* src/sort.c (avoid_trashing_input):
	* src/split.c (create):
	* src/stat.c (find_bind_mount):
	Prefer psame_inode to SAME_INODE.
	* src/copy.c (infer_scantype):
	* src/du.c (process_file):
	* src/ls.c (gobble_file, print_long_format)
	(print_file_name_and_frills, length_of_file_name_and_frills):
	* src/stat.c (print_stat):
	Prefer STP_NBLOCKS to ST_NBLOCKS.
	* src/copy.c (copy_reg):
	* src/head.c (elide_tail_bytes_file, elide_tail_lines_file):
	* src/ioblksize.h (io_blksize):
	* src/od.c (skip):
	* src/shred.c (do_wipefd):
	* src/stat.c (print_stat):
	* src/tail.c (tail_bytes):
	* src/truncate.c (do_ftruncate):
	* src/wc.c (wc):
	Prefer STP_BLKSIZE to ST_BLKSIZE.
	* src/ioblksize.h (io_blksize):
	Arg is now struct stat const *, not struct stat.  All callers changed.

	build: update gnulib submodule to latest

	cp,mv,install: a bit more up-to-date source stat
	* src/copy.c (copy_reg): Replace caller’s source status
	with the more recent version.

2023-09-02  Paul Eggert  <eggert@cs.ucla.edu>

	cp,mv,install: fix chmod on Linux CIFS
	This bug occurs only when temporarily setting the mode to the
	intersection of old and new modes when changing ownership.
	* src/copy.c (owner_failure_ok): Treat EACCES like EPERM.

2023-09-01  Paul Eggert  <eggert@cs.ucla.edu>

	cp,mv,install: fix chown on Linux CIFS
	* src/copy.c (chown_failure_ok): Also treat EACCES as OK.

	maint: simplify set_owner
	* src/copy.c (HAVE_FCHOWN, fchown): Remove.
	(fchmod_or_lchmod): Move up.
	(fchown_or_lchown): New function.
	(set_owner): Use it to simplify.

	chown: port to mingw and MSVC 14
	* src/chown-core.c (restricted_chown): Don’t assume fchown exists.
	The Gnulib doc says that nowadays this is needed only for
	ports to mingw and MSVC 14, but it’s an easy port so let’s do it.

2023-08-31  Pádraig Brady  <P@draigBrady.com>

	maint: avoid syntax check failure
	* tests/misc/numfmt.pl: Keep lines <= 80 chars.

2023-08-31  Paul Eggert  <eggert@cs.ucla.edu>

	maint: Gnulib module gc
	Remove Gnulib modules that coreutils code no longer use directly.
	Some of these are used indirectly, but gnulib-tool should do that.
	* bootstrap.conf (gnulib_modules): Remove calloc-gnu, cloexec,
	getgroups, getpass-gnu, getugroups, getusershell, gnu-mae,
	group-member, lchown, mgetgroups, netinet_in, readlink,
	realloc-gnu, rename, rpmatch, stpncpy, tzset, wchar-single,
	wcswidth.

	maint: assume non-rare encodings
	* configure.ac (GNULIB_WCHAR_SINGLE_LOCALE): Define.
	This can improve performance, while dropping support for
	rare encodings on non-GNU platforms.  Nowadays these encodings
	are typically not worth the hassle.

	maint: tune for single thread & locale
	* configure.ac (GNULIB_EXCLUDE_SINGLE_THREAD)
	(GNULIB_REGEX_SINGLE_THREAD, GNULIB_WCHAR_SINGLE_LOCALE):
	Define.

	maint: regularize struct initializers
	* src/chmod.c (process_file):
	* src/df.c (replace_invalid_chars):
	* src/iopoll.c (iopoll_internal):
	* src/ls.c (quote_name_buf):
	* src/pathchk.c (portable_chars_only):
	* src/printf.c (STRTOX):
	* src/shred.c (main):
	* src/stat.c (neg_to_zero, do_stat):
	* src/timeout.c (settimeout):
	* src/tr.c (card_of_complement):
	* src/wc.c (wc):
	Prefer ‘{0}’ to initialize everything to zero.
	* src/stat.c (do_stat):
	* src/timeout.c (settimeout):
	Do not assume the usual order for struct members,
	as POSIX does not guarantee this.

	maint: rely on Gnulib fdatasync
	* m4/jm-macros.m4: Remove fdatasync-related code,
	as Gnulib now does this.
	* src/dd.c (fdatasync) [!HAVE_FDATASYNC]:
	* src/shred.c (dosync) [!HAVE_FDATASYNC]: Rely on Gnulib fdatasync.

	maint: use modern Gnulib LIB_ macros
	* src/local.mk (src_timeout_LDADD, src_dd_LDADD)
	(src_shred_LDADD, src_sync_LDADD): Use TIMER_TIME_LIB
	and FDATASYNC_LIB instead of LIB_TIMER_TIME and
	LIB_FDATASYNC.

	kill: rely on Gnulib strsignal
	Omit checks no longer needed now that we use strsignal.
	* configure.ac: Do not check for strsignal-related decls.
	* src/kill.c (sys_siglist, strsignal): Remove.

2023-08-30  Paul Eggert  <eggert@cs.ucla.edu>

	maint: remove rename macro
	* src/copy.h (rename) [RENAME_TRAILING_SLASH_BUG]:
	Remove: unused, now that Gnulib takes care of this.

	maint: remove need for mbsalign
	This simplifies memory allocation a bit, and removes an arbitrary
	limitation from numfmt, which formerly limited cell output to 127
	bytes.
	* bootstrap.conf (gnulib_modules): Remove mbsalign, strncat.
	Add strnlen (the code already used strnlen directly, and we were
	saved only because Gnulib used the module indirectly)
	* gl/lib/mbsalign.c, gl/lib/mbsalign.h, gl/modules/mbsalign:
	* gl/modules/mbsalign-tests, gl/tests/test-mbsalign.c: Remove.
	* src/df.c, src/ls.c: Do not include mbsalign.h.
	(MBSWIDTH_FLAGS): New constant, now used for all
	mbswidth calls.  All callers changed to check for -1 return.
	* src/df.c (struct field_data_t): ‘width’ is now int not size_t,
	since mbswidth can’t do widths greater than INT_MAX anyway.
	Replace ‘align’ with ‘align_right’.  All uses changed.
	(print_table): Redo to avoid the need for ambsalign.
	(get_header, get_dev): mbswidth returns int, not size_t.
	* src/ls.c (MAX_MON_WIDTH): Remove; no longer used.
	(abmon_init): Use strnlen to cheaply discard too-long month names.
	Align by hand instead of using mbsalign.
	* src/numfmt.c: Include stdckdint.h, mbswidth.h.
	Do not include mbsalign.h.
	(padding_buffer_size): Now idx_t.  All uses changed.
	(padding_width): Now intmax_t, since it’s no longer an object
	size.  Its sign now records alignment.  All uses changed.
	(zero_padding_width): Now int, since it’s given to sprintf.
	All uses changed.
	(padding_alignment): Remove; it’s now taken from padding_width’s sign.
	(double_to_human): Return string length.  BUF_SIZE arg is now idx_t.
	Include suffix in output.  All callers changed.  Simplify by not
	calling strncat or stpcpy.  Calculate fmt size bound more carefully.
	(setup_padding_buffer): Remove.  All uses removed.
	(parse_format_string): Use intmax_t, not long, for pad.
	On overflow, set widths to large values that cause later code
	to do the right thing, rather than separately checking for
	overflow here.
	(prepare_padded_number): Return bool, not int 0/1.  New arg
	PADDING.  All uses changed.  Do not limit padded output to 127
	bytes; instead, use xpalloc to expand the output buffer.
	(print_padded_number): New arg PADDING.  All uses changed.
	(process_suffixed_number): Simplify.
	(main): Take extremum if xstrtoimax overflows, as this does
	the right thing.
	* tests/misc/numfmt.pl: New test suf-20 to test for truncation bug.
	Remove tests pad-3.2, fmt-err-7, as they’re no longer invalid but
	are quite expensive.

2023-08-29  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.4
	* NEWS: Record release date.

2023-08-28  Paul Eggert  <eggert@cs.ucla.edu>

	maint: spelling fixes, including author names
	Most of this just affects commentary and documentations.  The only
	significant behavior change is translating author names via
	proper_name_lite rather than proper_name_utf8, or not translating
	them at all.  proper_name_lite is good enough for coreutils and
	avoids the bloat that had coreutils not using Gnulib proper_name.
	* bootstrap.conf (gnulib_modules): Use propername-lite instead
	of propername.
	(XGETTEXT_OPTIONS): Look for proper_name_lite instead of for
	proper_name_utf8.
	* cfg.mk (local-checks-to-skip): Remove
	sc_proper_name_utf8_requires_ICONV, since we no longer use
	proper_name_utf8.
	(old_NEWS_hash): Update.
	(sc_check-I18N-AUTHORS): Remove; no longer needed.

	test: omit unreachable code
	* src/test.c (unary_operator): Omit unreachable ‘return false;’.
	Oracle Solaris Studio 12.6 warns about it.

2023-08-28  Bruno Haible  <bruno@clisp.org>

	tests: avoid test failure on Android
	* gl/tests/test-mbsalign.c (main): Skip the unibyte truncation test
	on Android, when the "C" locale in fact is multibyte.

2023-08-28  Paul Eggert  <eggert@cs.ucla.edu>

	sort: port sort-merge-fdlimit test to Solaris 10
	* tests/sort/sort-merge-fdlimit.sh: Give 'sort' fd 6 too.
	Needed for the same reason sort-continue.sh needed a ulimit -n boost.

	sort: port sort-continue test back to Solaris 10
	* tests/sort/sort-continue.sh: Use ulimit -n 7 not -n 6.  On
	Solaris 10 'sort' uses Gnulib mkostemp, which calls Gnulib
	getrandom, which opens /dev/urandom to calculate the temp file's
	name, which means 'sort' needs one more file descriptor to work.

2023-08-27  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure on cygwin
	* tests/cksum/md5sum-bsd.sh: Avoid part of test dealing with backslashes
	in file names, on systems where backslash is a directory separator.
	Issue reported by Bruno Haible on cygwin.

2023-08-27  Pádraig Brady  <P@draigBrady.com>

	cksum: adjust tests and docs to binary mode handling
	Following commit v9.3-80-g5e1e0993b which makes cksum
	match the output of the standalone utilities...

	* doc/coreutils.texi (cksum output modes): Remove the mention
	that cksum never outputs a binary indicator, as that's no longer the
	case.
	* tests/cksum/b2sum.sh: Avoid outputting a binary indicator.
	* tests/cksum/sm3sum.pl: Likewise.

2023-08-27  Pádraig Brady  <P@draigBrady.com>

	all: avoid duplicated write errors on FreeBSD
	* src/system.h (write_error): Also call fpurge(), which was seen to
	be needed on FreeBSD 13.1 to avoid duplicated write errors.
	* src/head.c (xwrite_stdout): Likewise.
	* bootstrap.conf: Depend on fpurge.
	Reported by Bruno Haible.

	tests: avoid false failure where sleep is a shell builtin
	* tests/misc/usage_vs_getopt.sh: Handle sleep as a shell builtin,
	which was seen on Alpine Linux 3.18.

2023-08-27  Bruno Haible  <bruno@clisp.org>

	build: fix link errors of sort, split on CentOS 5 and Solaris 10
	* src/local.mk (src_sort_LDADD, src_split_LDADD): Add $(CLOCK_TIME_LIB).

	build: fix compilation error on AIX 7.1
	* src/copy.c (copy_internal): Don't test for ENOTEMPTY if it has the
	same value as EEXIST.

2023-08-27  Pádraig Brady  <P@draigBrady.com>

	build: update with gnulib fixes
	* gnulib: Update to incorporate gnulib fixes
	from Bruno Haible from his coreutils 9.4 pre-release testing.

2023-08-24  Pádraig Brady  <P@draigBrady.com>

	doc: remove older ChangeLog items
	* Makefile.am: Update the oldest documented version
	to 8.30 which is now about 5 years old.

2023-08-23  Pádraig Brady  <P@draigBrady.com>

	shred: fix operation on Solaris with 64 bit builds
	* NEWS: Mention the bug fix.
	* gl/lib/randread.c (get_nonce): Limit getrandom() <= 1024 bytes.

2023-08-22  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest

	doc: reorg texinfo for the checksumming utilities
	* doc/coreutils.texi: Reorg so that 'cksum invocation' is the
	main node listing all options and output formats, which is then
	referenced by the descriptions of the standalone utilities.
	Use macros in the description of the standalone utilities
	rather than referencing 'md5sum invocation' to be more direct.

2023-08-21  Pádraig Brady  <P@draigBrady.com>

	doc: cksum: remove -b description from texinfo
	* doc/coreutils.texi (cksum invocation): Following commit 5e1e0993
	also remove the desciption of the -b option for the cksum command.

	cp: with --sparse=never, avoid COW and copy offload
	* src/cp.c (main): Set default reflink mode appropriately
	with --sparse=never.
	* src/copy.c (infer_scantype): Add a comment to related code.
	* tests/cp/sparse-2.sh: Add a test case.
	* NEWS: Mention the bug.

2023-08-19  Pádraig Brady  <P@draigBrady.com>

	maint: comment spelling fix
	* tests/split/l-chunk-root.sh: Fix recently introduced typo.

2023-08-16  Pádraig Brady  <P@draigBrady.com>

	maint: remove extraneous line in NEWS
	* NEWS: Remove extraneous line.

2023-08-15  Bruno Haible  <bruno@clisp.org>

	uptime: simplify following gnulib changes
	* build-aux/gen-lists-of-programs.sh (build_if_possible_progs):
	Remove uptime.
	(normal_progs): Add uptime.
	* configure.ac: Remove GNULIB_BOOT_TIME invocation.
	* m4/boottime.m4: Remove file.
	* src/uptime.c: Don't include <sys/sysctl.h>, <OS.h>.
	(print_uptime): Don't call sysctl, get_system_info, as Gnulib's
	readutmp module now does this.

2023-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update uptime NEWS
	* NEWS: Update as per Bruno Haible <https://bugs.gnu.org/65255#14>.

2023-08-15  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure due to locale on alpine
	* tests/sort/sort-debug-keys.sh: Decimal point was seen to be '.'
	on fr_FR.UTF-8 on Alpine Linux 3.18, so add an extra guard
	to ensure we've a ',' as the decimal point on this locale.
	Fixes https://bugs.gnu.org/65310

2023-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	uptime: be more generous about read_utmp failure
	* src/uptime.c (print_uptime): Check for overflow
	when computing uptime.  Use C99-style decl after statements.
	Do not let an idx_t value go negative.
	(print_uptime, uptime): Be more generous about read_utmp failures,
	or when read_utmp does not report the boot time.  Instead of
	failing, warn but keep going, printing the information that we did
	get, and then exit with nonzero status.
	(print_uptime): Return the desired exit status.  Caller changed.

2023-08-15  Bruno Haible  <bruno@clisp.org>

	uptime: Include VM sleep time in the "up" duration
	* src/uptime.c: Don't include c-strtod.h.
	(print_uptime): Don't read /proc/uptime, because the value it provides
	does not change when a date adjustment occurs.
	* bootstrap.conf (gnulib_modules): Remove 'uptime'.

2023-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2023-08-15  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: fix typo in NEWS
	* NEWS: s|/who/log/wtmp|/var/log/tmp|, introduced in commit 85edb4afbd1.

2023-08-15  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: reference install(1) and cp(1) from each other
	* man/cp.x (SEE ALSO): Add install(1).
	* man/install.x (SEE ALSO): Add cp(1).

	Discussed at
	https://lists.gnu.org/r/coreutils/2023-08/msg00026.html

2023-08-14  Bruno Haible  <bruno@clisp.org>

	build: fix recent compilation error on GNU/Hurd
	* src/copy.c (set_author): Revert change from MACH_PORT_NULL to
	MACH_PORT_nullptr from commit 16b5ca6e (2023-06-29).

2023-08-14  Pádraig Brady  <P@draigBrady.com>

	maint: avoid syntax-check failure
	* po/POTFILES.in: Cater to lib/file-type.c adjustments
	as suggested by sc_po_check.

2023-08-14  Bruno Haible  <bruno@clisp.org>

	build: fix link errors with gcc < 4.8
	* configure.ac: Attempt to link, not only compile, the test programs
	with __builtin_cpu_supports, to avoid link errors with cksum and wc.

2023-08-13  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve NEWS discussion of systemd

	build: update gnulib submodule to latest

2023-08-12  Pádraig Brady  <P@draigBrady.com>

	maint: allow use of printf C99 integer size specifiers
	Older systems that had issues with these like HP-UX and Solaris 8
	are now obsolete, and can easily apply patches to provide support.
	Also we've used %td since coreutils 9.1, with no reported issues.

	* cfg.mk (sc_prohibit-c99-printf-format): Remove to allow use of
	%[jtz] size specifiers, which allows for cleaner code
	by avoiding the need to cast to PRI?MAX etc.

2023-08-11  Pádraig Brady  <P@draigBrady.com>

	doc: separate out description of 2038 time stamp change
	* NEWS: Separate out the description of the _existing_ issues
	with outputting timestamps on 32 bit systems, from _future_ issues
	outputting timestamps on all systems.  Also move this to the
	"improvement" section, since it's not really a coreutils
	specific issue, and also is a build time configurable option.

2023-08-11  Bruno Haible  <bruno@clisp.org>

	pinky,users,who: optimize read_utmp invocation
	When we are only interested in entries of type USER_PROCESS, tell
	read_utmp that it does not need to determine the boot time.

	* src/pinky.c (short_pinky): Pass option READ_UTMP_USER_PROCESS.
	* src/users.c (users): Likewise.
	* src/who.c (who): Likewise, if calling list_entries_who.

2023-08-09  Paul Eggert  <eggert@cs.ucla.edu>

	who: simplify based on readutmp changes
	* src/pinky.c (time_string, print_entry, scan_entries, short_pinky):
	* src/uptime.c (print_uptime, uptime):
	* src/users.c (list_entries_users, users):
	* src/who.c (UT_TYPE_RUN_LVL, UT_TYPE_INIT_PROCESS)
	(UT_TYPE_LOGIN_PROCESS, UT_TYPE_DEAD_PROCESS, UT_TYPE_NEW_TIME)
	(time_string, print_user, print_boottime)
	(make_id_equals_comment, print_deadprocs, print_login)
	(print_initspawn, print_clockchange, print_runlevel)
	(list_entries_who, scan_entries, who):
	Simplify, partly by using plain -> rather than macros.

	pinky,who: omit pragma
	* src/pinky.c, src/who.c:
	Omit no-longer-needed -Wstringop-overread pragma.

2023-08-09  Bruno Haible  <bruno@clisp.org>

	maint: Simplify after gnulib changed
	Update gnulib submodule to latest.
	All of UT_USER_SIZE, UT_ID_SIZE, UT_LINE_SIZE, UT_HOST_SIZE are now -1.

	* src/pinky.c (print_entry): Remove code for bounded-length ut_line,
	ut_user, ut_host.
	(scan_entries): Remove code for bounded-length ut_user.
	* src/who.c (print_line): Remove userlen, linelen arguments.
	(print_user): Remove code for bounded-length ut_line, ut_user, ut_host.
	(make_id_equals_comment): Remove code for bounded-length ut_id.
	(print_boottime, print_deadprocs, print_login, print_initspawn,
	print_clockchange, print_runlevel, print_heading): Update print_line
	invocations.
	(scan_entries): Remove code for bounded-length ut_line.

2023-08-04  Paul Eggert  <eggert@cs.ucla.edu>

	maint: Update after gnulib module 'readutmp' changed
	(This patch is coauthored with Bruno Haible,
	with original version at <https://bugs.gnu.org/64937#>.)
	This updates the gnulib submodule to latest.
	For year-2038 safety on Linux/{x86,arm},
	this adds an --enable-systemd option to ‘configure’.
	The idea is that this sort of thing will become the default
	after it has been tested more.
	* configure.ac: Don't test whether struct utmp and struct utmpx
	have the ut_host field; this is now done in gnulib's readutmp module.
	* src/local.mk: Link the programs 'pinky', 'uptime', 'users',
	'who' with $(READUTMP_LIB).
	* src/pinky.c, src/who.c:
	Test HAVE_STRUCT_XTMP_UT_HOST instead of HAVE_UT_HOST.
	* src/pinky.c (print_entry):
	* src/who.c (print_user, print_deadprocs, print_login)
	(print_initspawn, scan_entries):
	Support the situation where ut_line is a 'char *' rather than a
	'char[]' of fixed size.  Likewise for ut_user and ut_host.
	(make_id_equals_comment): Likewise for ut_id.
	* src/pinky.c (print_entry):
	* src/who.c (print_user):
	Open /dev to simplify looking up its entries.
	Don’t use printf if the output might in theory be longer than INT_MAX.
	* src/pinky.c (scan_entries, short_pinky):
	* src/uptime.c (print_uptime, uptime):
	* src/users.c (list_entries_users, users):
	* src/who.c (who):
	Use idx_t where new read_utmp needs it.
	* src/system.h (STREQ_LEN): Add comment that last arg can be -1.

2023-08-02  Paul Eggert  <eggert@cs.ucla.edu>

	uptime: fix Y5881633 bug
	* src/uptime.c (print_uptime): Prefer signed types.
	Fix unlikely bug on platforms with 32-bit long and 64-bit time_t
	if the idle time exceeds 2**31 days (about 6 million years...).

	pinky: fix "d" typo
	Problem reported by Bruno Haible (bug#65003).
	* src/pinky.c (idle_string): Fix recently-introduced typo:
	missing "d" for "days".

2023-08-01  Dragan Simic  <dsimic@manjaro.org>

	maint: minor comment cleanups
	* src/cut.c: Adjust a few comments slightly, simply to have their
	trailing whitespace the same as in the majority of the comments.

	cut: promptly diagnose write errors, continued
	* src/cut.c: Complete the error-handling improvements started in
	commit e0a4a60af5, by adding a couple of remaining checks for putchar().
	While there, sprinkle a few rather useful comments, and perform a few
	small code cleanups, to make the code and the comments more uniform
	and more conformant to the official coding style.  Also make the help
	message slightly more uniform.

	maint: reformat text width in HACKING
	* HACKING: Adjust line lengths.

2023-08-01  Pádraig Brady  <P@draigBrady.com>

	pinky: fix buffer size on 32 bit builds
	* src/pinky.c (idle_string): Use the correct buffer size
	following the recent int type adjustment.

	od: fix issues with recent format string changes
	* src/ioblksize.h: Avoid syntax check with redundant idx.h inclusion.
	* src/od.c (FMT_BYTES_ALLOCATED): Increase by two to avoid:
	  error: '%s' directive writing between 1 and 2 bytes into a region
	  of size between 1 and 4 [-Werror=format-overflow=]
	(maint): Use %td to print idx_t rather than invalid %jt format.

2023-08-01  Paul Eggert  <eggert@cs.ucla.edu>

	pinky: prefer signed types
	* src/pinky.c (idle_string): Prefer intmax_t to unsigned long int;
	this avoids an overflow on platforms where unsigned long is 32
	bits and time_t is 64 bits (the bug could occur on such a system
	that was idle for more than 6 million years, so it’s a bit
	hard to supply a test case...).

	pathchk: prefer signed types
	* src/pathchk.c (validate_file_name): Prefer signed types.

	numfmt: prefer signed types
	* src/numfmt.c (suffix_power_char, powerld, expld)
	(simple_strtod_int, double_to_human, prepare_padded_number)
	(process_suffixed_number): Prefer signed types.
	(process_suffixed_number): Fix an unlikely bug if an
	arg has exactly 2**32 spaces at the start.

	mktemp,seq: prefer signed types
	* src/mktemp.c (main):
	* src/seq.c (main): Prefer signed types.

	kill: prefer signed types
	* src/kill.c (list_signals):
	Prefer signed types.  This avoids undefined behavior on
	theoretical platforms where unsigned and signed int have
	different representations.

	groups,id: don’t assume gid_t fits in unsigned long
	* src/group-list.c (print_group): Convert to intmax_t or
	uintmax_t, not to unsigned long.

	dircolors,du,expr: prefer signed types
	* src/dircolors.c (dc_parse_stream):
	* src/du.c (max_depth, main):
	* src/expr.c (main):
	Prefer signed types.

	od: prefer signed types
	* src/od.c: Include stdckdint.h.
	(bytes_to_oct_digits, bytes_to_signed_dec_digits)
	(bytes_to_unsigned_dec_digits, bytes_to_hex_digits):
	Use ‘char’ for these small constants.
	(simple_strtoi): Rename from simple_strtoul.  Convert to int
	instead of unsigned long; that’s good enough.  All uses changed.
	Simplify by using ckd_mul and ckd_add to check for overflow.
	(main): Prefer signed types to unsigned.

	cksum,df,digest: prefer signed types
	* src/cksum.c (main):
	* src/df.c (decode_output_arg):
	* src/digest.c (valid_digits):
	Prefer idx_t to unsigned types when the value is an index
	into an array.

	join: prefer signed types
	* src/join.c (struct outlist, struct field, struct line)
	(struct seq, autocount_1, autocount_2, join_field_1, join_field_2)
	(extract_field, keycmp, check_order, init_linep, free_spareline)
	(getseq, delseq, prfield, prfields, prjoin, join, add_field)
	(string_to_join_field, decode_field_spec, add_field_list)
	(set_join_field, main):
	Prefer signed integers to unsigned.

	factor: prefer signed types
	When it’s easy, prefer signed types to unsigned, as
	they are less confusing and allow overflow checking.
	* src/factor.c (struct mp_factors, udiv_qrnnd)
	(count_leading_zeros, count_trailing_zeros)
	(factor_insert_multiplicity, mp_factor_clear, mp_factor_insert)
	(factor_insert_refind, factor_using_division)
	(mp_factor_using_division, powm2, millerrabin, millerrabin2)
	(mp_millerrabin, prime_p, prime2_p, mp_prime_p, isqrt, isqrt2)
	(invtab, q_freq, factor_using_squfof, strto2uintmax)
	(print_factors_single, main):
	Prefer signed integers to unsigned.

	maint: include idx.h everywhere
	* src/system.h: Include idx.h here, instead of in every file
	that currently uses idx_t.  This should make it easier to use
	idx_t in the future.

2023-07-31  Paul Eggert  <eggert@cs.ucla.edu>

	who: fix only-theoretical overflow
	Change stzncpy’s implementation to match its comment, in the case
	where SRC + LEN would overflow.  This case never happens in coreutils.
	* src/system.h (stzncpy): Work even if SRC + LEN would overflow.

2023-07-31  Pádraig Brady  <P@draigBrady.com>

	tac: handle short reads on input
	This can be reproduced by getting the read() above 2G,
	which induces a short read, thus triggering the erroneous failure.

	  $ truncate -s 5G 5G

	  $ cat 5G | TMPDIR=$PWD tac | wc -c
	  tac: /tmp/tacFt7txA: read error: Illegal seek
	  0

	With the fix in place we now get:

	  $ cat 5G | TMPDIR=$PWD src/tac | wc -c
	  5368709120

	* src/tac.c (tac_seekable): Use full_read() to handle short reads.
	* NEWS: Mention the bug fix.
	Reported at https://bugs.debian.org/1042546

2023-07-31  Bruno Haible  <bruno@clisp.org>

	uptime: output correct user count on OpenBSD
	* src/uptime.c (print_uptime, uptime): Always call read_utmp
	and count the result.
	* NEWS: Mention the fix (text by Bruno Haible).

2023-07-31  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2023-07-30  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* NEWS: Mention a bug that this fixes.

2023-07-22  Paul Eggert  <eggert@cs.ucla.edu>

	mv: better diagnostic for 'mv dir x' failure
	Problem reported by Nir Oren <https://bugs.gnu.org/64785>.
	* src/copy.c (copy_internal): Use a more-specific diagnostic when
	a rename fails due to a problem that must be due to the
	destination, avoiding user confusion in cases like 'mv dir x'
	where x is a nonempty directory.
	* tests/mv/dir2dir.sh: Adjust to match.

2023-07-20  Pádraig Brady  <P@draigBrady.com>

	doc: clarify tail -n/-c +NUM operation
	tail -n/-c +NUM, is different from tail -n/-c NUM,
	and head -n/-c NUM, and head -n/c -NUM, in that it
	specifies a 1 based index rather than a count to skip/include.
	So clarify this in tail --help and tail info manual.
	Note we also mention this gotcha at:
	https://www.pixelbeat.org/docs/coreutils-gotchas.html#tail

	* doc/coreutils.texi (tail invocation): Give examples for -c/-n +NUM,
	to make it clear one has to specify a number 1 larger than
	might be expected.
	* src/tail.c (usage): State the skip at start edge case more clearly
	in the -n description. -c is not often used with tail so we leave
	full explanation of that to the info manual.  Also split the string
	to simplify translation.

2023-07-18  Pádraig Brady  <P@draigBrady.com>

	maint: add a syntax check to prevent use of NULL
	* cfg.mk (sc_prohibit_NULL): Direct to use nullptr instead.

	tests: split: provide more isolated /tmp handling
	* tests/split/l-chunk.sh: Move the "expensive" portion to ...
	* tests/split/l-chunk-root.sh: .. A new test split from l-chunk.sh
	which uses an isolated TMPDIR, rather than exhausting /tmp,
	as that gives false positive failures with some other coreutils tests
	like tac-2-nonseekable.sh and shuf-reservoir.sh at least.
	* tests/local.mk: Reference the new test.

	split: honor $TMPDIR for temp files
	* bootstrap.conf: Depend on tmpdir rather than tmpfile,
	as the standard tmpfile() doesn't honor $TMPDIR.
	* src/split.c (copy_to_tmpfile): Adjust to call temp_stream() rather
	than tmpfile();
	* NEWS: Mention the improvement.

2023-07-18  Pádraig Brady  <P@draigBrady.com>

	tac: fall back to /tmp if $TMPDIR is unavailable
	This also refactors temp_stream() to its own module,
	in preparation for use by split.

	* src/tac.c: Refactor temp_stream() out to ...
	* src/temp-stream.c: ... A new module mostly refactored from tac,
	but uses tmpdir to more robustly support $TMPDIR,
	while falling back to /tmp if not available.
	* src/temp-stream.h: The new module interface.
	* src/local.mk: Reference the new module from tac.
	* tests/tac/tac.pl: Adjust to non failing missing $TMPDIR.
	* po/POTFILES.in: Reference the new module with translatable strings.
	* NEWS: Mention the user visible improvements to tac TMPDIR handling.

2023-07-18  Pádraig Brady  <P@draigBrady.com>

	maint: add syntax check to ensure safe mkstemp usage
	One needs to include stdlib--.h if using mkstemp()
	lest one hits esoteric bugs with closed stdin etc.

	* cfg.mk (sc_require_stdlib_safer): Add a new syntax check.
	(sc_require_stdio_safer): Fix this; broken since commit fa7ed969c3.

2023-07-17  Pádraig Brady  <P@draigBrady.com>

	join: promptly diagnose write errors
	* src/join.c (prjoin): Check for write errors after each line.
	* tests/misc/write-errors.sh: enable the test for join.
	* NEWS: Mention the improvement.

	comm: promptly diagnose write errors
	* src/comm.c (writeline): Simplify by removing the unneeded STREAM
	parameter.  Call write_error() upon ferror().
	(compare_files): Adjust to simplified writeline().
	* tests/misc/write-errors.sh: Enable comm test.
	* NEWS: Mention the improvement.

	cut: promptly diagnose write errors
	* src/cut.c (cut_bytes): Diagnose errors from fwrite() and putchar().
	(cut_fields): Likewise.
	* tests/misc/write-errors.sh: Enable the test for cut,
	and augment to cover both cut_bytes() and cut_fields().
	* NEWS: Mention the improvement.

	uniq: promptly diagnose write errors
	* src/uniq.c (write_line): Check the output from fwrite() immediately.
	(check_file): Likewise.
	* tests/misc/write-errors.sh: Enable the test case.
	* NEWS: Mention the improvement.

	od: promptly diagnose write errors
	* src/od.c (dump): Check for write errors after each block written,
	to exit early even with large / unbounded inputs.
	* tests/misc/write-errors.sh: enable od check.
	* NEWS: Mention the improvement.
	Fixes https://bugs.gnu.org/64540

	all: avoid repeated diagnostic upon write error
	* cfg.mk (sc_some_programs_must_avoid_exit_failure): Adjust to
	avoid false positive.
	(sc_prohibit_exit_write_error): A new syntax check to prohibit
	open coding error(..., "write error"); instead directing to use...
	* src/system.h (write_error): ... a new function to clear stdout errors
	before we explicitly diagnose a write error and exit.
	* src/basenc.c: Use write_error() to ensure no repeated diagnostics.
	* src/cat.c: Likewise.
	* src/expand.c: Likewise.
	* src/factor.c: Likewise.
	* src/paste.c: Likewise.
	* src/seq.c: Likewise.
	* src/shuf.c: Likewise.
	* src/split.c: Likewise.
	* src/tail.c: Likewise.
	* src/tr.c: Likewise.
	* src/unexpand.c: Likewise.
	* tests/misc/write-errors.sh: Remove TODOs for the fixed utilities:
	expand, factor, paste, shuf, tr, unexpand.

	tests: ensure utilties exit promptly upon write error
	* tests/local.mk: Reference the new test.
	* tests/misc/write-errors.sh: A new test to ensure utilities
	exit promptly upon writing to /dev/full.

2023-07-14  Jim Meyering  <meyering@meta.com>

	cksum: improve problematic_chars function
	* src/digest.c (problematic_chars): Implement using strcspn,
	and traversing S only once, rather than once per escaped byte.

2023-07-12  Pádraig Brady  <P@draigBrady.com>

	maint: give a new function the "pure" attribute
	* src/digest.c (problematic_chars): This recently introduced
	function does not modify state so is pure, even though GCC 13.1 at least
	did not warn about that attribute being appropriate.

2023-07-11  Pádraig Brady  <P@draigBrady.com>

	cksum: escape filenames with a leading '\' in --check status
	* src/digest.c (digest_check): Also escape in the case that the
	file name contains '\'.
	* tests/cksum/md5sum-bsd.sh: Add a test case.
	* doc/coreutils.texi (md5um invocation): Clarify escaping operation.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/64392

2023-07-09  Pádraig Brady  <P@draigBrady.com>

	cksum: support transparent emulation of older utils
	Support -b, --binary, and -t, --text
	to allow full emulation of older utilities with:
	  exec cksum -a $algo --untagged "$@"
	Note this would diverge from OpenBSD's support of cksum -b.

	* src/digest.c: Change -b to mean --binary, not --base64 in all cases.
	Accept -b and -t in all cases.  Keep --binary and --text undocumented
	for cksum.
	* tests/cksum/cksum-base64.pl: s/-b/--base64/.
	* tests/cksum/cksum-a.sh: Ensure cksum supports -b and -t appropriately.
	* NEWS: Mention the change in behavior.

2023-07-08  Pádraig Brady  <P@draigBrady.com>

	maint: avoid static analysis failure for ignored dup2 return
	* src/sort.c: We're ignoring failures from these calls,
	so do so explicitly to avoid static analysis issues
	as reported by coverity.

2023-07-04  Sylvestre Ledru  <sylvestre@debian.org>

	tests: mktemp -t: $TMPDIR has higher priority than -p
	* tests/misc/mktemp.pl: Ensure that with -t,
	$TMPDIR has precedence over -p.

2023-07-01  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update .gitignore
	Add some newly-created Gnulib files,
	plus some bootstrap temporaries.

	stty: fix untranslated diagnostics
	* src/stty.c (set_speed): Translate diagnostics.

	maint: sync bootstrap from Gnulib
	* bootstrap: Copy from gnulib/build-aux/bootstrap.

	maint: prefer ckd_add to INT_ADD_WRAPV etc
	* bootstrap.conf (gnulib_modules): Add stdckdint.
	Also, in C source code, prefer C23 macros like ckd_add
	to their Gnulib near-equivalents like INT_ADD_WRAPV.
	Include <stdckdint.h> as needed.

	who: don’t crash if clock gyrates
	* src/who.c (idle_string): Avoid signed integer overflow
	if the superuser messes with the clock in bizarre ways.
	Remove an ‘assume’ that wasn’t correct under this scenario.

	df: omit GCC 5 ‘assume’s
	* src/df.c (main):
	* src/shred.c (dopass):
	Omit ‘assumes’ needed to pacify GCC 5 but not needed with GCC 13.

	maint: pacify GCC bug#109613 better
	* src/cut.c (cut_file):
	* src/nl.c (nl_file): Pacify GCC Bug#109613 in a better way, by
	narrowing the coverage of the ‘assume’ so that bugs in the
	no-longer-covered part are not masked.

	maint: stop pacifying Parfait
	* src/fmt.c (get_paragraph):
	* src/stty.c (display_changed, display_all): Omit calls to
	‘assume’ that are present only to pacify false positives by Parfait
	<https://labs.oracle.com/pls/apex/f?p=94065:12:17236785746387:13>,
	which went in-house in 2012 and never came back.

	build: update gnulib submodule to latest

	maint: go back to using ‘error’
	Now that Gnulib’s ‘error’ module does proper static checking
	for not returning, we need no longer use the ‘die’ macro.
	This makes code easier to read for people that are used to ‘error’.
	* cfg.mk (error_fns, exclude_file_name_regexp): Remove ‘die’.
	(sc_die_EXIT_FAILURE): Remove.
	* src/die.h: Remove.  All includes removed.  All calls to ‘die’
	changed back to calls to ‘error’.
	* src/install.c (get_ids): Use quoteaf (problem found with
	make syntax-check).
	* src/system.h: Include error.h, since some of our macros call ‘error’.
	Stop including error.h elsewhere.

	maint: improve static and dynamic checking
	This modernizes the source code somewhat, to take advantage
	of advances in GCC over the years, and Gnulib’s ‘assure’ module.
	Include assure.h in files that now need it.
	Do not include assert.h directly; it’s no longer needed.
	* bootstrap.conf (gnulib_modules): Add ‘assure’.
	* gl/lib/randread.c (randread_error):
	* src/chmod.c (describe_change):
	* src/chown-core.c (describe_change):
	* src/cp.c (decode_preserve_arg):
	* src/head.c (diagnose_copy_fd_failure):
	* src/ls.c (parse_ls_color):
	* src/od.c (decode_one_format):
	* src/split.c (main):
	* src/test.c (binary_operator, posixtest):
	Prefer affirm to abort, since it has better diagnostics in the
	normal case and better performance with -DNDEBUG.
	* gl/lib/xdectoint.c, src/die.h: Include stddef.h, for unreachable.
	* gl/lib/xdectoint.c: Do not include verify.h; no longer needed.
	* gl/lib/xdectoint.c (__xnumtoint):
	* src/die.h (die):
	Prefer C23 unreachable () to assume (false).
	* gl/lib/xfts.c (xfts_open):
	* src/basenc.c (base32hex_encode):
	* src/copy.c (abandon_move, copy_internal, valid_options):
	* src/cut.c (cut_fields):
	* src/df.c (alloc_field, decode_output_arg, get_dev):
	* src/du.c (process_file, main):
	* src/echo.c (usage):
	* src/factor.c (udiv_qrnnd, mod2, gcd2_odd, factor_insert_large)
	(mulredc2, factor_using_pollard_rho, isqrt2, div_smallq)
	(factor_using_squfof):
	* src/iopoll.c (iopoll_internal, fwrite_wait):
	* src/join.c (add_field):
	* src/ls.c (dev_ino_pop, main, gobble_file, sort_files):
	* src/mv.c (do_move):
	* src/od.c (decode_format_string, read_block, dump, main):
	* src/remove.c (rm):
	* src/rm.c (main):
	* src/sort.c (stream_open):
	* src/split.c (next_file_name, lines_chunk_split):
	* src/stdbuf.c (main):
	* src/stty.c (set_speed):
	* src/tac-pipe.c (line_ptr_decrement, line_ptr_increment):
	* src/touch.c (touch):
	* src/tr.c (find_bracketed_repeat, get_next)
	(validate_case_classes, get_spec_stats, string2_extend, main):
	* src/tsort.c (search_item, tsort):
	* src/wc.c (main):
	Prefer affirm to assert, as it allows for better static
	checking when compiling with -DNDEBUG.
	* src/chown-core.c (change_file_owner):
	* src/df.c (get_field_list):
	* src/expr.c (printv, null, tostring, toarith, eval2):
	* src/ls.c (time_type_to_statx, calc_req_mask, get_funky_string)
	(print_long_format):
	* src/numfmt.c (simple_strtod_fatal):
	* src/od.c (decode_one_format):
	* src/stty.c (mode_type_flag):
	* src/tail.c (xlseek):
	* src/tr.c (is_char_class_member, get_next, get_spec_stats)
	(string2_extend):
	Prefer unreachable () to abort () or assert (false) when merely
	pacifying the compiler, e.g., in a switch statement on an enum
	where all cases are covered.
	* src/copy.c (valid_options): Now returns void; the bool was useless.
	Caller no longer needs to assert.
	* src/csplit.c (find_line):
	* src/expand-common.c (next_file):
	* src/shred.c (incname):
	* src/sort.c (main):
	* src/tr.c (append_normal_char, append_range, append_char_class)
	(append_repeated_char, append_equiv_class):
	* src/tsort.c (search_item):
	Omit assert, since the hardware will check for us.
	* src/df.c (header_mode): Now the enum type it should have been.
	* src/du.c (process_file):
	* src/ls.c (assert_matching_dev_ino):
	* src/tail.c (valid_file_spec):
	* src/tr.c (validate_case_classes):
	Mark defns with MAYBE_UNUSED if they’re not used when -DNDEBUG.
	* src/factor.c (prime_p, prime2_p, mp_prime_p): Now ATTRIBUTE_PURE.
	Prefer affirm to error+abort.  No need to translate this diagnostic.
	* src/fmt.c (get_paragraph):
	* src/stty.c (display_changed, display_all, sane_mode):
	* src/who.c (idle_string):
	Prefer assume to assert, since the goal is merely pacification
	and assert doesn’t pacify anyway if -DNDEBUG is used.
	* src/join.c (decode_field_spec):
	Omit unreachable abort.
	* src/ls.c (assert_matching_dev_ino, main):
	* src/tr.c (get_next):
	Prefer assure to assert, since the check is relatively expensive
	and won’t help static analysis.
	* src/ls.c (main):
	Prefer static_assert to assert of a constant expression.
	(format_inode): Redo to make it clear that buflen doesn’t matter,
	and that buf must have a certain number of bytes.  All callers changed.
	This pacifies -Wformat-overflow.
	* src/od.c (decode_one_format):
	Omit an assert that tested for obviously undefined behavior,
	as the compiler could optimize it away anyway.
	* src/od.c (decode_one_format, decode_format_string):
	Prefer ATTRIBUTE_NONNULL to runtime checking.
	* src/stat.c: Do not include <stddef.h> since system.h does that now.
	* src/sync.c (sync_arg):
	Prefer unreachable () to assert (true), which was a typo.
	* src/system.h: Include stddef.h, for unreachable.
	* src/tail.c (xlseek): Simplify by relying on ‘error’ to exit.

	maint: fix indenting in previous change
	* src/ptx.c: Adjust to fit into 80 columns.

2023-06-29  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer C23-style nullptr
	* bootstrap.conf (gnulib_modules): Add nullptr.
	In code, prefer nullptr to NULL where either will do.

2023-06-22  Bruno Haible  <bruno@clisp.org>

	build: ensure that makeinfo ≥ 6.8 checks the @menu structure
	See <https://lists.gnu.org/r/bug-texinfo/2023-06/msg00015.html>.

	* doc/local.mk (MAKEINFO): New variable.
	* cfg.mk (_makefile_at_at_check_exceptions): Update.

2023-06-22  Pádraig Brady  <P@draigBrady.com>

	b2sum: fix UAR with --check with malformed checksum lines
	* src/digest.c (split_3): Reinstate the check for whitespace after the
	digest portion of the line, so that we exit early before inspecting
	the file name which would be outside the passed buffer in the case
	where the input does not contain a newline.
	* tests/cksum/b2sum.sh: Add a test case.
	* NEWS: Mention the bug fix.
	* THANKS.in: Add Frank Busse who has reported multiple bugs using KLEE.
	Fixes https://bugs.gnu.org/64229

2023-06-21  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update GCC bug number in comment

2023-06-20  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention fix for bug#64123

	build: update gnulib submodule to latest

2023-06-19  Sylvestre Ledru  <sylvestre@debian.org>

	tests: move tests to a directory per utility
	* cfg.mk: Adjust syntax check exclusion paths.
	* tests/local.mk: Adjust for renamed tests.

2023-06-15  Pádraig Brady  <P@draigBrady.com>

	doc: mention cksum error fix with cpu feature checks changes
	* NEWS: Mention the error message to aid those searching
	for solutions to the issue, and mention cksum also
	as that was confirmed to fix the error with the adjusted
	cpu feature detection, as discussed at https://bugs.debian.org/1037264
	* src/cksum.c: Cleanup syntax-check failure from previous commit.

2023-06-14  Paul Eggert  <eggert@cs.ucla.edu>

	cksum,wc: clean up hw capability checking
	* src/cksum.c (cksum_pclmul) [!CRCTAB && !USE_PCLMUL_CRC32]:
	Remove macro.
	(cksum_fp): No longer file-scope.
	(pclmul_supported): Define only if USE_PCLMUL_CRC32.
	This omits the debug output "using generic hardware support"
	for simplicity and consistency with wc’s output.
	(crc_sum_stream) [!USE_PCLMUL_32]: No need for static function pointer.
	* src/wc.c (wc_lines_p) [USE_AVX2_WC_LINECOUNT]: No longer file-scope.
	(wc) [USE_AVX2_WC_LINECOUNT]: Check for avx2 support at most once,
	which was surely the code’s original intent.
	(wc) [!USE_AVX2_WC_LINECOUNT]: No need for static function pointer.

	cksum,wc: don’t include <cpuid.h>
	* src/cksum.c [!CRCTAB && USE_PCLMUL_CRC32]:
	* src/wc.c [USE_AVX2_WC_LINECOUNT]:
	Don’t include <cpuid.h>; no longer needed.

	cksum: fix bug in check for cksum_pclmul
	This fixes a typo in the previous patch.
	Problem reported by Pádraig Brady <https://bugs.gnu.org/64058#11>.
	* src/cksum.c (pclmul_supported): Also require AVX support
	to use cksum_pclmul.

	wc: port to kernels that disable XSAVE YMM
	Problem reported by Dave Hansen <https://bugs.gnu.org/64058>.
	Apply similar change to cksum and pclmul, too.
	* NEWS: Mention wc fix.
	* configure.ac (cpuid_exists, get_cpuid_count_exists):
	Remove.  All uses removed, since we no longer use __get_cpuid or
	__get_cpuid_count.
	(pclmul_intrinsic_exists, avx2_intrinsic_exists): Set to no if
	__builtin_cpu_supports calls cannot be compiled.
	(HAVE_PCLMUL_INTRINSIC, HAVE_AVX2_INTRINSIC): Remove; unused.
	Simplify surrounding code because of this.
	* src/cksum.c (pclmul_supported):
	* src/wc.c (avx2_supported):
	Use __builtin_cpu_supports instead of doing it by hand.
	Simplify surrounding code because of this.

2023-06-12  Ville Skyttä  <ville.skytta@iki.fi>

	dircolors: update list of backup file extensions
	* src/dircolors.hin: Sort backup section by extension.
	Treat .dpkg-new and .dpkg-tmp as backup files.
	Treat .crdownload (Chromium based browsers' partial download)
	as a backup file.

2023-06-11  Pádraig Brady  <P@draigBrady.com>

	dd: fix parsing of numbers with more than two multipliers
	* src/dd.c (parse_integer): Use recursion to support more than two
	multipliers.  Also protect suffix[-1] access to ensure we don't
	inspect before the passed string.
	* tests/dd/bytes.sh: Add test cases.
	* doc/coreutils.texi (dd invocation): Note the support for specifying
	many multipliers in a number.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.debian.org/1037275

2023-06-09  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest.
	* po/POTFILES.in: Remove recent sc_po_check workaround.
	* tests/misc/date-debug.sh: Adjust as per spelling fix.

2023-06-08  Pádraig Brady  <P@draigBrady.com>

	doc: od --strings: clarify operation
	* doc/coreutils.texi (od invocation): Remove mention of ASCII,
	as all printable characters in unibyte locales are output.
	* src/od.c (usage): Clarify that only NUL terminated strings
	are displayed, and that it's printable chars, not only graphic chars
	that are output. I.e., spaces are output also if part of the string.
	Reported at https://bugs.ddebian.org/1037217

2023-06-07  Pádraig Brady  <P@draigBrady.com>

	maint: ls.c: update stale comment for previous commit
	* src/ls.c (gobble_file): Update comment to correspond with
	the changes in the previous commit.

	ls: display command line symlinks that return ELOOP
	* src/ls.c (gobble_file): Ensure we lstat() a symlink
	specified on the command line, if we receive ELOOP from stat().
	* tests/ls/symlink-loop.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/63931

	ls: use more standard symlink traversal
	* src/ls.c (gobble_file): stat() symlinks directly,
	rather than their targets.  This will be more consistent
	with how symlinks are generally accessed.
	(make_link_name): Remove no longer used function.
	Addresses https://bugs.gnu.org/63931

	doc: reference COPYING from README
	* README: Reference COPYING as per the GNU coding standards,
	and soon to be enforced with a syntax-check from gnulib.

2023-06-06  Pádraig Brady  <P@draigBrady.com>

	maint: avoid syntax-check failure
	* po/POTFILES.in: Add lib/propername.h due to new comments
	that trigger sc_po_check.

	doc: NEWS: mention the more defensive copy_file_range avoidance
	* NEWS: Mention the improvement in reinstating runtime avoidance
	of copy_file_range(), that came with the last gnulib update,
	picking up gnulib commit fb034b35.

2023-06-06  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2023-06-01  Pádraig Brady  <P@draigBrady.com>

	maint: use consistent make variable interpolation syntax
	* cfg.mk: Prefer $() interpolation over ${}
	lest the reader is confused as to whether shell interpolation,
	i.e. $${} was intended.

2023-05-31  Pádraig Brady  <P@draigBrady.com>

	split: --additional-suffix: disallow trailing '/'
	Note mktemp --suffix has the same inconsistency,
	but mktemp -d does support creating dirs
	so probably best to leave that as is.

	* src/split.c (main): Check for trailing /.
	* tests/split/additional-suffix.sh: Augment the test.
	Reported in https://bugs.debian.org/1036827

2023-05-31  Pádraig Brady  <P@draigBrady.com>

	maint: adjust code to handle "error" syntax-check changes
	* src/dd.c: Don't include no longer used error.h.
	Use quoteaf() rather than quote() to quote appropriate for the shell
	and to avoid the syntax-check failure,
	* src/stty.c: Use quoteaf() rather than quotef()
	to have more consistent quoting of the invalid arg.

	maint: augment syntax checks to cater for more "error" functions
	src/cfg.mk (sc_error_quotes, sc_error_shell_quotes,
	sc_error_shell_always_quotes): Include "die" and "diagnose"
	in the class of error functions to check arguments for.

2023-05-30  Paul Eggert  <eggert@cs.ucla.edu>

	dd: fix ‘error’ name issue without macros
	* src/dd.c (_GL_NO_INLINE_ERROR): Remove; no longer needed.
	(diagnose): Rename from nl_error and omit first arg since it is
	always zero.  All uses changed.
	(error): Remove macro.

2023-05-28  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest.
	* src/dd.c: Avoid error macro redefinition.

2023-05-19  Pádraig Brady  <P@draigBrady.com>

	build: modernize bootstrap prerequsite tools
	Following on from commit v9.0-15-gaa31b919c
	which updated README-prereq...

	* bootstrap.conf: Add an explicit requirement on m4.
	Add an explicit requirement on texi2pdf which is often
	packaged separately to makeinfo and induces a failure
	far down the distribution phase if not present.
	Replace the rsync dependency with wget,
	which gnulib changed to in 2018.

2023-05-19  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest.
	* configure.ac: Remove gnulib reference, as that specific issue
	is now explicitly avoided in gnulib itself.

	build: pacify GCC 13 with -flto
	* src/cut.c (cut_file): Explicitly mark STREAM as nonnull to avoid
	-Werror=null-dereference.
	* src/nl.c (nl_file): Likewise.

	build: revert -Wmaybe-uninitialized warnings avoidance
	This reverts commit 800c86d5, as that was deemed too invasive.
	We do keep the change to tee.c to allow using -O3 without warnings.
	For other optimization options like -O0, -Og, -O1, -Os,
	one can use WERROR_CFLAGS= to stop warnings inducing a build failure.

2023-05-18  Pádraig Brady  <P@draigBrady.com>

	build: avoid false -Wmaybe-uninitialized warnings
	Allow easily building a debug build for example with:
	  make CFLAGS='-O0 -ggdb'

	False -Wmaybe-uninitialized warnings hit in different
	places depending on the compiler passes used.
	These changes were tested with gcc 10.2.1, 12.2.1, and 13.1.1 like:
	  for o in g s z fast 0 1 2 3; do
	    make clean && make -j$(nproc) CFLAGS="-O$o" || break
	  done

	* src/digest.c: Disable -Wmaybe-uninitialized that gives
	false positive here at -O0.
	* src/ln.c: Avoid -Wmaybe-uninitialized that gives
	false positive here at -O1.
	* src/pr.c: Likewise.
	* src/sort.c: Likewise.
	* src/tee.c: Avoid -Wmaybe-uninitialized that gives
	false positive here at -O3 on gcc 13.1.1 at least.
	* src/cp.c: Avoid -Wmaybe-uninitialized that gives
	false positive here at -Os on gcc 13.1.1 at least.
	* src/copy.c: Avoid -Wmaybe-uninitialized that gives
	false positive here at -Og on gcc 13.1.1 at least.
	* src/head.c: Likewise.
	* src/paste.c: Likewise.

2023-05-18  Pádraig Brady  <P@draigBrady.com>

	build: gnulib: avoid false -Wstringop-overflow warning
	Tested on gcc 13.1.1 with: make CFLAGS='-O0 -ggdb'

	* configure.ac: Disable -Wstringop-overflow for gnulib.
	This warning is far too problematic in my experience:
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
	and triggers with gcc -O0 with versions 12,13 at least.

2023-05-13  Pádraig Brady  <P@draigBrady.com>

	maint: cleanups to NEWS
	* NEWS: Use more consistent wording, ordering, and formatting
	for recent entries.

2023-05-08  Pádraig Brady  <P@draigBrady.com>

	split: advise the kernel of sequential access pattern
	As split is often dealing with large files,
	ensure we indicate to the kernel our sequential access pattern.
	This was seen to operate 5% faster when reading from SSD,
	as tested with:

	dd bs=1M count=2K if=/dev/urandom of=big.in

	for split in split.orig split; do
	  # Ensure big file is not cached
	  dd of=big.in oflag=nocache conv=notrunc,fdatasync count=0 status=none
	  # Test read efficiency
	  CWD=$PWD; (cd /dev/shm && time $CWD/src/$split -n2 $CWD/big.in)
	done

	real    0m9.039s
	user    0m0.055s
	sys     0m3.510s

	real    0m8.568s
	user    0m0.056s
	sys     0m3.752s

	* src/split.c (main): Use fdadvise to help the kernel
	choose a more appropriate readahead buffer.
	* NEWS: Mention the improvement.

2023-05-08  Pádraig Brady  <P@draigBrady.com>

	doc: adjust build instructions for disabling year 2038 support
	* README-install: Adjust the instructions as per recent gnulib updates.

2023-05-07  Bernhard Voelker  <mail@bernhard-voelker.de>

	build: update gnulib submodule to latest
	This fixes failures in "very-expensive" tests on FTS with many
	directory entries:
	  FAIL: tests/rm/ext3-perf
	  FAIL: tests/rm/many-dir-entries-vs-OOM

	The following shows the problem in the former of the above tests:
	  $ mkdir d && seq 400000 | env -C d xargs touch )
	  $ rm -rf d
	  rm: traversal failed: d: Operation not supported

	Gnulib commit 3f0950f65abb (2023-04-26) introduced this regression
	which was fixed again with gnulib commit d4d8abb39eb0.

	See discussion in
	<https://lists.gnu.org/r/bug-gnulib/2023-05/msg00040.html>

	* bootstrap.conf (gnulib_modules): Change "year2038-required" to
	"year2038-recommended"; the module has been replaced.
	* gnulib: Update to latest.
	* tests/init.sh: Likewise.

2023-05-07  Paul Eggert  <eggert@cs.ucla.edu>

	doc: time zone conversion example
	* doc/coreutils.texi (Examples of date):
	Give time zone conversion example.

	doc: new subsection for date format specs
	* doc/coreutils.texi (Date format specifiers): New subsection,
	which groups the date format specifiers without otherwise
	changing contents.

2023-05-06  Pádraig Brady  <P@draigBrady.com>

	pr: fix parsing of empty arguments
	Before:
	  $ pr --expand-tabs=
	  pr: '-e' extra characters or invalid number in the argument:
	   ‘SHELL=/bin/bash’: Value too large for defined data type

	After:
	  $ pr --expand-tabs=
	  pr: '-e': Invalid argument: ‘’

	* src/pr.c (getoptarg): Ensure we don't parse beyond the
	end of an empty argument, thus outputting arbitrary stack
	info in subsequent error messages.

	Addresses https://bugs.debian.org/1035596

2023-05-05  Paul Eggert  <eggert@cs.ucla.edu>

	cp: -p --parents: minor cleanup of previous patch
	This doesn’t change behavior; it just clarifies the code a bit.
	* src/cp.c (re_protect): New arg DST_SRC_NAME, for clarity, and so
	that we need to skip '/'s only once.  Caller changed.
	Rename a couple of local variables to try to make things clearer.

2023-05-03  Pádraig Brady  <P@draigBrady.com>

	cp: -p --parents: fix failure to preserve permissions for absolute paths
	* src/cp.c (re_protect): Ensure copy_acl() is passed an absolute path.
	* tests/cp/cp-parents.sh: Add a test case.
	* NEWS: Mention the bug.
	Fixes https://bugs.gnu.org/63245

2023-05-02  Pádraig Brady  <P@draigBrady.com>

	tests: provide more info on DEBUG=yes
	* README: State that DEBUG=yes is particularly useful with perl tests.
	* tests/split/l-chunk.sh: Use the more standard $DEBUG variable
	rather than an internal $DEBUGGING variable.

2023-04-30  Pádraig Brady  <P@draigBrady.com>

	doc: provide more info on the default 32-bit cksum digest
	* doc/coreutils.texi (cksum invocation): Say that the default
	digest format is 32-bit and based on the Ethernet standard CRC.

	maint: remove redundant exit status handling
	* src/numfmt.c: Remove redundant / confusing
	use of TIMEOUT_FAILURE.

2023-04-27  Paul Eggert  <eggert@cs.ucla.edu>

	maint: simplify --enable-gcc-warnings='expensive'
	* configure.ac (WERROR_CFLAGS): Omit mention of
	-Wno-analyzer-double-free, -Wno-analyzer-null-dereference, and
	-Wno-analyzer-use-after-free as manywarnings no longer uses them.

	maint: suppress GCC 13 false alarms
	* src/csplit.c, src/fmt.c, src/make-prime-list.c, src/nohup.c:
	Add pragmas to pacify GCC 13 when coreutils is configured
	with --enable-gcc-warnings='expensive'.

	chmod: pacify GCC 13
	* src/chmod.c (main): Use xpalloc instead of X2REALLOC,
	and make the corresponding variables signed instead of unsigned.
	When reallocating the buffer, this grows it by a factor of 1.5, not 2.
	This also pacifies gcc -Wanalyzer-null-dereference.

	csplit: pacify GCC 13
	* src/csplit.c (load_buffer): Refactor for clarity.
	This also xpacifies gcc -Wanalyzer-use-of-uninitialized-value.
	When reallocating the buffer, grow it by a factor of 1.5, not 2.

	build: update gnulib submodule to latest

2023-04-26  Pádraig Brady  <P@draigBrady.com>

	tests: more cases for read input diagnostics
	* tests/misc/read-errors.sh: Exercise more modes of
	various utilities for better read error coverage.
	* tests/split/fail.sh: Remove part refactored into the above test.

	uniq: be more specific when diagnosing read errors
	* src/uniq.c (check_file): Use the errno when diagnosing read errors.

2023-04-26  Jaroslav Skarvada  <jskarvad@redhat.com>

	build: fix build with -mno-ssse3
	Avoid the following error with -mno-ssse3:
	 inlining failed in call to 'always_inline' '_mm_shuffle_epi8':
	 target specific option mismatch

	* configure.ac: Ensure we use ssse3 specific code when
	checking whether to enable the pclmul cksum implementation.

2023-04-25  Pádraig Brady  <P@draigBrady.com>

	pr: fix infinite loop when double spacing
	* src/pr.c (init_parameters): Ensure we avoid a 0 lines_per_body
	which was possible when adjusting for double spacing.
	That caused print_page() to always return true,
	causing an infinite loop.
	* tests/pr/pr-tests.pl: Add a test case.
	* NEWS: Mention the fix.
	Fixes https://bugs.debian.org/1034808

2023-04-25  Pádraig Brady  <P@draigBrady.com>

	copy: reduce verbosity of -i and -u with --verbose
	Since skipping of files is central to the operation of -i and -u,
	and with -u one may be updating few files out of many,
	reinstate the verbosity of this functionality as it was before 9.3.

	* src/copy.c (copy_internal): Only output "skipped" message
	with --debug.  Also adjust so message never changes with --debug.
	* tests/cp/cp-i.sh: Adjust accordingly.
	* tests/mv/mv-n.sh: Likewise.
	* tests/cp/debug.sh: Add explicit test case for message.
	* NEWS: Mention the change in behavior.

2023-04-24  Pádraig Brady  <P@draigBrady.com>

	tests: ensure all utilities that read input diagnose errors
	* tests/misc/read-errors.sh: Add a new test.
	* tests/misc/date-f.sh: Remove unneeded test.
	* tests/misc/dircolors.sh: Likewise.
	* tests/local.mk: Reference new test, and dereference removed ones.

	factor: diagnose errors reading the input
	* src/factor.c (do_stdin): Exit with failure upon read errors.
	* NEWS: Mention the bug fix.

	numfmt: diagnose errors reading the input
	* src/numfmt.c (main): Exit with failure upon read errors.
	* NEWS: Mention the bug fix.

	tsort: diagnose errors reading the input
	* src/tsort.c (tsort): Check for errors after readtoken().
	* NEWS: Mention the bug fix.

2023-04-24  Pádraig Brady  <P@draigBrady.com>

	cksum: fix failure to diagnose read errors with crc32
	The default crc32 mode fails to diagnose read errors.

	* src/cksum.c (cksum_slice8): Fix the check for read errors.
	(cksum_pclmul): Likewise.
	* NEWS: Mention the bug fix.

2023-04-24  Andreas Schwab  <schwab@linux-m68k.org>

	tests: avoid failure when cp fails for proc files
	When run under QEmu emulation emulated /proc files have
	unstable inode numbers.

	* tests/cp/proc-short-read.sh: Skip if unstable inode numbers detected.

2023-04-21  Pádraig Brady  <P@draigBrady.com>

	install: support stripping files with a leading hyphen
	* src/install.c (strip): Prepend "./" to file names with a leading "-".
	* tests/install/strip-program.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Reported in https://bugs.debian.org/1034429

2023-04-18  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.3
	* NEWS: Record release date.

2023-04-16  Pádraig Brady  <P@draigBrady.com>

	tests: avoid allocation checks on ZFS
	* tests/du/basic.sh: Allocation of files was seen to change
	asynchronously on ZFS, so avoid allocation comparisons there.

2023-04-14  Pádraig Brady  <P@draigBrady.com>

	tests: tty-eof: fix various issues
	* tests/misc/tty-eof.pl: Ensure we don't erroneously
	skip commands with parameters.
	Comment as to why cut(1) is treated differently.
	Adjust expect calls to not wait needlessly for cut output.

2023-04-13  Pádraig Brady  <P@draigBrady.com>

	tests: avoid dependence on file layout for cp sparse check
	* tests/cp/sparse-2.sh: Don't depend on the copy taking
	<= allocation of the source.  Instead leverage --debug
	to check that zero detection is being enabled.

	copy: --debug: indicate if NUL detection is used with SEEK_HOLE
	* src/copy.c (sparse_copy): With --sparse=always we also detect
	NULs in extents we're copying, so indicate this with --debug.

2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>

	doc: update re 32-bit builds
	* README-install: Mention how to build on 32-bit-only hosts.
	This builds on a previous patch by Pádraig Brady.

2023-04-10  Pádraig Brady  <P@draigBrady.com>

	build: fix _Noreturn compilation failure
	Fix a build failure seen on gcc 3.4 on Solaris 10 at least.

	* src/crctab.c: Ensure we include config.h for all compilation units.
	This is now required for new _Noreturn usage in gnulib for stdint.h.
	* src/cksum.c: Update generation code to ensure config.h included.
	* cfg.mk: Remove crctab.c exclusion from the config.h check.

2023-04-10  Pádraig Brady  <P@draigBrady.com>

	tests: avoid non portable brace expansion
	* tests/cp/backup-dir.sh: Avoid non portable brace expansion
	which is not supported by FreeBSD or Solaris shells at least.

2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>

	maint: require support for post-2038 timestamps
	* bootstrap.conf (gnulib_modules): Replace year2038 with
	year2038-required.

	build: update gnulib submodule to latest

2023-04-08  Pádraig Brady  <P@draigBrady.com>

	wc: ensure we update file offset
	* src/wc.c (wc): Update the offset when not reading,
	and do read if we can't update the offset.
	* tests/misc/wc-proc.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/61300

	cp,mv: issue "skipped" messages when skipping files
	* NEWS: Mention the change in behavior to issue a "not replaced"
	error diagnostic with -n, and the "skipped" message with -v.
	* src/copy.c (copy_internal): Adjust to output the "skipped" messages
	depending on -i, -n, -u.
	* tests/cp/cp-i.sh: Adjust accordingly.
	* tests/mv/mv-n.sh: Likewise.

2023-04-08  Pádraig Brady  <P@draigBrady.com>

	cp,mv: add --update=none to always skip existing files
	Add --update=none which is equivalent to the --no-clobber behavior
	from before coreutils 9.2.  I.e. existing files are unconditionally
	skipped, and them not being replaced does not affect the exit status.

	* src/copy.h [enum Update_type]: A new type to support parameters
	to the --update command line option.
	[enum Interactive]: Add I_ALWAYS_SKIP.
	* src/copy.c: Treat I_ALWAYS_SKIP like I_ALWAYS_NO (-n),
	except that we don't fail when skipping.
	* src/system.h (emit_update_parameters_note): A new function
	to output the description of the new --update parameters.
	* src/cp.c (main): Parse --update arguments, ensuring that
	-n takes precedence if specified.
	(usage): Describe the new option.  Also allude that
	-u is related in the -n description.
	* src/mv.c: Accept the new --update parameters and
	update usage() accordingly.
	* doc/coreutils.texi (cp invocation): Describe the new --update
	parameters.  Also reference --update from the --no-clobber description.
	(mv invocation): Likewise.
	* tests/mv/update.sh: Test the new parameters.
	* NEWS: Mention the new feature.
	Addresses https://bugs.gnu.org/62572

2023-04-04  Pádraig Brady  <P@draigBrady.com>

	cp: fix --backup with subdirectories
	* gnulib: Reference the latest gnulib including the
	fix to the backupfile module in commit 94496522.
	* tests/cp/backup-dir.sh: Add a test to ensure
	we rename appropriately when backing up through subdirs.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/62607

2023-03-31  Pádraig Brady  <P@draigBrady.com>

	tests: tee: avoid false failure due to fifo usage
	* tests/misc/tee.sh: Call cleanup_ in all cases to ensure
	there are no overlapping interactions on the fifo that
	might impact later parts of the test.  This was seen to
	cause issue with dash on musl libc.
	Addresses https://bugs.gnu.org/62542

	tests: adjust csplit VM limit
	* tests/misc/csplit-heap.sh: More memory is required to avoid
	a false failure on some systems.  Noticed with musl libc
	with bash as the shell.  This is confirmed to still easily
	trigger with the original memory leak being tested.
	Addresses https://bugs.gnu.org/62542

	wc: diagnose overflow of total counts
	* src/wc.c (wc): Use INT_ADD_WRAPV() to detect overflow.
	(main): Upon overflow, saturate the total, print a diagnostic,
	and set exit status.
	* tests/misc/wc-total.sh: Add a test case, which operates
	on BTRFS and 64 bit systems at least.
	Reported at https://bugs.debian.org/1027100

2023-03-28  Pádraig Brady  <P@draigBrady.com>

	dircolors: diagnose read errors
	* NEWS: Mention the fix.
	* src/dircolors.c: Fail upon read error from getline().
	* tests/misc/dircolors.sh: Add a new test.
	* tests/local.mk: Reference the new test.

	tests: add a test case for the previous date fix
	* NEWS: Also mention this bug fix.
	* tests/misc/date-f.sh: Add a new test.
	* tests/local.mk: Reference the new test.

2023-03-28  Paul Eggert  <eggert@cs.ucla.edu>

	date: diagnose -f read errors
	* src/date.c (batch_convert): Diagnose read errors, fixing Bug#62497.

2023-03-25  Paul Eggert  <eggert@cs.ucla.edu>

	cp: clarify commentary
	* src/copy.c: Make comments a bit clearer.

2023-03-24  Pádraig Brady  <P@draigBrady.com>

	copy: fix --reflink=auto to fallback in more cases
	On restricted systems like android or some containers,
	FICLONE could return EPERM, EACCES, or ENOTTY,
	which would have induced the command to fail to copy
	rather than falling back to a more standard copy.

	* src/copy.c (is_terminal_failure): A new function refactored
	from handle_clone_fail().
	(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
	as they also pertain to determination of whether cloning is supported
	if we ever use this function in that context.
	(handle_clone_fail): Use is_terminal_failure() in all cases,
	so that we assume a terminal failure in less errno cases.
	* NEWS: Mention the bug fix.
	Addresses https://bugs.gnu.org/62404

2023-03-24  Pádraig Brady  <P@draigBrady.com>

	doc: add a NEWS entry for the previous fix
	* NEWS: Mention the previous cksum --check fix.

2023-03-23  Pádraig Brady  <P@draigBrady.com>

	cksum: fix reporting of failed checks
	This applies to all checksumming utilities,
	where we incorrectly report all subsequent files as checking 'OK'
	once any file has passed a digest check.
	The exit status was not impacted, only the printed status.

	* src/digest.c (digest_check): Use the correct state variable
	to determine if the _current_ file has passed or not.
	* tests/misc/md5sum.pl: Add a test case.
	Fixes https://bugs.gnu.org/62403

2023-03-21  Nick Alcock  <nick.alcock@oracle.com>

	tests: skip some parts of tests/misc/tee.sh if run as root
	Similarly to the fix to tests/rmdir/ignore.sh in c0e5f8c59,
	tee should not be expected to fail when run with read-only outputs
	when run as root.

	* tests/misc/tee.sh: Add uid_is_privileged_ guard around test for
	read-only outputs.

2023-03-20  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.2
	* NEWS: Record release date.

2023-03-19  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure on systems without statx
	* tests/ls/stat-free-symlinks.sh: Filter out syscalls that
	return ENOSYS, as that was seen with statx() on Debian 10.13
	on mips64, and resulted in overcounting of stat calls.

	stty: ensure arbitrary data is not displayed
	* src/stty.c (main): Use static structures to ensure
	they're initialized (to zero), so that random data is
	not displayed, or compared resulting in a inaccurate
	failure reported to users.  This was seen on musl libc
	where some parts of the termios c_cc array were
	not initialized by tcgetattr().
	Reported by Bruno Haible.

	tests: df: avoid false failure on systems with multiple roots
	* tests/df/df-symlink.sh: Skip the test on systems
	with multiple file system roots.

2023-03-18  Pádraig Brady  <P@draigBrady.com>

	doc: uniq: revert previous man page adjustment
	* src/uniq.c (usage): -D doesn't take an argument
	so should be separated in the description.

	doc: uniq: use more standard description of -D long option
	* src/uniq.c: Describe -D and --all-repeated together,
	as with all other long options.
	Fixes https://bugs.gnu.org/62249

	tests: aix: avoid unsupported functionality
	* tests/misc/tee.sh: AIX doesn't support detecting
	closed outputs either with poll() or select() so avoid
	testing that functionality.
	* tests/tail-2/pipe-f.sh: Likewise.

2023-03-16  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: avoid discarded-qualifiers warnings with SELinux 3.5
	Since SELinux version 3.5, the return value of context_str(3) is
	declared as const; see:
	  https://github.com/SELinuxProject/selinux/commit/dd98fa322766
	Therefore, GCC complains (here with -Werror):
	  src/selinux.c: In function 'defaultcon':
	  src/selinux.c:152:16: error: assignment discards 'const' qualifier \
	    from pointer target type [-Werror=discarded-qualifiers]
	    152 |   if (!(constr = context_str (tcontext)))
	        |                ^
	  src/selinux.c: In function 'restorecon_private':
	  src/selinux.c:252:16: error: assignment discards 'const' qualifier \
	    from pointer target type [-Werror=discarded-qualifiers]
	    252 |   if (!(constr = context_str (tcontext)))
	      |                ^

	* src/selinux.c (defaultcon): Define CONSTR as const.
	(restorecon_private): Likewise.

2023-03-15  Pádraig Brady  <P@draigBrady.com>

	test: avoid a test hang on Hurd
	* tests/cp/sparse-to-pipe.sh: Protect the cp call seen to
	hang on Hurd/i686 with a timeout.
	Reported By: Bruno Haible

	cksum: fix --raw on 64 bit big endian systems
	* src/sum.c (output_bsd): On sparc64 for example,
	a crc of 0 was output due to casting an int variable
	to uint16_t and thus operating on the wrong end of the variable.
	Instead use explicit assignment to the narrower type
	to ensure we get the appropriate data.
	(output_sysv): Likewise.
	Reported by Bruno Haible.

2023-03-15  Bruno Haible  <bruno@clisp.org>

	build: avoid -Wsometimes-uninitialized on macOS 12
	* src/pr.c (integer_overflow): Mark as _Noreturn.
	* src/test.c (beyond): Likewise.

2023-03-13  Pádraig Brady  <P@draigBrady.com>

	doc: remove older ChangeLog items
	* Makefile.am: Update the oldest documented version
	to 8.29 which is now about 5 years old.

	tee: avoid undefined behavior after fclose()
	* iopoll.c (fclose_wait): Rename from confusing fclose_nonblock name.
	Also adjust to do no operations on the stream after fclose()
	as this is undefined. Instead use fflush() to determine EAGAIN status.
	(fwrite_wait): Renamed from confusing fwrite_nonblock name.

	doc: dircolors: better separate the sections in the database
	* src/dircolors.hin: Make the separate sections of the self
	documenting dircolors database more apparent,
	by adding heading comments, and appropriate separation.

2023-03-13  Pádraig Brady  <P@draigBrady.com>

	ls: --color: honor separate sequences for extension cases
	Following on from commit v8.29-45-g24053fbd8 which unconditionally
	used case insensitive extension matching, support selective
	case sensitive matching when there are separate extension cases
	defined with different display sequences.

	* src/dircolors.hin: Document how file name suffixes are matched.
	Note this is displayed with `dircolors --print-database` which
	the texi info recommends to use for details.
	* src/ls.c (parse_ls_color): Postprocess the list to
	mark entries for case sensitive matching,
	and also adjust so that unmatchable entries are more quickly ignored.
	(get_color_indicator): Use exact matching rather than
	case insensitive matching if so marked.
	* tests/ls/color-ext.sh: Add test cases.
	* NEWS: Mention the change in behavior.
	Addresses https://bugs.gnu.org/33123

2023-03-13  Pádraig Brady  <P@draigBrady.com>

	tests: adjust du test for recent apparent size change
	* tests/du/threshold.sh: Directories are assumed to be
	of size 0 with --apparent since commit v9.1-187-g110bcd283
	so remove --apparent cases from this test.

2023-03-08  Pádraig Brady  <P@draigBrady.com>

	tee: support non blocking outputs
	Non blocking outputs can be seen for example
	when piping telnet through tee to a terminal.
	In that case telnet sets its input to nonblocking mode,
	which results in tee's output being nonblocking,
	in which case in may receive an EAGAIN error upon write().
	The same issue was seen with mpirun.
	The following can be used to reproduce this
	locally at a terminal (in most invocations):

	  $ { dd iflag=nonblock count=0 status=none;
	      dd bs=10K count=10 if=/dev/zero status=none; } |
	    tee || echo fail >/dev/tty

	* src/iopoll.c (iopoll_internal): A new function refactored from
	iopoll(), to also support a mode where we check the output
	descriptor is writeable.
	(iopoll): Now refactored to just call iopoll_internal().
	(fwait_for_nonblocking_write): A new internal function which
	uses iopoll_internal() to wait for writeable output
	if an EAGAIN or EWOULDBLOCK was received.
	(fwrite_nonblock): An fwrite() wrapper which uses
	fwait_for_nonblocking_write() to handle EAGAIN.
	(fclose_nonblock): Likewise.
	src/iopoll.h: Add fclose_nonblock, fwrite_nonblock.
	src/tee.c: Call fclose_nonblock() and fwrite_nonblock wrappers,
	instead of the standard functions.
	* tests/misc/tee.sh: Add a test case.
	* NEWS: Mention the improvement.

	The idea was suggested by Kamil Dudka in
	https://bugzilla.redhat.com/1615467

2023-03-08  Pádraig Brady  <P@draigBrady.com>

	doc: remove redundant NEWS entry
	* NEWS: There was no bug on macOS,
	and the split -n new feature is documented already.

2023-03-07  Paul Eggert  <eggert@cs.ucla.edu>

	split: support split -n on larger pipe input
	* bootstrap.conf (gnulib_modules): Add free-posix, tmpfile.
	* src/split.c (copy_to_tmpfile): New function.
	(input_file_size): Use it to split larger files when sizes cannot
	easily be determined via fstat or lseek.  See Bug#61386#235.
	* tests/split/l-chunk.sh: Mark tests of /dev/zero as
	very expensive since they exhaust /tmp.

2023-03-07  Pádraig Brady  <P@draigBrady.com>

	tee: fix a crash with unwriteable files
	This was introduced recently with commit v9.1-166-g6b12e62d9

	* src/tee.c (tee_files): Check the return from fopen()
	before passing to fileno() etc.
	* tests/misc/tee.sh: Add a test case.

2023-03-06  Paul Eggert  <eggert@cs.ucla.edu>

	maint: pacify ‘make syntax-check’
	Problem reported by Pádraig Brady (Bug#61386#226).
	* src/split.c (parse_chunk): Use die instead of error.
	(main): Quote a string.
	* tests/local.mk (all_root_tests): Move du/apparent.sh from here ...
	(all_tests): ... to here.

2023-03-06  Pádraig Brady  <P@draigBrady.com>

	tail,tee: avoid issues with many files on systems without poll
	* src/iopoll.c (iopoll): Protect the call to select against
	passing in a descriptor larger than FD_SETSIZE.

2023-03-05  Paul Eggert  <eggert@cs.ucla.edu>

	du: --apparent counts only symlinks and regular
	Problem reported by Christoph Anton Mitterer (Bug#61884).
	* src/du.c (process_file): When counting apparent sizes, count
	only usable st_size members.
	* tests/du/apparent.sh: New file.
	* tests/local.mk (all_root_tests): Add it.

2023-03-04  Paul Eggert  <eggert@cs.ucla.edu>

	split: tune for when creating output files
	* src/split.c (create): Avoid fstat + ftruncate in the usual case
	where the output file does not already exist, by trying
	to create it with O_EXCL first.  This costs a failed open
	in the unusual case where the output file already exists,
	but that’s OK.

	split: style fix
	* src/split.c (ofile_open): Avoid ‘if (! (a = b))’ style.

	split: prefer signed integers to size_t
	This allows for better runtime checking with gcc
	-fsanitize=undefined.
	* src/split.c: Include idx.h.
	(open_pipes_alloc, n_open_pipes, suffix_length)
	(set_suffix_length, input_file_size, sufindex, outbase_length)
	(outfile_length, addsuf_length, create, cwrite, bytes_split)
	(lines_split, line_bytes_split, lines_chunk_split)
	(bytes_chunk_extract, ofile_open, lines_rr, main):
	Prefer signed integers (typically idx_t) to size_t.

	split: handle large numbers better
	Prefer signed types to uintmax_t, as this allows for better
	runtime checking with gcc -fsanitize=undefined.
	Also, when an integer overflows just use the maximal value
	when the code will do the right thing anyway.
	* src/split.c (set_suffix_length, bytes_split, lines_split)
	(line_bytes_split, lines_chunk_split, bytes_chunk_extract)
	(lines_rr, parse_chunk, main):
	Prefer a signed type (typically intmax_t) to uintmax_t.
	(strtoint_die): New function.
	(OVERFLOW_OK): New macro.  Use it elsewhere, where we now allow
	LONGINT_OVERFLOW because the code then does the right thing on all
	practical platforms (they have int wide enough so that it cannot
	be practically exhausted).  We can do this now that we can safely
	assume intmax_t has at least 64 bits.
	(parse_n_units): New function.
	(parse_chunk, main): Use it.
	(main): Do not worry about integer overflow when the code
	will do the right thing anyway with the extreme value.
	Just use the extreme value.
	* tests/split/fail.sh: Adjust to match new behavior.

	split: prefer ssize_t for read result
	* src/split.c (bytes_split, lines_chunk_split)
	(bytes_chunk_extract, main): Prefer ssize_t to size_t when
	representing the return value of ‘read’.  Use a negative value
	instead of SIZE_MAX to indicate a missing value.

	split: be more careful about buffer sizes
	* src/split.c: Include sys-limits.h, not safe-read.h.
	(input_file_size, bytes_split, lines_split, line_bytes_split)
	(lines_chunk_split, bytes_chunk_extract, lines_rr): Call read, not
	safe_read, since safe_read no longer buys us anything.
	(main): Reject outlandish buffer sizes right away,
	rather than allocating huge buffers and never using them.

	split: minor -1 / 0 refactor
	* src/split.c (create, bytes_split, ofile_open):
	Prefer comparing to 0 to comparing to -1.

	split: don’t worry about ECHILD
	* src/split.c (closeout): There should be no need for a special
	case for ECHILD, since we never wait for the same child twice.
	Simplify with this in mind.

	split: don’t assume pid_t fits in int
	* src/split.c (filter_pid): Now pid_t, not int.
	(of_t): opid member is now pid_t, not int.

	split: simplify SIGPIPE handling
	Ignore and default SIGPIPE, rather than blocking and unblocking it.
	* src/split.c (default_SIGPIPE):
	New static var, replacing oldblocked and newblocked.
	(create): Use it.
	(main): Set it.

	split: port ‘split -n N /dev/null’ better to macOS
	* src/split.c (input_file_size): Do not bother with lseek if the
	initial read probe reaches EOF, since the file size is known then.
	This works better on macOS, which doesn’t allow lseek on /dev/null.
	Do not special-case size-zero files, as the issue can occur
	with any size file (though /proc files are the most common).
	If the current position is past end of file, treat this as
	size zero regardless of whether the file has a usable st_size.
	Pass through lseek -1 return values rather than using ‘return -1’;
	this makes the code a bit easier to analyze (and a bit faster).
	Avoid undefined behavior if the size calculation overflows.
	(lines_chunk_split): Do not bother with lseek if it would have
	no effect if successful.  This works better on macOS, which
	doesn’t allow lseek on /dev/null.
	* tests/split/l-chunk.sh: Adjust to match fixed behavior.

	maint: fix NEWS quoting
	* NEWS: Use English-language quoting in recent news.

	split: split more evenly with -n
	* src/split.c (bytes_split): New arg REM_BYTES.
	Use this to split more evenly.  All callers changed.
	(lines_chunk_split, bytes_chunk_extract):
	Be consistent with new byte_split.
	* tests/split/b-chunk.sh, tests/split/l-chunk.sh: Test new behavior.

	split: small -n lines simplification
	* src/split.c (lines_chunk_split):
	Rewrite while as if-while for clarity.

	split: refactor lines_chunk_split
	* src/split.c (lines_chunk_split): Simplify by having chunk_end
	point to the first byte after the chunk, rather than to the last
	byte of the chunk.  This will reduce confusion once we allow
	chunks to be empty.

	tee: tune when later -p overrides earlier
	* src/tee.c (pipe_check): Make this a local var instead
	of a static var.  This suppresses a -Wmaybe-uninitialized
	diagnostic with gcc 12.2.1 20221121 (Red Hat 12.2.1-4).
	(main): Don’t set pipe_check unnecessarily if a later
	-p option overrides an earlier one that wants pipe_check.
	Problem discovered when I investigated the GCC warning.

2023-03-01  Pádraig Brady  <P@draigBrady.com>

	maint: refactor tail.c to use iopoll
	* src/tail.c (check_output_alive): Reuse iopoll()
	rather than directly calling poll() or select().
	* src/iopoll.c (iopoll): Refactor to support non blocking operation,
	or ignoring descriptors by passing a negative value.
	* src/iopoll.h (iopoll): Adjust to support a BLOCK parameter.
	* src/tee.c (tee_files): Adjust iopoll() call to explicitly block.
	* src/local.mk: Have tail depend on iopoll.c.

2023-02-28  Pádraig Brady  <P@draigBrady.com>

	tail: avoid undefined behavior when polling outputs
	* src/tail.c (check_output_alive): Only check the returned
	events from poll() when it indicates there are events to check.

	doc: tee -p: clarify operation
	* src/tee.c (usage): Change from describing one (non pipe) aspect
	to the more general point of being the option to use if working with
	pipes, and referencing the more detailed info below.
	* doc/coreutils.texi (tee invocation): s/standard/appropriate/ since
	the standard operation with pipes is to exit immediately upon write
	error.  s/early/immediately/ as it's ambiguous as to what "early"
	is in relation to.

	tests: tee -p: add test for early exit with closed pipes
	* tests/misc/tee.sh: Add a test for the new iopoll logic
	to detect closed outputs and exit early without needing
	further input.

2023-02-28  Carl Edquist  <edquist@cs.wisc.edu>

	tee: enhance -p mode using iopoll() to detect broken pipe outputs
	If input is intermittent (a tty, pipe, or socket), and all remaining
	outputs are pipes (eg, >(cmd) process substitutions), exit early when
	they have all become broken pipes (and thus future writes will fail),
	without waiting for more input to become available, as future write
	attempts to these outputs will fail (SIGPIPE/EPIPE).

	Only provide this enhancement when pipe errors are ignored (-p mode).

	Note that only one output needs to be monitored at a time with iopoll(),
	as we only want to exit early if _all_ outputs have been removed.

	* src/tee.c (pipe_check): New global for iopoll mode.
	(main): enable pipe_check for -p, as long as output_error ignores EPIPE,
	and input is suitable for iopoll().
	(get_next_out): Helper function for finding next valid output.
	(fail_output, tee_files): Break out write failure/output removal logic
	to helper function.
	(tee_files): Add out_pollable array to track which outputs are suitable
	for iopoll() (ie, that are pipes); track first output index that is
	still valid; add iopoll() broken pipe detection before calling read(),
	removing an output that becomes a broken pipe.
	* src/local.mk (src_tee_SOURCES): include src/iopoll.c.
	* NEWS: Mention tee -p enhancement in Improvements.
	* doc/coreutils.texi: Mention the new early exit behavior in the nopipe
	modes for the tee -p option.

	Suggested-by: Arsen Arsenović <arsen@aarsen.me>

2023-02-28  Carl Edquist  <edquist@cs.wisc.edu>

	all: add broken pipe detection while waiting for input
	When a program's output becomes a broken pipe, future attempts to write
	to that ouput will fail (SIGPIPE/EPIPE).  Once it is known that all
	future write attepts will fail (due to broken pipes), in many cases it
	becomes pointless to wait for further input for slow devices like ttys.
	Ideally, a program could use this information to exit early once it is
	known that future writes will fail.

	Introduce iopoll() to wait on a pair of fds (input & output) for input
	to become ready or output to become a broken pipe.

	This is relevant when input is intermittent (a tty, pipe, or socket);
	but if input is always ready (a regular file or block device), then
	a read() will not block, and write failures for a broken pipe will
	happen normally.

	Introduce iopoll_input_ok() to check whether an input fd is relevant
	for iopoll().

	Experimentally, broken pipes are only detectable immediately for pipes,
	but not sockets.  Errors for other file types will be detected in the
	usual way, on write failure.

	Introduce iopoll_output_ok() to check whether an output fd is suitable
	for iopoll() -- namely, whether it is a pipe.

	iopoll() is best implemented with a native poll(2) where possible, but
	fall back to a select(2)-based implementation platforms where there are
	portability issues.  See also discussion in tail.c.

	In general, adding a call to iopoll() before a read() in filter programs
	also allows broken pipes to "propagate" backwards in a shell pipeline.

	* src/iopoll.c, src/iopoll.h (iopoll): New function implementing broken
	pipe detection on output while waiting for input.
	(IOPOLL_BROKEN_OUTPUT, IOPOLL_ERROR): Return codes for iopoll().
	(IOPOLL_USES_POLL): Macro for poll() vs select() implementation.
	(iopoll_input_ok): New function to check whether an input fd is relevant
	for iopoll().
	(iopoll_output_ok): New function to check whether an input fd is
	suitable for iopoll().
	* src/local.mk (noinst_HEADERS): add src/iopoll.h.

2023-02-27  Pádraig Brady  <P@draigBrady.com>

	build: update to latest gnulib
	* NEWS: Mention the fts fix to avoid the following assert
	in rm on mem pressure:
	  Program terminated with signal SIGSEGV, Segmentation fault.
	    at ../lib/cycle-check.c:60
	    assure (state->magic == CC_MAGIC);
	* gnulib: Update to the latest to pick up fts commit f17d3977.

2023-02-26  Pádraig Brady  <P@draigBrady.com>

	tests: avoid hang in new test
	* tests/rm/empty-inacc.sh: Ensure we're not reading from stdin
	when we're relying on no prompt to proceed.  Also change the
	file being tested so that a failure in one test doesn't impact
	following tests causing a framework failure.

2023-02-26  Pádraig Brady  <P@draigBrady.com>

	tests: avoid gdb on macOS
	gdb was seen to hang intermittently on macOS 12.
	Also gdb requires signing on newer macOS systems:
	https://sourceware.org/gdb/wiki/PermissionsDarwin
	So restrict its use on macOS systems for now.

	* tests/rm/r-root.sh: Skip on darwin systems.
	* tests/tail-2/inotify-race.sh: Restrict the test to
	inotify capable systems to avoid the hang with some gdbs.
	* tests/tail-2/inotify-race.sh: Likewise.

2023-02-24  Pádraig Brady  <P@draigBrady.com>

	cp,install,mv: --debug: output debug info when reflinking
	* src/copy.c (copy_reg): Always check whether to output debug info.
	(emit_debug): Restrict output with `cp --attributes-only`.

2023-02-24  Pádraig Brady  <P@draigBrady.com>

	tests: determine if SEEK_HOLE is enabled
	Upcomming gnulib changes may disable SEEK_HOLE
	even if the system supports it, so dynamically
	check if we've SEEK_HOLE enabled.

	* init.cfg (seek_data_capable_): SEEK_DATA may be disabled in the build
	if the system support is deemed insufficient, so also use `cp --debug`
	to determine if it's enabled.
	* tests/cp/sparse-2.sh: Adjust to a more general diagnostic.
	* tests/cp/sparse-extents-2.sh: Likewise.
	* tests/cp/sparse-extents.sh: Likewise.
	* tests/cp/sparse-perf.sh: Likewise.

2023-02-24  Pádraig Brady  <P@draigBrady.com>

	cp,install,mv: add --debug to explain how a file is copied
	How a file is copied is dependent on the sparseness of the file,
	what file system it is on, what file system the destination is on,
	the attributes of the file, and whether they're being copied or not.
	Also the --reflink and --sparse options directly impact the operation.

	Given it's hard to reason about the combination of all of the above,
	the --debug option is useful for users to directly identify if
	copy offloading, reflinking, or sparse detection are being used.

	It will also be useful for tests to directly query if
	these operations are supported.

	The new output looks as follows:

	  $ src/cp --debug src/cp file.sparse
	  'src/cp' -> 'file.sparse'
	  copy offload: yes, reflink: unsupported, sparse detection: no

	  $ truncate -s+1M file.sparse

	  $ src/cp --debug file.sparse file.sparse.cp
	  'file.sparse' -> 'file.sparse.cp'
	  copy offload: yes, reflink: unsupported, sparse detection: SEEK_HOLE

	  $ src/cp --reflink=never --debug file.sparse file.sparse.cp
	  'file.sparse' -> 'file.sparse.cp'
	  copy offload: avoided, reflink: no, sparse detection: SEEK_HOLE

	* doc/coreutils.texi (cp invocation): Describe the --debug option.
	(mv invocation): Likewise.
	(install invocation): Likewise.
	* src/copy.h: Add a new DEBUG member to cp_options, to control
	whether to output debug info or not.
	* src/copy.c (copy_debug): A new global structure to
	unconditionally store debug into from the last copy_reg operations.
	(copy_debug_string, emit_debug): New functions to print debug info.
	* src/cp.c: if ("--debug") x->debug=true;
	* src/install.c: Likewise.
	* src/mv.c: Likewise.
	* tests/cp/debug.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.

2023-02-23  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2023-02-23  Pádraig Brady  <P@draigBrady.com>

	doc: chgrp,chmod,chown: state --reference always dereferences
	* src/chgrp.c (usage): State that --reference always
	dereferences symbolic links.
	* src/chmod.c (usage): Likewise.
	* src/chown.c (usage): Likewise.
	Fixes https://bugs.gnu.org/61720

2023-02-21  ChuanGang Jiang  <jiangchuanganghw@outlook.com>

	doc: fix some spelling mistakes
	* doc/coreutils.texi: s/functionalty/functionality/,
	   s/sychronize/synchronize/, s/millsecond/millisecond/
	   s/paramter/parameters/
	* init.cfg: s/parmeters/parameters/
	* scripts/build-older-versions/README.older-versions: s/vesion/version/
	* tests/misc/env-S-script.sh: s/paramaters/parameters/
	Fixes https://bugs.gnu.org/61681

2023-02-21  Pádraig Brady  <P@draigBrady.com>

	maint: avoid -Wmaybe-uninitialized warning from GCC13
	* src/copy.c (infer_scantype): Always set scan_inference.ext_start,
	as per commit 6c03e8fb which was inadvertently reverted by d374d32c.

2023-02-21  Jim Meyering  <meyering@fb.com>

	tests: initialize a variable
	* tests/rm/interactive-once.sh (write_prot_msg1): Initialize it,
	so an envvar setting cannot perturb the test.

2023-02-21  Jim Meyering  <meyering@meta.com>

	rm: --dir (-d): fix bugs in handling of empty, inaccessible directories
	* src/remove.c (prompt, rm_fts): In the dir-handling code of both of
	these functions, relax a "get_dir_status (...) == DS_EMPTY" condition
	to instead test only "get_dir_status (...) != 0", enabling flow control
	to reach the prompt function also for unreadable directories. However,
	that function itself also needed special handling for this case:
	(prompt): Handle empty, inaccessible directories properly,
	deleting them with -d (--dir), and prompting about whether to delete
	with -i (--interactive).
	* tests/rm/empty-inacc.sh: Add tests for the new code.
	Reported by наб <nabijaczleweli@nabijaczleweli.xyz> in
	bugs.debian.org/1015273
	* NEWS (Bug fixes): Mention this.

2023-02-18  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port chmod/setgid.sh to macOS 12
	* tests/chmod/setgid.sh: Try all the groups you’re a member of,
	in case id -g returns 4294967295 (nogroup) which is special
	and does not let you chgrp a file to it.

	tests: port better to macOS group numbers
	* init.cfg (groups): Port better to macOS 12, where
	group 4294967295 (nogroup) is special: you can be a member
	without being able to chgrp files to the group.

	build: update gnulib submodule to latest

2023-02-16  Paul Eggert  <eggert@cs.ucla.edu>

	cp: fclonefileat security fix + CLONE_ACL + fixups
	* src/copy.c: Some changes if HAVE_FCLONEFILEAT && !USE_XATTR.
	(fd_has_acl): New function.
	(CLONE_ACL): Default to 0.
	(copy_reg): Use CLONE_NOFOLLOW to avoid races like CVE-2021-30995
	<https://www.trendmicro.com/en_us/research/22/a/
	analyzing-an-old-bug-and-discovering-cve-2021-30995-.html>.
	Use CLONE_ACL if available and working, falling back to cloning
	without it if it fails due to EINVAL.
	If the only problem with fclonefileat is that it would create the
	file with the wrong timestamp, or with too few permissions,
	do that but fix the timestamp and permissions afterwards,
	rather than falling back on a traditional copy.

2023-02-10  ChuanGang Jiang  <jiangchuanganghw@outlook.com>

	maint: fix some typos in comments
	* NEWS: s/commmand/command/
	* cfg.mk: Adjust old_NEWS_hash with `make update-NEWS-hash`.
	* src/expand-common.c: s/specifed/specified/
	* src/pr.c: s/e.g/e.g./
	* tests/misc/comm.pl: s/ouput/output/
	Fixes https://bugs.gnu.org/61405

2023-02-10  Paul Eggert  <eggert@cs.ucla.edu>

	cp: simplify infer_scantype
	* src/copy.c (infer_scantype): Do not set *SCAN_INFERENCE
	when returning a value other than LSEEK_SCANTYPE.
	This is just minor refactoring; it simplifies the code a bit.
	Callers are uneffected.

	doc: document --preserve=mode better

2023-02-06  Pádraig Brady  <P@draigBrady.com>

	tail: improve --follow=name with single non regular files
	* src/tail (tail_forever): Attempt to read() from non blocking
	single non regular file, which shouldn't block, but also
	read data even when the mtime doesn't change.
	* NEWS: Mention the improvement.
	* THANKS.in: Thanks for detailed testing.

2023-02-06  Pádraig Brady  <P@draigBrady.com>

	tail: fix support for -F with non seekable files
	This was seen to be an issue when following a
	symlink that was being updated to point to
	different underlying devices.

	* src/tail.c (recheck): Guard the lseek() call to only
	be performed for regular files.
	* NEWS: Mention the bug fix.

2023-02-06  Pádraig Brady  <P@draigBrady.com>

	cksum: add --raw option to output a binary digest
	--raw output is the most composable format, and also is a
	robust way to discard the file name without parsing (escaped) output.

	Examples:

	  $ cksum --raw -a crc "$afile" | basenc --base16
	  4ACFC4F0

	  $ cksum --raw -a crc "$afile" | basenc --base2msbf
	  01001010110011111100010011110000

	  $ cksum --raw -a sha256 "$bfile" | basenc --base32
	  AAAAAAAADHLGRHAILLQWLAY6SNH7OY5OI2RKNQLSWPY3MCUM4JXQ====

	* doc/coreutils.texi (cksum invocation): Describe the new feature.
	* src/digest.c (output_file): Inspect the new RAW_DIGEST global,
	and output the bytes directly if set.
	* src/cksum.c (output_crc): Likewise.
	* src/sum.c (output_bsd, output_sysv): Likewise.
	* tests/misc/cksum-raw.sh: A new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.

2023-02-05  Pádraig Brady  <P@draigBrady.com>

	build: uptime: avoid issues on systems without utmp.h
	* src/uptime.c (print_uptime): Following gnulib commit 9041103
	HAVE_UTMP_H will always be defined.  Therefore key on whether
	the utmp.ut_type member is present.
	* boottime.m4 (GNULIB_BOOT_TIME): Assume utmp.h is present.

2023-02-04  Paul Eggert  <eggert@cs.ucla.edu>

	maint: use alignasof, not stdalign
	* .gitignore: Update accordingly.
	* bootstrap.conf (gnulib_modules): Replace obsolescent stdalign
	with alignasof.
	* gl/modules/randread (Depends-on): Depend on alignasof, not stdalign.

	maint: prefer https: to git:
	The idea is to defend against some adversary-in-the-middle attacks.

	build: update gnulib submodule to latest

2023-02-03  Pádraig Brady  <P@draigBrady.com>

	maint: avoid line length syntax check failure
	* src/cp.c: Adjust source line to be <= 80 chars.

	tests: fix exit status check in cp -u test
	* tests/cp/preserve-link.sh: This should have been part
	of commit v9.1-134-g01503ce73.

2023-02-01  Jim Meyering  <meyering@fb.com>

	cksum: accept new option: --base64 (-b)
	* src/digest.c [HASH_ALGO_CKSUM]: Include "base64.h"
	[HASH_ALGO_CKSUM] (base64_digest): New global.
	[HASH_ALGO_CKSUM] (enum BASE64_DIGEST_OPTION): New enum.
	[HASH_ALGO_CKSUM] (long_options): Add "base64".
	(valid_digits): Rename from hex_digits, now taking an input length argument.
	Adjust callers.
	(bsd_split_3): Rename arg from hex_digits to digest.
	Add new *d_len parameter for length of extracted digest.
	Move "i" declaration down to first use.
	(split_3): Rename arg from hex_digits to digest.
	Add new *d_len parameter for length of extracted digest.
	Instead of relying on "known" length of digest to find the following
	must-be-whitespace byte, search for the first whitespace byte.
	[HASH_ALGO_CKSUM] (output_file): Handle base64_digest.
	[HASH_ALGO_CKSUM] (main): Set base64_digest.
	[HASH_ALGO_CKSUM] (b64_equal): New function.
	(hex_equal): New function, factored out of digest_check.
	(digest_check) Factored part into b64_equal and hex_equal.
	Rename local hex_digest to digest.
	* tests/misc/cksum-base64.pl: Add tests.
	* tests/local.mk (all_tests): Add to the list.
	* cfg.mk (_cksum): Define.
	(exclude_file_name_regexp--sc_prohibit_test_backticks): Exempt new test.
	(exclude_file_name_regexp--sc_long_lines): Likewise.
	* doc/coreutils.texi (cksum invocation): Document it.
	(md5sum invocation) [--check]: Mention digest encoding auto-detect.
	* NEWS (New Features): Mention this.

2023-01-31  Paul Eggert  <eggert@cs.ucla.edu>

	doc: document --preserve=mode better
	* doc/coreutils.texi: Spruce up cp --preserve=mode doc.

	cp: improve --preserve usage doc
	* src/cp.c (usage): Improve description of --preserve.

	cp,mv: skipping due to -u is success, not failure
	This reverts the previous change, so that when a file
	is skipped due to -u, this is not considered a failure.
	* doc/coreutils.texi: Document this.
	* src/copy.c (copy_internal): If --update says to skip,
	treat this as success instead of failure.
	* tests/mv/update.sh, tests/cp/slink-2-slink.sh:
	Revert previous change, to match reverted behavior.

	cp,ln,mv: when skipping exit with nonzero status
	* NEWS, doc/coreutils.texi: Document this.
	* src/copy.c (copy_internal):
	* src/ln.c (do_link): Return false when skipping action due to
	--interactive or --no-clobber.
	* tests/cp/cp-i.sh, tests/cp/preserve-link.sh:
	* tests/cp/slink-2-slink.sh, tests/mv/i-1.pl, tests/mv/i-5.sh:
	* tests/mv/mv-n.sh, tests/mv/update.sh:
	Adjust expectations of exit status to match revised behavior.

2023-01-30  Pádraig Brady  <P@draigBrady.com>

	tests: cksum: fix test to include more cases
	* tests/misc/cksum-c.sh: Fix typo which caused part
	of the test data to be ignored.

2023-01-30  Jim Meyering  <meyering@fb.com>

	digest.c: remove a duplicate variable
	* src/digest.c (digest_check): Locals n_misformatted_lines and
	n_improperly_formatted_lines were declared and set/incremented
	identically. Remove declaration of the latter. Use the other instead.

	build: avoid spurious failures due to lack of EGREP definition
	* configure.ac: Use AC_PROG_EGREP, since many doc and test rules
	use $EGREP.
	* cfg.mk (sc_tests_list_consistency): Use grep -E, not $(EGREP) here.

2023-01-27  Pádraig Brady  <P@draigBrady.com>

	tests: ensure we fail if mv --no-copy crashes
	* tests/mv/no-copy.sh: Honor `make syntax` check
	and use the `returns_ 1 ...` pattern.

2023-01-27  Paul Eggert  <eggert@cs.ucla.edu>

	mv: new option --no-copy
	Wishlist item from Mike Frysinger (Bug#61050).
	* src/copy.c (copy_internal):
	Do not fall back on copying if x->no_copy.
	* src/copy.h (struct cp_options): New member no_copy.
	* src/mv.c (NO_COPY_OPTION): New constant.
	(long_options, usage, main): Support --no-copy.
	* tests/mv/no-copy.sh: New test.
	* tests/local.mk (all_tests): Add it.

2023-01-17  Pádraig Brady  <P@draigBrady.com>

	maint: add lib/error.h to .gitignore
	* .gitignore: Add /lib/error.h as suggested by sc_gitignore_missing
	as a result of gnulib change 2886cca8.

	doc: csplit: more accurate --elide-empty-files help
	* src/csplit.c (usage): Use "suppress" rather than "remove"
	when describing -z so it's more apparent that the effect
	is a particular numbered file is not created, rather than
	being removed later.  I.e., don't suggest -z may induce
	gaps in file numbering.
	Reported at https://bugs.debian.org/1029103

2023-01-14  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* m4/xattr.m4: Remove.  This file is now autogenerated by 'bootstrap',
	since it's now in Gnulib.  (I did this part by hand.)

2023-01-08  Pádraig Brady  <P@draigBrady.com>

	copy: copy_file_range: handle ENOENT for CIFS
	* src/copy.c (sparse_copy): Fallback to standard copy upon ENOENT,
	which was seen intermittently across CIFS file systems.
	* NEWS: Mention the bug fix, though qualify it as an "issue"
	rather than a bug, as coreutils is likely only highlighting
	a CIFS bug in this case.
	Fixes https://bugs.gnu.org/60455

2023-01-07  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update .gitignore
	* .gitignore: Add confdefs*, conftest* (temporaries built
	by ‘configure’).

	maint: adjust to Gnulib macro renaming
	* src/local.mk (LDADD, copy_ldadd, remove_ldadd, src_sort_LDADD)
	(src_test_LDADD, copy_ldadd, src_date_LDADD, src_ginstall_LDADD)
	(src_ln_LDADD, src_ls_LDADD, src_mktemp_LDADD, src_pr_LDADD)
	(src_tac_LDADD, src_touch_LDADD, src_dd_LDADD, src_sleep_LDADD)
	(src_sort_LDADD, src_tail_LDADD, src_sort_LDADD, LDADD):
	Adjust to recent Gnulib changes.

	build: update gnulib submodule to latest

2023-01-06  Pádraig Brady  <P@draigBrady.com>

	copy: immediately fail with transient reflink errors
	* src/copy.c (handle_clone_fail): A new function refactored
	from copy_reg() to handle failures from FICLONE or fclonefileat().
	Fail with all errors from FICLONE, unless they're from the set
	indicating the file system or file do not support the clone operation.
	Also fail with errors from fclonefileat() (dest_dest < 0)
	if they're from the set indicating a transient failure for the file.
	(copy_ref): Call handle_clone_fail() after fclonefileat() and FICLONE.
	(sparse_copy): Call the refactored is_CLONENOTSUP()
	which is now also used by the new handle_clone_fail() function.
	* NEWS: Mention the bug fix.  Also mention explicitly
	the older --reflink=auto default change to aid searching.
	* cfg.mk: Adjust old_NEWS_hash with `make update-NEWS-hash`.
	Fixes https://bugs.gnu.org/60489

	all: further adjustments for new Ronna, Quetta SI prefixes
	* src/dd.c (parse_integer): Support Q,R suffixes.
	* src/od.c (main): Likewise.
	* src/split.c (main): Likewise.
	* src/stdbuf.c (parse_size): Likewise.
	* src/truncate.c (main): Likewise.
	* src/sort.c (specify_size_size): Likewise.
	Also line length syntax check fix.
	* tests/misc/numfmt.pl: Adust top end large number checks
	to the new largest values.
	* doc/coreutils.texi (numfmt invocation): Add a numfmt example.
	* NEWS: Tweak to aid searchability.

2023-01-05  Paul Eggert  <eggert@cs.ucla.edu>

	numfmt: add support for new SI prefixes
	* src/dd, src/head.c, src/od.c, src/sort.c, src/stdbuf.c, src/tail.c:
	(usage):
	* src/system.h (emit_size_note):
	Mention new SI prefixes.
	* src/du.c (main):
	* src/head.c (head_file):
	* src/numfmt.c (suffix_power, suffix_power_char, prepare_padded_number):
	* src/shred.c (main):
	* src/sort.c (unit_order):
	* src/tail.c (parse_options):
	Support new SI prefixes.
	* src/numfmt.c (MAX_ACCEPTABLE_DIGITS): Increase to 33.
	(zero_and_valid_suffixes, valid_suffixes): New constants,
	with new SI prefixes.
	(valid_suffix, unit_to_umax): Use them.
	(prepare_padded_number): Diagnose "999Q" instead of "999Y".
	* tests/misc/numfmt.pl, tests/misc/sort.pl:
	Adjust tests to match new max.

	ls: adjust to Gnulib renaming
	* src/local.mk (src_ls_LDADD): In Gnulib,
	LIB_HAS_ACL was renamed to FILE_HAS_ACL_LIB.

	build: update gnulib submodule to latest

2023-01-03  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: avoid grep warning in sc_prohibit_test_minus_ao
	Newer grep(1) complains:
	  $ make sc_prohibit_test_minus_ao
	  /usr/bin/grep: warning: * at start of expression
	  prohibit_test_minus_ao

	* cfg.mk (exclude_file_name_regexp--sc_prohibit_test_minus_ao): Fix
	expression inroduced in v8.24-120-g3205bb178, and narrow down the file
	pattern to the 'doc/' directory.

2023-01-02  Pádraig Brady  <P@draigBrady.com>

	doc: copy: mention the reinstated I/O size constraints
	* NEWS: Mention the change in behavior re block size multiples
	to support unusual devices with this constraint.
	* src/copy.c (copy_reg): Likewise.

2023-01-02  Paul Eggert  <eggert@cs.ucla.edu>

	copy: fix possible over allocation for regular files
	* bootstrap.conf (gnulib_modules): Add count-leading-zeros,
	which was already an indirect dependency, since ioblksize.h
	now uses it directly.
	* src/ioblksize.h: Include count-leading-zeros.h.
	(io_blksize): Treat impossible blocksizes as IO_BUFSIZE.
	When growing a blocksize to IO_BUFSIZE, keep it a multiple of the
	stated blocksize.  Work around the ZFS performance bug.
	* NEWS: Mention the bug fix.
	Problem reported by Korn Andras at https://bugs.gnu.org/59382

2023-01-01  Pádraig Brady  <P@draigBrady.com>

	maint: update all copyright year number ranges
	Update to latest gnulib with new copyright year.
	Run "make update-copyright" and then...

	* tests/init.sh: Sync with gnulib to pick up copyright year.
	* bootstrap: Manually update copyright year,
	until we fully sync with gnulib at a later stage.
	* tests/sample-test: Adjust to use the single most recent year.

2023-01-01  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	mainly to get updated copyright year

	* tests/init.sh: Sync with gnulib

2022-12-31  Pádraig Brady  <P@draigBrady.com>

	stty: fix off by one column wrapping on output
	* src/stty.c (wrapf): Adjust the comparison by 1,
	to account for the space we're adding.
	* tests/misc/stty.sh: Add a test case.
	* NEWS: Mention the fix.
	Reported in https://bugs.debian.org/1027442

2022-12-31  Pádraig Brady  <P@draigBrady.com>

	copy: attempt copy offload with sparse files by default
	This was seen to vastly improve performance
	on NFS 4.2 systems by allowing server side copies,
	with partially sparse files (avidemux generated mp4 files).

	* src/copy.c (lseek_copy): Also set hole_size to 0,
	i.e. enable copy_file_range(), with --sparse=auto (the default),
	to enable copy offload in this case, as we've strong signal
	from SEEK_DATA that we're operating on actual data and not holes here.
	* NEWS: Mention the improvement.
	Fixes https://bugs.gnu.org/60416

2022-12-29  Pádraig Brady  <P@draigBrady.com>

	wc: fix regression determining file size
	* src/wc.c (wc): Use off_t rather than size_t
	when calculating where to seek to, so that
	we don't seek to a too low offset on systems
	where size_t < off_t, which would result in
	many read() calls to determine the file size.
	* tests/misc/wc-proc.sh: Add a test case
	sufficient for 32 bit systems at least.
	* NEWS: Mention the bug fix.
	Reported at https://bugs.debian.org/1027101

	maint: avoid recent syntax check failure
	* tests/cp/proc-short-read.sh: Adjust so shorter lines.

2022-12-26  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve doc of du with CoW etc
	Problem reported by Krzysztof Żelechowski (Bug#60335).
	* doc/coreutils.texi (du invocation): Reword.

	doc: improve du --threshold wording
	* doc/coreutils.texi (du invocation): Reword.

	tests: accommodate bogomips capitalizations
	* tests/cp/proc-short-read.sh: Kernel on ARMv7 Processor rev 3 (v7l)
	spells it "BogoMIPS", so allow any capitalization.  Patch from
	Zach van Rijn in <https://bugs.gnu.org/60339>.

2022-12-06  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	doc: timezone -> time zone

	doc: improve date -I doc
	Suggested by Marc Chantreux (bug#59827).
	* doc/coreutils.texi (Options for date):
	Give formats for -I, like we already do for --rfc-3339.

2022-12-05  Dennis Williamson  <dennis@netstrata.com>

	build: fix missing inclusion of poll.h on macOS
	* src/tail.c: Following on from commit v9.1-55-g324c188cf
	also include poll.h for __APPLE__, which was seen to be required
	on macOS 11.6

2022-11-29  Pádraig Brady  <P@draigBrady.com>

	doc: tee: make -p decription more complete
	* doc/coreutils.texi (tee invocation): Give a more
	cohesive description of the -p option, and how
	it differs from the default operation.

2022-11-20  Arsen Arsenović  <arsen@aarsen.me>

	scripts: commit-msg: recognize Git cut_lines
	This prevents spurious failures from happening when someone sets
	commit.verbose or passes -v to commit.

2022-11-15  Paul Eggert  <eggert@cs.ucla.edu>

	doc: more dash fixes
	* doc/coreutils.texi, doc/sort-version.texi: Prefer on "x -- y" to
	"x---y" in prose, as the result is more readable in Emacs.
	Fix some instances of unescaped ‘-’ that should be minus, not
	hyphen. Fix some other instances that should be en dash.  No
	spaces around en dash when it’s a range.

	maint: fix cfg.mk comment
	* cfg.mk (sc_texi_long_option_escaped): Fix comment.

2022-11-15  Pádraig Brady  <P@draigBrady.com>

	tests: make SIGPIPE trap checking more robust
	* init.cfg (trap_sigpipe_or_skip_): A subshell with ignored SIGPIPE
	was seen to not terminate, on Solaris 11 at least.
	So protect with a timeout(1).

	maint: avoid new grep -q syntax-check failures
	* cfg.mk: Exclude NEWS from the check.
	* init.cfg: s/grep -q/grep >/dev/null/.
	* tests/ls/hyperlink.sh: Likewise.
	* tests/ls/symlink-quote.sh: Likewise.

	maint: avoid misquoting of some --long-options in texi
	* cfg.mk (sc_texi_long_option_escaped): A new check to
	avoid future instances of this.
	* doc/coreutils.texi (Common options): Rearrange this menu
	to be less repetitive in each description, and avoid long lines.
	Addresses https://bugs.gnu.org/59262

2022-11-15  Paul Eggert  <eggert@cs.ucla.edu>

	doc: fix markup
	Problem reported by Antonio Diaz Diaz (bug#59262).
	* doc/coreutils.texi: Use markup in menus to prevent
	‘--’ from turning into an em dash, and to be more
	consistent.

	build: update gnulib submodule to latest

2022-10-28  Pádraig Brady  <P@draigBrady.com>

	doc: printf: make "java" encoding example more standard
	Note using iconv(1) rather than recode(1) is not appropriate
	for this example, as the required functionality is only
	available on libiconv's iconv implementation, which is
	not installed on most systems.

	* doc/coreutils.texi (printf invocation): Use env rather than
	/usr/local/bin for the printf command.  Escape '%' so more robust.
	Also use a locale that exists on modern systems.

2022-10-28  Pádraig Brady  <P@draigBrady.com>

	doc: move description of printf options to better location
	* doc/coreutils.texi (printf invocation): Move the description
	of accepted options from the middle of the unicode discussion.

2022-10-28  Pádraig Brady  <P@draigBrady.com>

	printf: with \U, support all valid unicode points
	Previously this was restricted to the C99 universal character subset,
	which restricted most values <= 0x9F, as that simplifies the C lexer.
	However printf(1) doesn't need this restriction.
	Note also the bash builtin printf already supports all values <= 0x9F.

	* src/printf.c (main): Relax the restriction on points <= 0x9F.
	* doc/coreutils.texi (printf invocation): Adjust description.
	* tests/misc/printf-cov.pl: Adjust accordingly.  Add new cases.
	* NEWS: Mention the change in behavior.
	Reported at https://bugs.debian.org/1022857

2022-10-26  Pádraig Brady  <P@draigBrady.com>

	doc: basenc: reference from base{32,64} docs
	* doc/coreutils.texi (base32 invocation): Reference basenc
	to improve discoverability.
	(base64 invocation): Likewise.
	* man/base32.x: Likewise.
	* man/base64.x: Likewise.

2022-09-30  Pádraig Brady  <P@draigBrady.com>

	doc: sort: mention --version useful for IPv4 addresses
	* doc/coreutils.texi (sort invocation): Mention in the
	multi invocation sort example that the -V GNU extension
	could be used to sort IPv4 addresses, and thus simplify
	to a single invocation.

2022-09-28  Pádraig Brady  <P@draigBrady.com>

	maint: NEWS: use consistent quoting
	* NEWS: Change unmatched curly quote to more consistent single quote.

	doc: be more consistent when documenting exit status
	* src/system.h (emit_exec_status): A new function to
	output standard "Exit status:" info for commands that exec others.
	* doc/coreutils.texi (Exit status): Add "ls" and "runcon"
	to the list of commands with non standard exit status.
	* src/numfmt.c (main): Call initialize_exit_failure() explicitly
	to better indicate this utility may exit with something other than
	EXIT_FAILURE.
	* src/timeout.c (usage): Use more consistent capitalization.
	* src/chroot.c: Call emit_exec_status().
	* src/env.c: Likewise.
	* src/nice.c: Likewise.
	* src/nohup.c: Likewise.
	* src/runcon.c: Likewise.
	* src/stdbuf.c: Likewise.

	runcon: fix inconsistent exit status upon write error
	* src/runcon.c (main): Call initialize_exit_failure(),
	so we use an appropriate exit status upon failure to close stdout.
	This should have been part of recent commit ea3ee6df.
	* tests/misc/help-version.sh: Adjust test case accordingly.

	maint: getlimits: diagnose invalid options
	* src/getlimits.c: Don't call initialize_exit_failure()
	as it's not needed for standard EXIT_FAILURE returns.
	Also use the function variant that diagnoses invalid options.

	maint: rmdir: also use DS_... constants here
	* src/rmdir.c: As with commit 627c9a97,
	use DS_NONEMPTY constant to improve readability.

2022-09-26  Pádraig Brady  <P@draigBrady.com>

	wc: add --total={auto,never,always,only} option
	without this option, control of when the total is output
	is quite awkward. Consider trying to suppress the total line,
	which could be achieved with something like:

	   wc-no-total() { wc "$@" /dev/null | head -n-2; }

	As well as being non obvious, it's also non general.
	It would give a non failure, but zero count if passed a file on stdin.
	Also it doesn't work in conjunction with the --files0-from option,
	which would need to be handled differently with something like:

	   { find files -print0; printf '%s\0' /dev/null; } |
	   wc --files0-from=- |
	   head -n2

	Also getting just the total can be awkward as file names
	are only suppressed when processing stdin, and
	also a total line is only printed if processing more than one file.
	For completness this might be achieved currently with:

	  wc-only-total() {
	    wc "$@" |
	    tail -n1 |
	    sed 's/^ *//; s/ [^ 0-9]*$//'
	  }

	* src/wc.c: Add new --total option.
	* tests/misc/wc-total.sh: New test suite for the new option.
	* tests/local.mk: Reference the new test.
	* doc/coreutils.texi (wc invocation): Document the new option.
	* THANKS.in: Add suggestor.
	* NEWS: Mention the new feature.

2022-09-25  Pádraig Brady  <P@draigBrady.com>

	maint: use enums to make dir_status code easier to read
	* src/system.h: Add DS_EMPTY, and DS_NONEMPTY enums.
	* src/remove.c: Use the new enums to make code easier to understand.

	doc: mention the recent rm improvement
	* NEWS: Mention the improvement re handling of directory errnos.

	maint: fix recent syntax-check failures
	* .gitignore: Add new headers from gnulib.
	* src/basenc.c: Adjust line length due to replacement
	of 'verify' with 'static_assert'.
	* src/od.c: Likewise.

2022-09-25  Paul Eggert  <eggert@cs.ucla.edu>

	rm: fix diagnostics on I/O error
	I ran into this problem when attempting to recursively
	remove a directory in a filesystem on flaky hardware.
	Although the underlying readdir syscall failed with errno == EIO,
	rm issued no diagnostic about the I/O error.

	Without this patch I see this behavior:

	  $ rm -fr baddir
	  rm: cannot remove 'baddir': Directory not empty
	  $ rm -ir baddir
	  rm: descend into directory 'baddir'? y
	  rm: remove directory 'baddir'? y
	  rm: cannot remove 'baddir': Directory not empty

	With this patch I see the following behavior, which
	lets the user know about the I/O error when rm tries
	to read baddir's directory entries:

	  $ rm -fr baddir
	  rm: cannot remove 'baddir': Input/output error
	  $ rm -ir baddir
	  rm: cannot remove 'baddir': Input/output error

	* src/remove.c (Ternary): Remove.  All uses removed.
	(get_dir_status): New static function.
	(prompt): Last arg is now directory status, not ternary.
	Return RM_USER_ACCEPTED if user explicitly accepted.
	All uses changed.
	Report any significant error in directory status right away.
	(prompt, rm_fts): Use get_dir_status to get directory status lazily.
	(excise): Treat any FTS_DNR errno as being more descriptive, not
	just EPERM and EACCESS.  For example, EIO is more descriptive.
	(rm_fts): Distinguish more clearly between explicit and implied
	user OK.
	* src/remove.h (RM_USER_ACCEPTED): New constant.
	(VALID_STATUS): Treat it as valid.
	* src/system.h (is_empty_dir): Remove, replacing with ...
	(directory_status): ... this more-general function.
	All uses changed.  Avoid undefined behavior of looking at
	a non-null readdir pointer after corresponding closedir.
	* tests/rm/rm-readdir-fail.sh: Adjust test of internals
	to match current behavior.

2022-09-25  Paul Eggert  <eggert@cs.ucla.edu>

	rm: fix readdir test
	* tests/rm/rm-readdir-fail.sh [_DIRENT_HAVE_D_NAMELEN]:
	Fix off-by-1 bug in directory entry length.

2022-09-20  Paul Eggert  <eggert@cs.ucla.edu>

	doc: fix typo in previous change

	doc: warn about tabs command (bug#57946)

2022-09-18  Stefan Kangas  <stefankangas@gmail.com>  (tiny change)

	all: prefer HTTPS to HTTP
	* README-hacking:
	* README-prereq:
	* THANKS.in:
	* doc/sort-version.texi (Other version/natural sort implementations):
	* gl/lib/rand-isaac.c:
	* gl/tests/test-rand-isaac.c:
	* src/operand2sig.c (operand2sig):
	* src/remove.c (nonexistent_file_errno):
	* tests/misc/env-signal-handler.sh:
	* tests/misc/sort-debug-warn.sh (LC_ALL): Prefer HTTPS to HTTP.
	Addresses https://bugs.gnu.org/56512

2022-09-18  Paul Eggert  <eggert@cs.ucla.edu>

	kill: port to picky-conversion hosts
	* src/kill.c (send_signals): Don’t rely on conversion overflow
	being silent.

2022-09-15  Paul Eggert  <eggert@cs.ucla.edu>

	maint: fix bootstrap module lists for alignof
	* bootstrap.conf (gnulib_modules): Remove alignof, which isn’t
	needed since coreutils source modules don’t include alignof.h.
	Add stdalign, since they depend on alignof working without
	stdalign.h.

	maint: prefer static_assert to verify
	* bootstrap.conf: Add assert-h.
	* gl/lib/randperm.c: Do not include verify.h.
	* gl/lib/randperm.c, src/basenc.c, src/dd.c, src/digest.c:
	* src/dircolors.c, src/expr.c, src/factor.c, src/ls.c, src/numfmt.c:
	* src/od.c, src/seq.c, src/shred.c, src/sort.c, src/stat.c:
	Prefer C23’s static_assert to nonstandard verify.
	* gl/modules/randperm (Depends-on): Add assert-h.

	maint: assume C23 alignof
	* gl/lib/randread.c, src/stat.c (print_statfs):
	No need to include stdalign.h, now that alignof is a keyword
	in C23 and Gnulib arranges for this.

	maint: don’t include config.h twice
	* gl/lib/fadvise.h, gl/lib/smack.h, src/blake2/blake2-impl.h:
	Do not include config.h from a .h file.  config.h is supposed
	to be included once, at the start of compilation and before
	any other file.

	build: update gnulib submodule to latest

2022-09-13  Álvar Ibeas  <a.ibeas@gmx.com>  (tiny change)

	doc: shred: minor fix
	* doc/coreutils.texi: Fix wording.

2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>

	maint: adjust to Gnulib stdbool C23 change
	* gl/lib/mbsalign.c, gl/lib/randread.c, gl/lib/targetdir.h:
	* gl/lib/xdectoint.c, gl/lib/xfts.c, gl/lib/xfts.h:
	* src/blake2/b2sum.c, src/copy.h, src/die.h, src/system.h:
	Don’t include <stdbool.h>, since Gnulib now emulates C23.

	build: update gnulib submodule to latest

2022-09-11  Pádraig Brady  <P@draigBrady.com>

	stty: give explicit error for unsupported asymmetric speeds
	* src/stty.c (check_speed): If difference input and output speeds
	are specified, then validate the system supports that, before
	interacting with the device.

	stty: fix false warnings from [io]speed settings
	* src/stty.c (eq_mode): A new function to compare
	equivalence of two modes.
	(main): Use eq_mode() rather than memcmp() to compare
	two modes. Also use stack variables rather than implicitly
	initialized static variables.  Also remove all uses of
	the SPEED_WAS_SET hack since we now more robustly compare modes.
	* NEWS: Update the [io]speed fix entry.
	Reported at https://bugs.debian.org/1019468

2022-09-02  Pádraig Brady  <P@draigBrady.com>

	maint: add lib/gmp.h to .gitignore
	* .gitignore: Add generated file.  Tested with:
	./configure --without-libgmp && make && git status

2022-08-31  Pádraig Brady  <P@draigBrady.com>

	stty: add an undocumented ---debug option for more info
	* src/stty.c (main): Move internal TESTING code that showed
	the new and old mode, upon failure to apply the new mode,
	to being runtime controlled with the ---debug option.
	Also augment the display to show which items were not
	set as expected.

	doc: stty: clarify that [-]drain is treated as an option
	* doc/coreutils.texi (stty invocation): Say that "drain"
	is treated as an option, rather than a line setting,
	and so option processing rules apply to it.
	Reported in https://bugs.debian.org/1018803

	stty: validate ispeed and ospeed arguments
	* src/stty.c (apply_settings): Validate [io]speed arguments
	against the internal accepted set.
	(set_speed): Check the cfset[io]speed() return value so
	that we validate against the system supported set.
	* tests/misc/stty-invalid.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Reported in https://bugs.debian.org/1018790

2022-08-29  Pádraig Brady  <P@draigBrady.com>

	maint: be defensive in avoiding gnulib's poll module
	* src/tail.c (check_output_alive): Add a guard that would
	trigger on most platforms, to detect if we're using the
	gnulib poll module.  That's currently problematic in the
	way it emulates poll() using select() and would cause
	issues on macOS and AIX at least as poll() is replaced there.

	tail: use poll() on macOS
	* src/tail.c (check_output_alive): poll() is the most commonly used
	interface, so use this on macOS also to minimize divergence.

2022-08-27  Pádraig Brady  <P@draigBrady.com>

	tests: runcon: fix new test to skip on non SELinux systems
	* tests/misc/runcon-compute.sh: Use our new internal error
	125 status to detect SELinux errors, and skip in this case.

	doc: NEWS: document recent comm fix, and runcon change
	* NEWS: Mention comm bug fix, and runcon change in behavior.

2022-08-27  Pádraig Brady  <P@draigBrady.com>

	tests: fix tests after recent runcon change
	Following commit v9.1-49-gea3ee6df2

	* tests/misc/invalid-opt.pl: Map runcon failure status to 125.
	* tests/misc/usage_vs_getopt.sh: Likewise.

2022-08-27  Pádraig Brady  <P@draigBrady.com>

	comm: fix NUL --output-delimiter with --total
	* src/comm.c (compare_files): Handle the single character
	--output-delimeter case separately so that NUL is appropriately
	handled.
	* doc/coreutils.texi (comm invocation): Fix the description
	of --output-delimiter to say an empty delimeter is treated
	as a NUL separator, rather than being disallowed.
	* tests/misc/comm.pl: Add a test case.
	Reported at https://bugs.debian.org/1014008

	maint: remove FIXME comment from timeout.c
	* src/timeout.c: We shouldn't hardcode `sh -c` as users
	can specify that if needed, so remove the comment.

	runcon: distinguish runcon specific errors in exit status
	* src/runcon.c: Use EXIT_CANCELED (125) instead of EXIT_FAILURE (1),
	so that errors specific to runcon can be distinguished,
	from those of the invoked program.
	* doc/coreutils.texi (runcon invocation): Fix the Exit status
	description to say we return 125 (not 127) for internal errors.
	* tests/misc/runcon-no-reorder.sh: Add a test case.

2022-08-13  Pádraig Brady  <P@draigBrady.com>

	doc: README: split out ancillary information
	The README was becoming too long and contained
	quite a bit of info only pertaining to rarely used systems, so...

	* README: Split out install specific info to README-install.
	Also remove a few stale lines, and reorder a few items.
	* README-install: A new file split from README.
	* Makefile.am [EXTRA_DIST]: Explicitly reference new README-install
	file for distribution, since automake only auto adds README.
	* TODO: Reference the HPUX info now in README-install.

2022-08-13  Pádraig Brady  <P@draigBrady.com>

	ls: support explicit --time=modification selection
	* src/ls.c [time_args]: Add support for explicit
	'mtime' or 'modification' arguments to --time.
	* tests/misc/ls-time.sh: Add explicit --time=mtime usage.
	* doc/coreutils.texi (ls invocation): Describe --time=mtime.
	* NEWS: Mention the new feature.

2022-08-12  Pádraig Brady  <P@draigBrady.com>

	doc: ls: clarify description of timestamps
	* src/ls.c (usage): Don't mention "modification" in the
	description of ctime (-c), as it's confusing with mtime.
	Mention "metadata" when discussing "change" time to
	disambiguate from data change time.
	* doc/coreutils.texi (ls invocation): State that --time=creation
	falls back to using mtime where not available.

2022-08-01  Pierre Marsais  <pierre.marsais@lse.epita.fr>

	doc: cp: fix --reflink=when typo in texinfo
	This behaviour is correctly documented when doing `cp --help`.
	There is no `--reflink=when` option.

	* doc/coreutils.texi (cp invocation): Fix document stating
	that `--reflink` is equivalent to `--reflink=always`.

2022-08-01  Pádraig Brady  <P@draigBrady.com>

	doc: uniq: clarify -f operation
	* doc/coreutils.texi (uniq invocation): State that leading blanks
	are part of the field, and also that -f is one based.

2022-07-30  Pádraig Brady  <P@draigBrady.com>

	doc: reference fmt(1) from fold(1)
	* man/fold.x: fold and fmt have overlapping functionality,
	so reference fmt(1) from the lower level fold(1) utility.

2022-07-27  Paul Eggert  <eggert@cs.ucla.edu>

	touch: fix aliasing bug
	Problem reported by Tim Lange in:
	https://lists.gnu.org/r/coreutils/2022-07/msg00008.html
	* src/touch.c (date_relative): Rename from get_reldate,
	and use a functional style to fix the aliasing bug.

2022-07-26  Pádraig Brady  <P@draigBrady.com>

	doc: env: clarify that empty signal args are ignored
	It's useful to treat empty and missing arguments differently.
	Missing means all signals, while empty means no signals and
	so is a no-op.  It's useful to treat empty arguments like
	this, so that dynamically specified arguments like the following
	are supported

	  env --ignore-signals "$SIGS_TO_IGNORE"

	Note `env --ignore-signals=` is treated as an empty argument.

	* doc/coreutils.texi (env invocation): Empty args are treated
	differently to missing arguments, so call that out explicitly.
	* src/env.c (usage): Likewise.
	Addresses https://bugs.debian.org/1016049

2022-07-24  Pádraig Brady  <P@draigBrady.com>

	doc: date: clarify which options are mutually exclusive
	* src/date.c (usage): Specify that --date, --file, --reference,
	and --resolution are mutually exclusive.  This is also useful
	documentation to group similar options.
	* doc/coreutils.texi (Options for date): Likewise.
	Addresses https://bugs.gnu.org/55401

	date: --debug: diagnose discarded -d or -s options
	* src/date.c: (main): Track and diagnose whether any
	-d or -s options are dropped, as users may think
	multiple options are supported, given they can be relative.
	* tests/misc/date-debug.sh: Add a test case.
	* NEWS: Mention the improvement.

	runcon: ensure --compute runs the file it inspects
	* src/runcon.c (main): With -c avoid searching the path
	to ensure the file specified to --compute is executed.
	* tests/misc/runcon-compute.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the bug fix.
	Reported in https://bugs.debian.org/1013924

	doc: tr: clarify that -t is ignored unless translating
	* src/tr.c (usage): Don't say that -t is disallowed unless translating.
	Reported in https://bugs.debian.org/1012447

2022-07-23  Paul Eggert  <eggert@cs.ucla.edu>

	rm: don’t assume st_size is nonnegative
	* src/remove.c: Include stat-time.h.
	(cache_fstatat, cache_stat_init): Use negative st->st_atim.tv_sec to
	determine whether the stat is cached, not negative st->st_size.
	On non-POSIX platforms that lack st_atim.tv_sec, don’t bother to cache.

2022-07-22  Paul Eggert  <eggert@cs.ucla.edu>

	stat: -c %s now prints unsigned
	* src/stat.c (unsigned_file_size): New static function,
	copied from src/ls.c.
	(print_stat): %s prints an unsigned value now (Bug#56710).

2022-07-07  Paul Eggert  <eggert@cs.ucla.edu>

	dd: doc improvement (Bug#54586)
	* doc/coreutils.texi (dd invocation): Explain
	fdatasync and fsync better.

2022-07-06  Paul Eggert  <eggert@cs.ucla.edu>

	cp: don’t remove nonempty cloned dest
	This follows up on comments by Pádraig Brady (bug#56391).
	* src/copy.c (copy_reg): When --reflink=always removes a file
	due to an FICLONE failure, do not remove a nonempty file.

2022-07-05  Paul Eggert  <eggert@cs.ucla.edu>

	cp: don’t create empty file if cannot clone
	* src/copy.c (copy_reg): With --reflink=always, if FICLONE fails
	on a file we just created, clean up by removing the file (Bug#56391).

2022-07-04  Ivan Radić  <ivan-radic@users.noreply.github.com>

	maint: fix comment typo
	* src/uniq.c: s/preceges/precedes/

2022-06-24  Paul Eggert  <eggert@cs.ucla.edu>

	shuf: better diagnostic for ‘shuf -i -10-10’
	* src/shuf.c: Do not include xdectoint.h.
	(main): Improve diagnostic for ‘shuf -i -10-10’.  Without this
	patch, the diagnostic was “shuf: invalid input range: ‘’” which is
	not helpful.  Now it is “shuf: invalid input range: ‘-10-10’”.

2022-06-23  Jim Meyering  <meyering@fb.com>

	cp: avoid -Wmaybe-uninitialized warning from GCC13
	* src/copy.c (infer_scantype): Always set scan_inference.ext_start,
	to make the code match the comment.

	maint: remove unnecessary inclusion of hash.h
	* src/cut.c: Don't include hash.h. The implementation was
	changed not to need that in v8.21-43-g3e466ad05.

2022-06-21  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer POSIX-compatible EREs
	* cfg.mk (begword, endword): New macros.
	(sc_prohibit_stat_macro_address, sc_prohibit_fail_0)
	(sc_prohibit_short_facl_mode_spec, sc_require_stdio_safer)
	(sc_prohibit_sleep, sc_prohibit_framework_failure)
	(sc_marked_devdiagnostics):
	* build-aux/gen-single-binary.sh:
	Prefer POSIX-compatible EREs to GNU extensions like \w and \<.

2022-06-11  Paul Eggert  <eggert@cs.ucla.edu>

	cp: fix ‘cp -rx / /mnt’
	Problem reported by pkoraou@gmail.com (Bug#55910).
	* src/copy.c (copy_internal): Treat a relative destination name ""
	as if it were "." for the purpose of directory-relative syscalls
	like fstatat that might might refer to the destination directory.

2022-06-04  Paul Eggert  <eggert@cs.ucla.edu>

	maint: avoid \] in REs
	* cfg.mk (sc_dd_max_sym_length, sc_prohibit_man_see_also_period):
	Do not rely on undefined interpretation of \] in regular expressions.

	build: update gnulib submodule to latest
	* bootstrap: Copy from latest Gnulib.
	* tests/misc/ls-misc.pl (v_files): Adjust to new Gnulib behavior.

2022-05-26  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: fix spelling in NEWS entry
	* NEWS: s/x86-64/x86_64/

2022-05-25  Paul Eggert  <eggert@cs.ucla.edu>

	maint: spelling fix

	sort: tune diff_reversed
	* src/sort.c (diff_reversed): Tune.  On x86-64 with GCC, this
	saves a conditional branch and shortens the generated machine code.

	sort: refactor tricky diff reversal
	* src/sort.c (diff_reversed): New function, to make the intent clearer.
	(keycompare, compare): Use it.

2022-05-25  Pádraig Brady  <P@draigBrady.com>

	maint: sort.c: fix syntax-check issue in recent commit
	* src/sort.c (keycompare): Avoid useless if before free()
	as detected with sc_avoid_if_before_free.

	sort: fix issue with -rk in previous commit
	* src/sort.c (keycompare): Fix typo causing -r to be
	effectively ignored with -k.
	Fixes https://bugs.gnu.org/55622

2022-05-18  Paul Eggert  <eggert@cs.ucla.edu>

	sort: fix unlikely int overflow with -r
	* src/sort.c (keycompare, compare): Don’t overflow if -r is
	specified and a comparison function returns INT_MIN, as this
	causes the comparison to have undefined behavior (typically the
	reverse of correct).  glibc memcmp on s390x reportedly returns
	INT_MIN in some cases, so this is not a purely academic issue.

	maint: simplify comparisons
	* src/comm.c (compare_files):
	* src/join.c (keycmp):
	* src/ls.c (off_cmp):
	* src/ptx.c (compare_words, compare_occurs):
	* src/set-fields.c (compare_ranges):
	Prefer ((a > b) - (a < b)) to variants like (a < b ? -1 : a > b)
	as it’s typically faster these days.

	sort: remove some gotos
	* src/sort.c (keycompare): Rework to avoid gotos.
	This also shrinks the machine code a bit (112 bytes)
	with GCC 12 x86-64 -O2.  Nowadays compilers are smart
	enough to coalesce jumps so we need not do it by hand.

	sort: pacify GCC 12 false positive
	* src/sort.c (keycompare): Rework to pacify a GCC 12
	-Wmaybe-uninitialized false positive, by coalescing some minor
	duplicate code and eliminating a branch.  This should execute an
	insn or two less in the usual case.

	build: update gnulib submodule to latest

2022-05-09  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>

	factor: --exponents: new option for printing in p^e format
	When factoring numbers that have a large 2^n factor, it can be hard to
	eyeball just how many 2's there are. Add an option to print each prime
	power factor in the p^e format (omitting the exponent when it is 1).

	* src/factor.c: Add -h, --exponents option for printing in p^e format.
	* doc/coreutils.texi (factor invocation): Document the new option.
	* tests/misc/factor.pl: Add test case.
	* THANKS.in: Add previous suggester
	(https://lists.gnu.org/r/coreutils/2017-11/msg00015.html).

	Suggested-by: Emanuel Landeholm <emanuel.landeholm@gmail.com>

2022-05-02  Pádraig Brady  <P@draigBrady.com>

	tests: sort-NaN-infloop: augment testing for recent fix
	* tests/misc/sort-NaN-infloop.sh: Add test case from
	https://unix.stackexchange.com/a/700967/37127
	* src/sort.c: Avoid syntax-check failure.

2022-05-02  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	sort: fix sort -g infloop again
	Problem reported by Giulio Genovese (Bug#55212).
	* src/sort.c (nan_compare): To compare NaNs, simply printf+strcmp.
	This avoids the problem of padding bits and unspecified behavior.
	Args are now long double instead of char *; caller changed.

2022-04-21  Paul Eggert  <eggert@cs.ucla.edu>

	mv: test Bug#55029
	* tests/mv/backup-dir.sh: New test for Bug#55029,
	reported by Steve Ward.

	build: update gnulib submodule to latest

2022-04-20  Paul Eggert  <eggert@cs.ucla.edu>

	pr: don’t use uninitialized var
	Found with -flto and --enable-gcc-warnings.
	* src/pr.c (getoptarg): Fix misuse of xstrtol, which does not
	necessarily set tmp_long on errror, and does not set errno in any
	reliable way.  The previous code might access uninitialized
	storage; on typical platforms this merely causes it to possibly
	print the wrong diagnostic.

2022-04-19  Paul Eggert  <eggert@cs.ucla.edu>

	doc: fix ' and ` in PDF output of code
	* doc/coreutils.texi: Set txicodequoteundirected and
	txicodequotebacktick so that ' and ` in code examples appear
	as-is, rather than being transliterated to ’ and ‘.  E.g., prefer
	“... this is equivalent to ‘tr '\303\266' '\305\201'’ and ...” to
	“... this is equivalent to ‘tr ’\303\266’ ’\305\201’’ and ...”
	in PDF output.

	doc: fix footnote formats
	* doc/coreutils.texi: Reword footnote, or put it right next
	to previous punctuation.

	doc: prefer ö to $'\u7530'
	* doc/coreutils.texi (Character arrays): Avoid using shell
	notation like $'\u7530' since this isn’t in POSIX yet. Instead,
	use ö and Ł which should work in all texinfo output formats.

2022-04-17  Pádraig Brady  <P@draigBrady.com>

	doc: rmdir: clarify --ignore-fail-on-non-empty operation
	This option has changed from ignoring only ENOTEMPTY|EEXIST
	(i.e. ignore errors _solely_ due to dir not empty),
	to ignoring some other errors from more protected dirs
	that are not empty.  That adjustment was made to better
	support use with --parents, to essentially remove as much of
	a hierarchy as possible, without erroring as we hit more
	protected non empty parent dirs.
	That functionality adjustment was originally discussed at:
	https://lists.gnu.org/r/bug-coreutils/2008-01/msg00283.html

	* src/rmdir.c (usage): Adjust to be more accurate to current behavior.
	Also adjust --parents option to be easier to read.
	* doc/coreutils.texi (rmdir invocation): Likewise.
	Reported at https://github.com/coreutils/coreutils/issues/40

2022-04-15  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.1
	* NEWS: Record release date.

2022-04-15  Pádraig Brady  <P@draigBrady.com>

	doc: avoid unicode errors in texi conversion
	Avoid "Unicode character U+#1 not supported, sorry" error
	when converting from texi to dvi or pdf.

	* doc/coreutils.texi (tr invocation): Avoid the @U{XXXX}
	texi representation, as even though info and html can represent
	these characters directly, there are conversion errors
	for pdf and dvi.  Instead use the more abstract shell
	$'\uXXXX' representation.

2022-04-14  Pádraig Brady  <P@draigBrady.com>

	build: copy: fix build on macos 10.12
	* src/copy.c (copy_reg): Handle the case where CLONE_NOOWNERCOPY
	is not defined.
	Reported by Jeffrey Walton

2022-04-13  Pádraig Brady  <P@draigBrady.com>

	tail: detect closed stdout on Solaris
	* src/tail.c (check_output_alive): Use poll() on Solaris.
	Also handle POLLHUP, which Solaris returns in this case.
	* tests/tail-2/pipe-f.sh: Use `head -n2` rather than `sed 2q`
	as Solaris sed does not exit in this case.
	* NEWS: Mention the improvement.
	Reported by Bruno Haible.

	maint: syntax-check: fix preprocessor indentation
	* gl/lib/targetdir.h: Keep '#' at start of line.

2022-04-13  Paul Eggert  <eggert@cs.ucla.edu>

	cp,mv,install: omit an ‘inline’
	* gl/lib/targetdir.c (target_directory_operand):
	Omit unnecessary ‘inline’.

	cp,mv,install: improve EACCES targetdir messages
	This improves on the fix for --target-directory diagnostics bugs on
	Solaris 11.  Problem reported by Bruno Haible and Pádraig Brady; see:
	https://lists.gnu.org/r/coreutils/2022-04/msg00044.html
	Also, omit some unnecessary stat calls.
	* gl/lib/targetdir.c (target_directory_operand): If !O_DIRECTORY,
	do not bother calling open if stat failed with errno != EOVERFLOW.
	Rename is_a_dir to try_to_open since that’s closer to what it means.
	If the open failed with EACCES and we used O_SEARCH, look at stat
	results to see whether errno should be ENOTDIR for better diagnostics.
	Treat EOVERFLOW as an “I don’t know whether it’s a directory and
	there’s no easy way to find out” rather than as an error.

	cp,mv,install: avoid excess stat calls on non-GNU
	* gl/lib/targetdir.c (target_directory_operand): New arg ST.
	All callers changed.
	* src/cp.c (do_copy):
	* src/mv.c (main):
	Avoid unnecessary stat call if target_directory_operand already
	got the status.

	cp,mv,install: modularize targetdir
	Move target directory code out of system.h to a new targetdir module.
	This doesn’t change functionality.
	* bootstrap.conf (gnulib_modules): Add targetdir.
	* src/cp.c, src/install.c, src/mv.c: Include targetdir.h.
	* src/system.h (must_be_working_directory, target_directory_operand)
	(targetdir_dirfd_valid): Move from here ...
	* gl/lib/targetdir.c, gl/lib/targetdir.h, gl/modules/targetdir:
	... to these new files.

2022-04-13  Pádraig Brady  <P@draigBrady.com>

	cp,mv,install: avoid EACCES with non directory destination
	* src/system.h (target_directory_operand): Also check with stat()
	on systems with O_SEARCH, to avoid open("file", O_SEARCH|O_DIRECTORY)
	returning EACCES rather than ENOTDIR, which was seen on Solaris 11.4
	when operating on non dirs without execute bit set.
	* NEWS: Remove related bug entry, as that issue was only introduced
	after coreutils v9.0 was released.
	Reported by Bruno Haible.

	sync: support syncing files on cygwin
	* src/sync.c (sync_arg): Similarly to AIX, Cygwin 2.9.0
	was seen to need write access to have permission to sync a file.

	tests: cygwin: handle ENOENT from execvp(".")
	* tests/misc/env.sh: Verify with another command that
	execvp() doesn not return ENOENT, before testing the
	exit code from the command in question.
	* tests/misc/nice-fail.sh: Likewise.
	* tests/misc/stdbuf.sh: Likewise.
	* tests/misc/timeout-parameters.sh: Likewise.

	tests: env-S.pl: unset cygwin hardwired env vars
	* tests/misc/env-S.pl: Unset SYSTEMROOT and WINDIR.

2022-04-12  Pádraig Brady  <P@draigBrady.com>

	tests: md5sum: fix false failures on cygwin
	* tests/misc/md5sum-newline.pl: Avoid binary '*' tags when
	comparing checksums.
	* tests/misc/md5sum-bsd.sh: Avoid binary '*' tags so that we correctly
	trigger the ambiguity test.
	Reported by Bruno Haible

2022-04-11  Pádraig Brady  <P@draigBrady.com>

	tests: b2sum.sh: fix false failure on cygwin
	* tests/misc/b2sum.sh: Avoid binary '*' tags when comparing checksums.
	Reported by Bruno Haible

	tests: dircolors.pl: avoid false failure with TERM=dumb
	* tests/Coreutils.pm: Ensure an unset $TERM env var,
	which is required on perl 5.22.2 on Solaris 11 OpenIndiana at least,
	where TERM was being reset to 'dumb'.
	Reported By Bruno Haible.

	tests: printf-mb.sh: fix false failure with french translations
	* tests/misc/printf-mb.sh: As per commit 04148c99c,
	adjust non C warnings before comparison, to those of LC_MESSAGES=C.
	Reported by Adam Sampson

2022-04-10  Pádraig Brady  <P@draigBrady.com>

	tests: stty.sh: skip on systems without perl
	* init.cfg (stty_reversible_init_): Add require_perl_
	to ensure we skip rather than error, without perl.

2022-04-09  Pádraig Brady  <P@draigBrady.com>

	cp,mv,install: avoid opening non directory destination
	commit v9.0-66-ge2daa8f79 introduced an issue, for example
	where cp could hang when overwriting a destination fifo,
	when it would try to open() the fifo on systems
	like Solaris 10 that didn't support the O_DIRECTORY flag.

	This is still racy on such systems, but only in the
	case where a directory is replaced by a fifo in
	the small window between stat() and open().

	* src/system.h (target_directory_operand): On systems without
	O_DIRECTORY, ensure the file is a directory before attempting to open().
	* tests/cp/special-f.sh: Protect cp with timeout(1),
	as cp was seen to hang when trying to overwrite an existing fifo.
	* NEWS: Mention the bug fix.

2022-04-09  Pádraig Brady  <P@draigBrady.com>

	doc: install --compare: clarify mode of operation
	* doc/coreutils.texi (install invocation): For the --compare option,
	clarify that the ownership or permissions of the source files don't
	matter.  Also don't imply --owner or --group need to be specified
	for --compare to be effective.
	* src/install.c (usage): Add more detail on what's being compared.
	Fixes https://bugs.gnu.org/50889

2022-04-08  Pádraig Brady  <P@draigBrady.com>

	doc: remove older ChangeLog items
	* Makefile.am: Update the oldest documented version
	to 8.27 which is now about 5 years old.

2022-04-08  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: remove obsolete statat gnulib module
	* bootstrap.conf (gnulib_modules): Remove statat.

2022-04-07  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest
	* src/copy.c: Replace deprecated {l,}statat(), with fstatat().
	* src/cp.c: Likewise.
	* src/install.c: Likewise.
	* src/remove.c: Likewise.

2022-04-04  Pádraig Brady  <P@draigBrady.com>

	factor: improve support on RISCV and loongson
	* src/longlong.h: Pull in RISCV fix and loongarch64 support from
	https://gmplib.org/repo/gmp/log/tip/longlong.h

2022-04-03  Pádraig Brady  <P@draigBrady.com>

	doc: describe `dd iseek` as a feature not a change
	* NEWS: Move description from "Changes in behavior"
	to "New features".

2022-04-03  Pádraig Brady  <P@draigBrady.com>

	ls: avoid expensive capability lookup by default
	Lookup of file-based capabilities adds 30% overhead to the common
	case of ls --color usage.  Since the use of file capabilities is
	very rare, it doesn't make sense to pay this cost in the common
	case.  It's better to use getcap to inspect capabilities, and the
	following run shows only 8 files using capabilities on my fedora
	35 distro (14 years after the feature was introduced to the linux
	kernel).

	  $ getcap -r /
	  /usr/bin/arping = cap_net_raw+p
	  /usr/bin/clockdiff = cap_net_raw+p
	  /usr/bin/gnome-keyring-daemon = cap_ipc_lock+ep
	  /usr/bin/gnome-shell = cap_sys_nice+ep
	  /usr/bin/newgidmap = cap_setgid+ep
	  /usr/bin/newuidmap = cap_setuid+ep
	  /usr/sbin/mtr-packet = cap_net_raw+ep
	  /usr/sbin/suexec = cap_setgid,cap_setuid+ep

	* src/dircolors.hin: Set "CAPABILITY" to "00", to indicate unused.
	* src/ls.c: Set the default C_CAP color to not colored.
	* NEWS: Mention the change in behavior.

2022-04-03  Ville Skyttä  <ville.skytta@iki.fi>

	dircolors: colorize backup files with bright black
	* src/dircolors.hin: Add patterns for suffixes for "backup files".
	The color used is so they stand out less than non-backup files,
	and bright black works well on both light and dark backgrounds.
	* THANKS.in: Remove duplicate.
	Fixes https://bugs.gnu.org/54521

2022-03-29  Pádraig Brady  <P@draigBrady.com>

	doc: join: clarify that -e only effective for -12jo fields
	* src/join.c (usage): Clarify that -e is not sufficient
	to enable output of missing fields from one of the inputs.
	Rather the -12jo options are required to explicitly
	enable output of those fields.
	Fixes https://bugs.gnu.org/54625

2022-03-25  Pádraig Brady  <P@draigBrady.com>

	maint: sync latest bootstrap from gnulib
	* bootstrap: Should have updated this with the last gnulib update.

2022-03-20  Pádraig Brady  <P@draigBrady.com>

	tests: improve recent printf test
	* tests/misc/printf-mb.sh: Given we shortcut the single char
	(invalid multi-byte) case, add a case to ensure we're correctly
	checking the return from mbrtowc().

2022-03-19  Pádraig Brady  <P@draigBrady.com>

	printf: support printing the numeric value of multi-byte chars
	* src/printf.c (STRTOX): Update to support multi-byte chars.
	* tests/misc/printf-mb.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the improvement.
	Fixes https://bugs.gnu.org/54388

2022-03-18  Pádraig Brady  <P@draigBrady.com>

	maint: move build-related NEWS item to its own section
	* NEWS: Follow other Build-related patterns in NEWS.

2022-03-12  Pádraig Brady  <P@draigBrady.com>

	doc: test: clarify that -rwx don't just check perm bits
	* src/test.c (usage): State that -rwx is determined by
	user access, rather than permission bits.
	* doc/coreutils.texi (Access permission tests): Likewise.
	* man/test.x [SEE ALSO]: access(2).
	Fixes https://bugs.gnu.org/54338

2022-03-07  Pádraig Brady  <P@draigBrady.com>

	maint: address syntax-check issues in recent commit
	* cfg.mk (sc_die_EXIT_FAILURE): Generalize to match any EXIT_ define,
	and also relax to ignore error() usage with ternary operator.
	* src/chroot.c (main): Use () to avoid the sc_error_quotes check.

2022-03-07  Pádraig Brady  <P@draigBrady.com>

	stat: only automount with --cached=never
	Revert to the default behavior before the introduction of statx().

	* src/stat.c (do_stat): Set AT_NO_AUTOMOUNT without --cached=never.
	* doc/coreutils.texi (stat invocation): Mention the automount
	behavior with --cached=never.
	* NEWS: Mention the change in behavior.

	Fixes https://bugs.gnu.org/54287

2022-03-07  Rohan Sable  <rsable@redhat.com>

	ls: avoid triggering automounts
	statx() has different defaults wrt automounting
	compared to stat() or lstat(), so explicitly
	set the AT_NO_AUTOMOUNT flag to suppress that behavior,
	and avoid unintended operations or potential errors.

	* src/ls.c (do_statx): Pass AT_NO_AUTOMOUNT to avoid this behavior.
	* NEWS: Mention the change in behavior.
	Fixes https://bugs.gnu.org/54286

2022-03-07  Pádraig Brady  <P@draigBrady.com>

	build: ensure AT_NO_AUTOMOUNT is defined
	update gnulib submodule to latest,
	where this is the only change

2022-03-05  Paul Eggert  <eggert@cs.ucla.edu>

	date: fix newly-introduced %%-N bug
	* src/date.c (adjust_resolution): Don’t mishandle %%-N.
	* tests/misc/date.pl (pct-pct): New test.

2022-02-25  Paul Eggert  <eggert@cs.ucla.edu>

	chown: warn about USER.GROUP
	Suggested by Dan Jacobson (Bug#44770).
	* src/chown.c, src/chroot.c (main):
	Issue warnings if obsolete USER.GROUP notation is present.

	build: update gnulib submodule to latest

2022-02-24  Pádraig Brady  <P@draigBrady.com>

	fmt: fix invalid multi-byte splitting on macOS
	On macOS, isspace(0x85) returns true,
	which results in splitting within multi-byte characters.

	* src/fmt.c (get_line): s/isspace/c_isspace/.
	* tests/fmt/non-space.sh: Add a new test.
	* tests/local.mk: Reference new test.
	* NEWS: Mention the fix.
	Addresses https://bugs.gnu.org/54124

2022-02-24  Pádraig Brady  <P@draigBrady.com>

	tests: improve compat with macOS
	* tests/misc/wc-nbsp.sh: Only the en_US.iso8859-1 form
	is accepted on macOS 10.15.7 at least.  GNU/Linux also
	accepts ISO-8859-1 (and canonicalizes the charmap to this).

2022-02-23  Paul Eggert  <eggert@cs.ucla.edu>

	dd: counts ending in "B" now count bytes
	This implements my suggestion in Bug#54112.
	* src/dd.c (usage): Document the change.
	(parse_integer, scanargs): Implement the change.
	Omit some now-obsolete checks for invalid flags.
	* tests/dd/bytes.sh: Test the new behavior, while retaining
	checks for the now-obsolete usage.
	* tests/dd/nocache_eof.sh: Avoid now-obsolete usage.

2022-02-22  Paul Eggert  <eggert@cs.ucla.edu>

	dd: improve doc relative to POSIX
	* doc/coreutils.texi (dd invocation): Improve documentation,
	clarifying whether features are extensions to POSIX.

	dd: support iseek= and oseek=
	Alias iseek=N to skip=N, oseek=N to seek=N (Bug#45648).
	* src/dd.c (scanargs): Parse iseek= and oseek=.
	* tests/dd/skip-seek.pl (sk-seek5): New test case.

2022-02-21  Paul Eggert  <eggert@cs.ucla.edu>

	cp: avoid unnecessary buffer allocation
	Do not allocate I/O buffer if copy_file_range suffices.
	* src/copy.c (sparse_copy, lseek_copy): Buffer arg is now char **
	instead of char *, and buffer is now allocated only if needed.
	All uses changed.

2022-02-19  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2022-02-15  Pádraig Brady  <P@draigBrady.com>

	doc: env: fix man page reference of exec(2) to exec(3p)
	* man/env.x: Change exec() reference from section 2 to 3p.

2022-02-15  Pádraig Brady  <P@draigBrady.com>

	doc: use bold style for man page references
	It's more common to use bold style than not,
	for references to other man pages.
	Ideally each man page renderer would highlight references,
	but currently some rely on styles in the page itself.

	* man/help2man: Implement a --bold-refs option that
	will mark up references like "name(1)" with bold
	style around the "name" component.
	* man/local.mk: Pass --bold-refs to our help2man unless disabled.
	* configure.ac: Add a --disable-bold-man-page-references option.
	Addresses https://bugs.gnu.org/53977

2022-02-15  Pádraig Brady  <P@draigBrady.com>

	dircolors: speed up processing of TERM entries
	* src/dircolors.c (main): Avoid glob matching
	when we've already matched in a group of {COLOR,}TERM entries.

2022-02-15  Pádraig Brady  <P@draigBrady.com>

	dircolors: consider COLORTERM as well as TERM env vars
	COLORTERM is an environment used usually to expose truecolor support in
	terminal emulators.  Therefore support matches on that in addition
	to TERM.  Also set the default COLORTERM match pattern so that
	we apply colors if COLORTERM is any value.

	This implicitly supports a terminal like "foot"
	without a need for an explicit TERM entry.

	* NEWS: Mention the new feature.
	* src/dircolors.c (main): Match COLORTERM like we do for TERM.
	* src/dircolors.hin: Add default config to match any COLORTERM.
	* tests/misc/dircolors.pl: Add test cases.

2022-02-14  Paul Eggert  <eggert@cs.ucla.edu>

	tr: mention multibyte problem in man page
	* man/tr.x: Document tr problem.

	tr: improve multibyte etc. doc
	Problem reported by Dan Jacobson (Bug#48248).
	* doc/coreutils.texi (tr invocation): Improve documentation for
	tr's failure to support multibyte characters POSIX-style.
	* doc/coreutils.texi (tr invocation), src/tr.c (usage):
	Use terminology closer to POSIX's.

2022-02-13  Pádraig Brady  <P@draigBrady.com>

	dircolors: add --print-ls-colors to display colored entries
	* NEWS: Mention the new feature.
	* doc/coreutils.texi (dircolors invocation): Describe the new
	--print-ls-colors option.
	* src/dircolors.c (print_ls_colors): A new global to select
	between shell or terminal output.
	(append_entry): A new function refactored from dc_parse_stream()
	to append the entry in the appropriate format.
	(dc_parse_stream): Adjust to call append_entry().
	* tests/misc/dircolors.pl: Add test cases.

2022-02-13  Pádraig Brady  <P@draigBrady.com>

	chown,chgrp: reinstate numeric id output in -v messages
	since gnulib commit ff208d546a,
	related to coreutils commit v9.0-143-gabde15969
	we no longer maintain numeric IDs through chopt->{user,group}_name.
	Therefore we need to adjust to ensure tests/chown/basic.sh passes.

	* src/chown-core.c (uid_to_str, gid_to_str): New helper functions
	to convert numeric id to string.
	(change_file_owner): Use the above new functions to pass
	numeric ids to describe_change().

2022-02-13  Paul Eggert  <eggert@cs.ucla.edu>

	sort: fix several version-sort problems
	This also affects ls -v in some corner cases.
	Problems reported by Michael Debertol <https://bugs.gnu.org/49239>.
	While looking into this, I spotted some more areas where the
	code and documentation did not agree, or where the documentation
	was unclear.  In some cases I changed the code; in others
	the documentation.  I hope things are nailed down better now.
	* doc/sort-version.texi: Distinguish more carefully between
	characters and bytes.  Say that non-identical strings can
	compare equal, since they now can.  Improve readability in
	various ways.  Make it clearer that a suffix can be the
	entire string.
	* src/ls.c (cmp_version): Fall back on strcmp if filevercmp
	reports equality, since filevercmp is no longer a total order.
	* src/sort.c (keycompare): Use filenvercmp, to treat NULs correctly.
	* tests/misc/ls-misc.pl (v_files):
	Adjust test to match new behavior.
	* tests/misc/sort-version.sh: Add tests for stability,
	and for sorting with NUL bytes.

	build: update gnulib submodule to latest

2022-02-12  Pádraig Brady  <P@draigBrady.com>

	doc: avoid using "[" is URLS in --help output
	* src/system.h (emit_ancillary_info): While supported if entered
	  manually, the "[" character is not highlighted as part of a
	  URL by default in terminals, so avoid using it.
	  Addresses https://bugs.gnu.org/53946

	doc: adust --help, --version alignment
	* src/system.h: Adjust the alignment of the --help
	and --version option descriptions, to start at column 21.
	This better aligns with the descriptions of most commands,
	and also aligns with the minimum column a description must
	start at to ensure a blank line is not output when a description
	follows an option on a line by itself.

	doc: rmdir: improve --help formatting
	* src/rmdir.c (usage): Move description to column 21,
	so that a --long-option on its own line without a
	trailing description, doesn't have an erroneous blank
	line inserted between the option and description.
	Also group descriptions with blank lines rather than indents,
	so that man pages don't have erroneous blank lines
	added within the description.
	Addresses https://bugs.gnu.org/53946

	doc: ls: reference dircolors(1) from --help
	* src/ls.c (usage): s/dircolors/dircolors(1)/.
	* man/ls.x [SEE ALSO]: Reference dircolors(1).
	Addresses https://bugs.gnu.org/53946

	doc: ls: improve --help formatting
	* src/ls.c (usage): Use blank lines to group multi-line
	option descriptions, rather than indenting.
	This results in more consistent alignment of descriptions,
	and also avoids erroneous new lines in generated in man pages.
	Addresses https://bugs.gnu.org/53946

2022-02-08  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve version-sort doc
	* doc/coreutils.texi, doc/sort-version.texi:
	Capitalize “Coreutils”.
	* doc/sort-version.texi: Don’t emphasize natural sort so much,
	since Coreutils has just version sort.
	Use the term “lexicographic” instead of “alphabetic” or “standard”.
	Suggest combining ‘V’ with ‘b’, and show why ‘b’ is needed.
	Use shorter titles for sections, as GNU Emacs displays info poorly
	when titles are too long to fit in a line.
	Use @samp instead of @code for samples of data.
	Do not use @samp{@code{...}}; @samp{...} should suffice and
	double-nesting looks bad with Emacs.
	Omit blank lines in examples that would not be present
	in actual shell sessions.
	Quote with `` and '', not with " or with '.
	Mention dpkg --compare-versions more prominently.
	Don’t rely on "\n" being equivalent to "\\n" in shell args.
	Prefer Unicode name for hyphen-minus.

2022-02-07  Christian Hesse  <mail@eworm.de>

	dircolors: highlight .avif as image
	This add highlighting for AV1 Image File Format (AVIF):
	https://aomediacodec.github.io/av1-avif/

	* src/dircolors.hin: Highlight .avif as image.

2022-02-05  Paul Eggert  <eggert@cs.ucla.edu>

	date: test against bug#50115
	* tests/misc/date.pl: Add test.

	build: update gnulib submodule to latest

2022-02-05  Pádraig Brady  <P@draigBrady.com>

	doc: fix somewhat ambiguous date format representation
	* doc/coreutils.texi (date invocation): Remove @var{...} usage,
	as that capitalizes in the representation and thus somewhat
	ambiguates the format wrt Month and Minute.  This also avoids
	a syntax check failure about redundant capitalization in @var{}.

2022-02-05  Paul Eggert  <eggert@cs.ucla.edu>

	date: improve doc
	Problem reported by Dan Jacobson (Bug#51288).
	* doc/coreutils.texi (date invocation, Setting the time)
	(Options for date):
	* src/date.c (usage): Improve doc.

	build: update gnulib submodule to latest

2022-02-04  Paul Eggert  <eggert@cs.ucla.edu>

	id: print groups of listed name
	Problem reported by Vladimir D. Seleznev (Bug#53631).
	* src/id.c (main): Do not canonicalize user name before
	deciding what groups the user belongs to.

2022-02-01  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: add NEWS entry for recent cksum change
	* NEWS (Changes in behavior): Add entry for commit v9.0-92-ga42a03913.

2022-02-01  Paul Eggert  <eggert@cs.ucla.edu>

	maint: suppress bogus noreturn warnings
	* configure.ac: Move the single-binary code before the
	gcc-warnings code, so that the latter can depend on the former.
	Suppress -Wsuggest-attribute=noreturn with single binaries,
	to avoid diagnostics like the following:
	  src/expr.c: In function 'single_binary_main_expr':
	  error: function might be candidate for attribute 'noreturn'
	Problem reported by Pádraig Brady in:
	https://lists.gnu.org/r/coreutils/2022-01/msg00061.html

	tr: pacify -fsanitizer=leak
	* src/tr.c (main): Use main_exit, not return, in a couple of
	places missed last time.

	chgrp: fix typo in previous change
	* src/chgrp.c (main): Use main_exit, not exit.

	maint: mark some _Noreturn functions
	* src/basenc.c (finish_and_exit, do_encode, do_decode):
	* src/comm.c (compare_files):
	* src/tsort.c (tsort):
	* src/uptime.c (uptime):
	Mark with _Noreturn.  Otherwise, unoptimized compilations may warn
	that the calling renamed-main function doesn't return a value,
	when !lint and when single-binary.

	df: fix memory leak
	* src/df.c (devlist_free): Remove.
	(filter_mount_list): Free all of devlist, instead of merely
	the entries in devlist_table.

2022-01-31  Pádraig Brady  <P@draigBrady.com>

	maint: cut: avoid exporting recently added variable
	* src/cut.c: Make output_delimiter_default static,
	as identified by `make syntax-check`.

2022-01-31  Paul Eggert  <eggert@cs.ucla.edu>

	maint: pacify gcc -flto -Wmaybe-uninitialized
	* gl/lib/xdectoint.c (__xnumtoint): Tell gcc that ‘error’
	does not return here.
	* gl/modules/xdectoint (Depends-on): Add stdbool, verify.

	dd: do not access uninitialized
	* src/dd.c (parse_integer): Avoid undefined behavior
	that accesses an uninitialized ‘n’ when e == LONGINT_INVALID.
	Return more-accurate error code when INTMAX_MAX < n.

	uptime: simplify -fsanitize=leak pacification
	* src/uptime.c (uptime): Exit here ...
	(main): ... instead of here.

	uniq: remove IF_LINT
	* src/uniq.c (check_file): Remove a no-longer-needed IF_LINT.

	unexpand: remove IF_LINT
	* src/unexpand.c (unexpand): Remove a no-longer-needed IF_LINT.

	pr: remove IF_LINT
	* src/pr.c (read_line): Remove a no-longer-needed IF_LINT.

	truncate: simplify
	* src/truncate.c (do_ftruncate): Check != 0 instead of == -1.
	Avoid a cast.
	(main): Use C99 style decls after statements.
	Simplify ‘open’ logic.

2022-01-31  Paul Eggert  <eggert@cs.ucla.edu>

	shred: remove IF_LINT
	* src/shred.c (dopass): Remove a no-longer-needed IF_LINT.

	(read_line): Remove an IF_LINT; no longer needed with
	today’s GCC.

2022-01-31  Paul Eggert  <eggert@cs.ucla.edu>

	pr: simplify -fsanitize=leak pacification
	* src/pr.c (main): Remove an IF_LINT.
	Use main_exit rather than return.

	pinky: simplify -fsanitize=leak pacification
	* src/pinky.c (short_pinky): exit instead of freeing.

	paste: remove IF_LINT
	* src/paste.c (paste_parallel): Remove no-longer-needed IF_LINT.

	hostname: simplify
	* src/hostname.c (sethostname): Provide a substitute on all
	platforms, to simplify the mainline code.
	(main): Simplify.  Remove an IF_LINT.
	Use main_exit rather than return.

	factor: remove IF_LINT
	* src/factor.c (factor_using_squfof) [USE_SQUFOF]:
	Use plain assert (...), not IF_LINT (assert (...)).
	This code is currently never compiled or executed,
	so this is merely a symbolic cleanup.

	expand: remove IF_LINT
	* src/expand.c (expand): Remove no-longer-needed IF_LINT.

	env: simplify -fsanitize=leak pacification
	* src/env.c (unset_envvars): Remove IF_LINT code.
	(main): Use main_exit, not return.

	md5sum: remove IF_LINTs
	* src/digest.c (digest_check): Remove IF_LINTs that are no longer
	needed, as GCC has gotten smarter since 2008.

	df: simplify -fsanitize=leak pacification
	* src/df.c (print_table, main) [lint]: Omit unnecessary cleanup.
	(main): Use main_exit, not return.

	date: simplify -fsanitize=leak pacification
	* src/date.c (main) [lint]: Omit unnecessary cleanup.
	Use main_exit, not return.

	cut: simplify and remove an IF_LINT
	* src/cut.c (enum operating_mode, operating_mode)
	(output_delimiter_specified, cut_stream):
	Remove; no longer needed.
	(output_delimiter_default): New static var.  Code can now
	use ‘output_delimiter_string != output_delimiter_default’
	instead of ‘output_delimiter_specified’.
	(cut_file): New arg CUT_STREAM.  Caller changed.
	(main): Simplify.  Coalesce duplicate code.  Redo to avoid need
	for IF_LINT, or for the static var.  No need to xstrdup optarg.

	cut: simplify -fsanitize=leak pacification
	* src/set-fields.c (reset_fields): Remove, as it’s not needed for
	-fsanitize=leak even when ‘lint’ is defined.  All uses removed.

	cp: simplify GCC pacification
	* src/cp.c (make_dir_parents_private): Remove IF_LINT code that is
	no longer needed, as GCC has apparently gotten smarter since 2008.

	chown: simplify -fsanitize=leak pacification
	* src/chgrp.c, src/chown.c (main) [lint]: Omit unnecessary cleanup.
	Use main_exit, not return.

	basenc: simplify -fsanitize=leak pacification
	* src/basenc.c (finish_and_exit): New function.
	(do_encode, do_decode): Use it.  Accept new INFILE arg.  Remove
	no-longer-needed IF_LINT code.  Exit when done.  Caller changed.

	test: simplify gcc pacification
	* src/test.c (get_mtime) [lint]: Omit ifdef lint code that is no
	longer needed, as GCC has gotten smarter since 2005.

	tail: simplify -fsanitize=leak pacification
	Also, close a no-longer-needed file descriptor when falling
	back from inotify.
	* src/tail.c (tail_forever_inotify): Return void, not bool.  Exit
	on fatal error, or on successful completion.  Accept an extra
	argument pointing to a hash table that the caller should free on
	non-fatal error; this simplifies cleanup.  Don’t bother setting
	errno when returning.  Caller changed.
	(main): Omit no-longer-needed IF_LINT code.  Close inotify
	descriptor if inotify fails; this fixes a file descriptor leak and
	means we needn’t call inotify_rm_watch.  Use main_exit, not return.

	tac: simplify -fsanitize=leak pacification
	* src/tac.c (main) [lint]: Omit unnecessary cleanup.
	Use main_exit, not return.

	shuf: simplify -fsanitize=leak pacification
	* src/shuf.c (main) [lint]: Omit unnecessary cleanup.
	Use main_exit, not return.

	numfmt: simplify -fsanitize=leak pacification
	* src/numfmt.c (main) [lint]: Omit unnecessary cleanup.
	Use main_exit, not return.

	mktemp: simplify -fsanitize=leak pacification
	* src/mktemp.c (main) [lint]: Omit unnecessary cleanup.
	Use main_exit, not return.

	dd: simplify -fsanitize=leak pacification
	* src/dd.c (cleanup) [lint]: Omit unnecessary cleanup.
	(main): Use main_exit, not return.

	cp: simplify cp/install/ln/mv pacification
	* src/copy.c (dest_info_free, src_info_free) [lint]:
	Remove.  All uses removed.
	(copy_internal): Pacify only Clang and Coverity; GCC doesn’t need it.
	* src/cp-hash.c (forget_all) [lint]: Remove.  All uses removed.
	* src/cp.c, src/install.c, src/ln.c, src/mv.c (main):
	Use main_exit, not return.

	chmod: pacify -fsanitizer=leak
	* src/chmod.c (main): Use main_exit, not return.

	yes: pacify -fsanitizer=leak
	* src/yes.c (main): Use main_exit, not return.

	tsort: pacify -fsanitizer=leak
	* src/tsort.c (detect_loop): Free removed successor.

	sort: pacify -fsanitizer=leak
	* src/sort.c (pipe_fork, keycompare, sort, main):
	Remove lint code that no longer seems to be needed.
	(sort): Unconditionally compile ifdef lint code that is needed
	to free storage even when not linting.
	(main): Use main_exit, not return.

	split: pacify -fsanitizer=leak
	* src/split.c (lines_rr): New arg FILESP.  All uses changed.
	(main): Use main_exit, not return.  Omit unnecessary alignfree.

	ptx: pacify -fsanitizer=leak
	* src/ptx.c (unescape_string): Rename from copy_unescaped_string,
	and unescape the string in place.  Callers changed.  This way,
	we needn’t allocate storage and thus needn’t worry about
	-fsanitizer=leak.

	seq: pacify -fsanitizer=leak
	* src/seq.c (seq_fast): If successful, exit rather than returning true.
	Callers changed.
	(main): Use main_exit, not return.

	tsort: pacify -fsanitizer=leak
	* src/tsort.c (struct item.balance): Now signed char to save space.
	(struct item.printed): New member.
	(new_item): Initialize k->printed to false.  Simplify via xzalloc.
	(scan_zeros): Use k->printed rather than nulling out string.
	(tsort): Move exiting code here ...
	(main): ... from here.
	(tsort) [lint]: Omit no-longer-needed code.  Instead, set head->printed.

	tr: pacify -fsanitizer=leak
	* src/tr.c (main): Use main_exit, not return.

	stat: pacify -fsanitizer=leak
	* src/stat.c (main):  Use main_exit, not return.

	comm: pacify -fsanitizer=leak
	* src/comm.c (compare_files): Move exiting code here ...
	(main): ... from here, to pacify gcc -fsanitize=leak.

	expr: lint cleanup, and introducing main_exit
	This introduces a new macro main_exit, which is useful
	for pacifying gcc -fsanitizer=lint and in some cases
	means we can remove some ‘IF_LINT’ and ‘ifdef lint’ code.
	* src/expr.c (main): Use main_exit, not return.
	(docolon): Omit an IF_LINT that GCC no longer needs.
	* src/system.h (main_exit): New macro.

2022-01-30  Pádraig Brady  <P@draigBrady.com>

	cksum: use more exact selection of digest algorithms
	Use more constrained argument matching
	to improve forward compatibility and robustness.

	For example it's better that `cksum -a sha3` is _not_
	equivalent to `cksum -a sha386`, so that a user
	specifying `-a sha3` on an older cksum would not be surprised.

	Also argmatch() is used when parsing tags from lines like:
	SHA3 (filename) = abcedf....
	so it's more robust that older cksum instances to fail
	earlier in the parsing process, when parsing output from
	possible future cksum implementations that might support SHA3.

	* src/digest.c (algorithm_from_tag): Use argmatch_exact()
	to ensure we don't match abbreviated algorithms.
	(main): Likewise.
	* tests/misc/cksum-a.sh: Add a test case.

2022-01-30  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	To provide argmatch_exact() that does not
	use abbreviated matching, to be used by cksum.

2022-01-30  Paul Eggert  <eggert@cs.ucla.edu>

	mv: when installing to dir use dir-relative names
	When the destination for mv is a directory, use functions like openat
	to access the destination files, when such functions are available.
	This should be more efficient and should avoid some race conditions.
	Likewise for 'install'.
	* src/cp.c (must_be_working_directory, target_directory_operand)
	(target_dirfd_valid): Move from here ...
	* src/system.h: ... to here, so that install and mv can use them.
	Make them inline so GCC doesn’t complain.
	* src/install.c (lchown) [HAVE_LCHOWN]: Remove; no longer needed.
	(need_copy, copy_file, change_attributes, change_timestamps)
	(install_file_in_file, install_file_in_dir):
	New args for directory-relative names.  All uses changed.
	Continue to pass full names as needed, for diagnostics and for
	lower-level functions that do not support directory-relative names.
	(install_file_in_dir): Update *TARGET_DIRFD as needed.
	(main): Handle target-directory in the new, cp-like way.
	* src/mv.c (remove_trailing_slashes): Remove static var; now local.
	(do_move): New args for directory-relative names.  All uses changed.
	Continue to pass full names as needed, for diagnostics and for
	lower-level functions that do not support directory-relative names.
	(movefile): Remove; no longer needed.
	(main): Handle target-directory in the new, cp-like way.
	* tests/install/basic-1.sh:
	* tests/mv/diag.sh: Adjust to match new diagnostic wording.

	cp: fix comment typo

2022-01-28  Pádraig Brady  <P@draigBrady.com>

	doc: NEWS: explain _why_ copy_file_range() is used
	* NEWS: Mention why we're making the change in behavior in cat(1).

	build: update gnulib submodule to latest
	To fix a syntax-check false failure

2022-01-28  Paul Eggert  <eggert@cs.ucla.edu>

	dd: synchronize output after write errors
	Problem reported by Sworddragon (Bug#51345).
	* src/dd.c (cleanup): Synchronize output unless dd has been interrupted.
	(synchronize_output): New function, split out from dd_copy.
	Update conversions_mask so synchronization is done at most once.
	(main): Do not die with the output file open, since we want to be
	able to synchronize it before exiting.  Synchronize output before
	exiting.

	dd: output final progress before syncing
	Problem reported by Sworddragon (Bug#51482).
	* src/dd.c (reported_w_bytes): New var.
	(print_xfer_stats): Set it.
	(dd_copy): Print a final progress report if useful before
	synchronizing output data.

2022-01-27  Paul Eggert  <eggert@cs.ucla.edu>

	cat: prefer copy_file_range to read+write
	* src/cat.c (copy_cat): New function.
	(main): Use it.

	csplit: improve integer overflow checking
	* src/csplit.c: Prefer signed integers to unsigned for sizes
	when either will do.  Check for some unlikely overflows.
	(INCR_SIZE): Remove; no longer used.
	(free_buffer): Also free the arg, simplifying callers.
	(get_new_buffer): Use xpalloc instead of computing new
	size by hand.  Add ATTRIBUTE_DEALLOC.
	(delete_all_files, close_output_file):
	If unlink fails with ENOENT, treat it as success.
	(close_output_file): If unlink fails, decrement count anyway.
	(parse_repeat_count, parse_patterns): Check for int overflow.
	(check_format_conv_type): Use signed format.

	maint: simplify memory alignment
	Use the new Gnulib modules alignalloc and xalignalloc
	to simplify some memory allocation.
	Also, fix some unlikely integer overflow problems.
	* bootstrap.conf (gnulib_modules): Add alignalloc, xalignalloc.
	* src/cat.c, src/copy.c, src/dd.c, src/shred.c, src/split.c:
	Include alignalloc.h.
	* src/cat.c (main):
	* src/copy.c (copy_reg):
	* src/dd.c (alloc_ibuf, alloc_obuf):
	* src/shred.c (dopass):
	* src/split.c (main):
	Use alignalloc/xalignalloc/alignfree instead of doing page
	alignment by hand.
	* src/cat.c (main):
	Check for integer overflow in page size calculations.
	* src/dd.c (INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP, MAX_BLOCKSIZE):
	(real_ibuf, real_obuf) [lint]:
	Remove; no longer needed.
	(cleanup) [lint]:
	(scanargs): Simplify.
	* src/ioblksize.h (io_blksize): Do not allow blocksizes largest
	than the largest power of two that fits in idx_t and size_t.
	* src/shred.c (PAGE_ALIGN_SLOP, PATTERNBUF_SIZE): Remove.

	build: update gnulib submodule to latest

	copy: remove unnecessary ‘free’
	* src/copy.c (copy_reg): Remove a ‘free’ call that does nothing
	because its argument is always a null pointer, starting with
	2007-11-1608:31:15Z!jim@meyering.net.

	dd: simplify conv=swab code
	Simplify byte-swapping, so that the code no longer needs to
	allocate a page before the input buffer.
	* src/dd.c (SWAB_ALIGN_OFFSET, char_is_saved, saved_char): Remove.
	All uses removed.
	(INPUT_BLOCK_SLOP): Simplify to just page_size.
	(alloc_ibuf, dd_copy): Adjust to new swab_buffer API.
	(swab_buffer): New arg SAVED_BYTE, taking the place of the old
	global variables.  Do not access BUF[-1].

	dd: improve integer overflow checking
	* src/dd.c: Prefer signed to unsigned types where either will do,
	as this helps improve checking with gcc -fsanitize=undefined.
	Limit the signed types to their intended ranges.
	(MAX_BLOCKSIZE): Don’t exceed IDX_MAX - slop either.
	(input_offset_overflow): Remove; overflow now denoted by negative.
	(parse_integer): Return INTMAX_MAX on overflow, instead of unspecified.
	Do not falsely report overflow for ‘00x99999999999999999999999999999’.
	* tests/dd/misc.sh: New test for 00xBIG.
	* tests/dd/skip-seek-past-file.sh: Adjust to new diagnostic wording.
	New test for BIGxBIG.

	shred: fix declaration typo
	* gl/lib/randint.h (randint_all_new):
	Do not declare with _GL_ATTRIBUTE_NONNULL (), as
	the arg can be a null pointer.  This fixes a typo added in
	2021-11-01T05:30:28Z!eggert@cs.ucla.edu.

	cat: prefer signed to unsigned
	* src/cat.c: Prefer signed to unsigned types
	where either will do, as they allow for better
	overflow checking at runtime.

	cat: improve style
	* cat.c: Improve style a bit, mostly by assuming C99-style
	declarations after statements

2022-01-27  Pádraig Brady  <P@draigBrady.com>

	doc: csplit: clarify [OFFSET] syntax
	* src/csplit.c (usage): Clarify that '+' prefix is optional on OFFSET.
	* doc/coreutils.texi (csplit invocation): Likewise.
	Fixes https://bugs.gnu.org/53574

2022-01-15  Paul Eggert  <eggert@cs.ucla.edu>

	build: allow readlinkat calls
	Problem reported by Bernhard Voelker in:
	https://lists.gnu.org/r/coreutils/2022-01/msg00026.html
	* cfg.mk (sc_prohibit_readlink): Remove.  It’s OK to call
	readlinkat to determine whether a file is a symbolic link.

	cp: rely on Gnulib for copy_file_range workaround
	Gnulib now replaces copy_file_range on buggy hosts
	so there is no need for Coreutils to worry about the bug.
	* src/copy.c: Do not include sys/utsname.h, xstrtol.h.
	(functional_copy_file_range): Remove.  All uses now
	simply call copy_file_range.

	build: update gnulib submodule to latest

2022-01-14  Paul Eggert  <eggert@cs.ucla.edu>

	doc: fix pluralization typo

	cp: fix two typos in previous change
	Somehow ‘make check’ didn’t catch these the first few times.
	* src/copy.c (copy_dir): Don’t pass null pointer to
	copy_internal where it now expects non-null if move mode.
	* src/cp.c (make_dir_parents_private): Initialize *attr_list
	before recentely-added quick return.

	cp: omit unnecessary stat of destination
	'cp A B' attempts to open B as a directory, to see whether to
	write to B/A instead of to B.  In the common case where the
	open fails with ENOENT, do not bother to stat B afterwards
	since the stat should also fail with ENOENT.
	* src/copy.c (copy_internal, copy): Change bool arg about
	nonexistent destination to a 3-way int argument.  All callers changed.
	(copy_internal): Do not bother to stat a destination already known
	to not exist when following symlinks.

2022-01-13  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	cp: when copying to dir use dir-relative names
	When copying to a directory, use functions like openat to access
	the destination files, when such functions are available.  This
	should be more efficient and should avoid some race conditions.
	* bootstrap.conf (gnulib_modules): Add areadlinkat-with-size,
	fchmodat, fchownat, mkdirat, mkfifoat, utimensat.
	* src/copy.c (lchown) [!HAVE_LCHOWN]:
	* src/copy.c, src/system.h (rpl_mkfifo, mkfifo) [!HAVE_MKFIFO]:
	Remove.  All uses removed.
	(utimens_symlink): Remove; we shouldn’t have to worry about
	those obsolete systems any more.  All uses replaced by utimensat.
	* src/copy.c (copy_dir, set_owner, fchmod_or_lchmod, copy_reg)
	(same_file_ok, writable_destination, overwrite_ok, abandon_move)
	(create_hard_link, src_is_dst_backup, copy_internal, copy):
	* src/cp.c (make_dir_parents_private, re_protect):
	New args for directory-relative names.  All uses changed.
	Continue to pass full names as needed, for diagnostics and for
	lower-level functions like qset_acl that do not support
	directory-relative names.
	* src/copy.c (copy_reg): Prefer readlinkat to lstatat for merely
	checking whether a file is a symlink, to avoid EOVERFLOW issues.
	(subst_suffix): New function.
	(create_hard_link): Accept a null SRC_NAME as meaning that if it
	is needed it needs to be constructed from SRC_RELNAME, DST_NAME,
	and DST_RELNAME.
	(source_is_dst_backup): Use subst_suffix instead of doing it by hand.
	(copy_internal): Remember and use directory-relative names instead
	of full names.
	* src/cp.c (lchown) [!HAVE_LCHOWN]: Remove.  All uses removed.
	(must_be_working_directory): New function.
	(target_directory_operand): Simply take file name as arg,
	and return a file descriptor or negative number on failure;
	open with O_DIRECTORY to obtain any file descriptor.
	All uses changed.
	(target_dirfd_valid): New function.
	(do_copy): Use these new functions to obtain a file descriptor
	for any target directory, and use directory-relative names
	for that directory.
	(main): Omit no-longer-needed stat when --target-directory,
	as do_copy now does this.
	* src/ln.c (O_PATHSEARCH): Move from here ...
	* src/system.h: ... to here.
	* tests/cp/fail-perm.sh: Adjust to change in diagnostic wording,
	and add a test for --no-target-directory.

	cp: tweak internal name
	* src/cp.c (do_copy): Omit confusingly-named local new_dest, since
	there’s another var new_dst that means something quite different.

2022-01-12  Daniel Knittl-Frank  <knittl89@googlemail.com>

	scripts: fix typo in commit-msg git-hook script
	Commit 2f438fa9f53250fb3c8b39a95eedd627b5569ca4 (basenc: A new program
	complementary to base64/base32) introduced a typo in the list of allowed
	commit message prefixes, accidentally changing "basename" to
	"nbasename".  Revert it back to the correct "basename".

2022-01-07  Paul Eggert  <eggert@cs.ucla.edu>

	df: tiny simplification
	* src/df.c (LOG_EQ): Remove.  All callers replaced by ==.

2022-01-02  Pádraig Brady  <P@draigBrady.com>

	maint: update all copyright year number ranges
	Run "make update-copyright" and then...

	* gnulib: Update to latest with copyright year adjusted.
	* tests/init.sh: Sync with gnulib to pick up copyright year.
	* bootstrap: Likewise.
	* tests/sample-test: Adjust to use the single most recent year.

2022-01-02  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	mainly to get updated copyright year

	* doc/fdl.texi: Sync from gnulib.
	* .gitignore: Add lib/unictype, as bitmap.h therein is depended on
	since gnulib commit f698ea71

2021-12-31  Paul Eggert  <eggert@cs.ucla.edu>

	date: new option --resolution
	* NEWS, doc/coreutils.texi (Options for date): Mention this.
	* src/date.c (RESOLUTION_OPTION): New constant.
	(DEBUG_DATE_PARSING_OPTION): Rename from DEBUG_DATE_PARSING.
	All uses changed.
	(long_options, usage, main): Support --resolution.

	date: %-N now means suppress extra digits
	* NEWS, doc/coreutils.texi: Mention this.
	* bootstrap.conf (gnulib_modules): Add gettime-res.
	* src/date.c (res_width, adjust_resolution): New functions.
	(main): Adjust %-N to be %9N, or whatever, before using it.

	build: update gnulib submodule to latest

	doc: Document , vs . in date --rfc-3339=ns

	build: port to AIX 7.1
	This fixes a porting bug introduced in
	2019-08-12T03:29:00Z!bruno@clisp.org.
	Problem discovered on AIX 7.1.
	* src/local.mk (LDADD): Add $(LIB_MBRTOWC), since pretty much
	every command uses quotearg or mbrtowc or whatever.
	(src_sort_LDADD): Add $(LIBPMULTITHREAD) and
	$(LIB_PTHREAD_SIGMASK) instead of $(LIBTHREAD).

2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>

	build: be more careful about Perl
	Problem reported by Serge Belyshev (Bug#52844).
	* configure.ac (HAVE_PERL): Rely on latest Gnulib gl_PERL, which
	sets gl_cv_prog_perl.

	build: update gnulib submodule to latest

2021-12-27  Max Filippov  <jcmvbkbc@gmail.com>

	all: fix adjustment of /proc/$pid/cmdline by single binary
	When configured with --enable-single-binary tools issue incorrect prctl:

	  prctl(PR_SET_KEEPCAPS, ...)      = -1 EINVAL (Invalid argument)

	PR_SET_MM_ARG_START is not a prctl 'option' parameter, it's 'arg2'
	parameter for the option PR_SET_MM.  It also has to have 'arg4' and
	'arg5' set to 0 explicitly, otherwise the kernel also returns -EINVAL.

	* src/coreutils.c (launch_program): Fix prctl arguments.
	* NEWS: Mention the improvement.
	Fixes https://bugs.gnu.org/52800

2021-12-24  Paul Eggert  <eggert@cs.ucla.edu>

	ls: improve doc for =WHEN
	* src/ls.c (usage): Improve clarity of =WHEN args (Bug#52782).

	doc: colorize -> color
	Living so close to Hollywood I know that "colorize"
	means adding color to something that was already monochrome,
	whereas "color" means to give color to something.
	Coreutils apps color text instead of colorizing it.

2021-12-20  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: update tests/init.sh from gnulib
	* tests/init.sh: Sync from gnulib/tests/init.sh.
	A recent gnulib update (4f497bf3c) missed this.

2021-12-20  Jim Meyering  <meyering@fb.com>

	maint: syntax-check requires "char const *", not "const char *"
	* gl/lib/mbsalign.c (mbs_align_pad): Adjust.
	* src/chroot.c (is_root): Adjust.
	* src/digest.c (main): Adjust.
	* src/relpath.c (buffer_or_output) Adjust.
	* src/ls.c (print_name_with_quoting, get_color_indicator): Adjust.

	maint: split a long line
	* src/test.c (three_arguments): Split long line.

	maint: commit-msg: compute UTF-8-aware line-length
	* scripts/git-hooks/commit-msg: Count UTF-8 characters rather
	than bytes to avoid erroneously rejecting as "longer than 72" a
	log message line like the UTF-8 one for id.c just prior.  It has
	77 bytes but only 67 characters.
	(check_msg): Read in "utf8" mode. Also include actual length
	in the diagnostic.
	(main): Don't loop when stdout is redirected, as it is when
	invoked via vc-dwim.
	Paul Eggert reported privately both the error of counting bytes
	rather than chars and the re_edit loop when failing via vc-dwim.

2021-12-19  Paul Eggert  <eggert@cs.ucla.edu>

	id: improve doc for when USER is omitted
	* src/id.c (usage): “current user” → “current process” (Bug#52656).

2021-12-18  Paul Eggert  <eggert@cs.ucla.edu>

	maint: use GNU style for spacing

2021-12-16  Bruno Haible  <bruno@clisp.org>

	build: non-recursive Automake in a less hacky way
	* bootstrap.conf (gnulib_modules): Remove
	non-recursive-gnulib-prefix-hack.
	(gnulib_tool_option_extras): Add --automake-subdir.
	(bootstrap_post_import_hook): No need to massage lib/gnulib.mk.

2021-12-16  Paul Eggert  <eggert@cs.ucla.edu>

	build: update bootstrap to latest

	build: update gnulib submodule to latest

2021-12-15  Jim Meyering  <meyering@fb.com>

	maint: factor.c: avoid new GCC 12 warning
	* src/factor.c (millerrabin2): Mark as ATTRIBUTE_PURE,
	per advice from GCC 12.

2021-12-14  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* NEWS: Mention the bugfix.

2021-12-10  Paul Eggert  <eggert@cs.ucla.edu>

	mv: Bug#52410 fix
	The recent Gnulib update fixed this bug reported by Vincent Vermilya.
	* tests/mv/backup-dir.sh: Test for Bug#52410.

	build: update gnulib submodule to latest

2021-12-07  Paul Eggert  <eggert@cs.ucla.edu>

	uname: port to recent macOS
	Problem reported by Jakub Sokołowski (bug #52330).
	* src/uname.c [__APPLE__]: Don’t include sys/syctl.h,
	mach/machine.h, mach-o/arch.h.
	(print_element_env): New function.  With __APPLE__, it defers to the
	env var UNAME_MACHINE (if given) for uname -m, and similarly for -nrsv.
	(main): Use it.  For -p with __APPLE__, rely on predefined macros
	and omit any 64-bit indication, for compatibility with macOS uname.

2021-11-22  Paul Eggert  <eggert@cs.ucla.edu>

	cp: clone on macOS
	* configure.ac: Check for fclonefileat.
	* src/copy.c [HAVE_FCLONEFILEAT && !USE_XATTR]:
	Include <sys/clonefile.h>.
	(copy_reg): If possible, use fclonefileat to clone.

2021-11-21  Paul Eggert  <eggert@cs.ucla.edu>

	cp: streamline cloning by skipping fstat
	* src/copy.c (copy_reg): Attempt clone_file before fstat of dest,
	so that if clone_file succeeds we can skip the fstat.

2021-11-20  Paul Eggert  <eggert@cs.ucla.edu>

	cp: fix --preserve=ownership permissions bug
	This fixes a bug that I introduced in
	2006-12-06T19:44:08Z!eggert@cs.ucla.edu.
	* src/copy.c (USE_XATTR): New macro.
	(copy_reg): Use it to help the compiler.  Prefer open u+w to a
	later chmod u=rw; u+r isn’t needed for xattr.  For the later u-r,
	do only one (or zero) chmod calls instead of two (or one).
	In the last chmod, respect the umask instead of ignoring it.
	* tests/cp/preserve-mode.sh: Test for the bug.

2021-11-19  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer MAYBE_UNUSED
	Prefer MAYBE_UNUSED to _GL_UNUSED, since the C2x syntax
	will be [[maybe_unused]] at the start of the declaration,
	and we want to look forward to that.  All uses of _GL_UNUSED
	either changed to MAYBE_UNUSED, or (when not needed) removed.

2021-11-18  Paul Eggert  <eggert@cs.ucla.edu>

	cp: fix security context race
	This fixes an issue introduced in the fix for Bug#11100.
	* NEWS: Mention this.
	* src/copy.c (copy_reg): Fix obscure bug where open-without-CREAT
	failed with ENOENT and we forget to call set_process_security_ctx
	before calling open-with-CREAT. Also, don’t bother to unlink
	DST_NAME if open failed with ENOENT; and if unlink fails with
	ENOENT, don’t consider that to be an error (someone else could
	have removed the file for us, and that’s OK).  Also, don’t worry
	about move mode, since we use O_EXCL|O_CREAT and so won’t open
	an existing file.

2021-11-17  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update NEWS for macOS fix

	cp: minor clarity tweak
	* src/copy.c (copy_reg): Use cached data_copy_required.

	cp: fix ptrdiff_t/ssize_t theoretical glitches
	* src/copy.c (sparse_copy): Use system.h’s SSIZE_MAX.
	Don’t assume SSIZE_MAX <= PTRDIFF_MAX.

2021-11-16  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: fix nonnull decl
	* gl/lib/randread.h (randread_new): Do not mark with
	_GL_ATTRIBUTE_RETURNS_NONNULL, since it can return NULL.

2021-11-15  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2021-11-13  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure in env-signal-handler.sh
	* tests/misc/env-signal-handler.sh: Use retry_delay_ to
	avoid a false failure under load, where env hasn't setup
	the SIGINT handling before timeout(1) sends the SIGINT.
	Fixes https://bugs.gnu.org/51793

2021-11-01  Pádraig Brady  <P@draigBrady.com>

	maint: fix recent syntax-check failures
	* cfg.mk (exclude_file_name_regexp--sc_system_h_headers):
	Add chown-core.h to the regexp, to better decouple from system.h.
	* src/env.c: Remove minmax.h include already included in system.h.
	* src/libstdbuf.c: Likewise.
	* src/prog-fprintf.h: Remove doubled semicolon.

2021-11-01  Paul Eggert  <eggert@cs.ucla.edu>

	maint: use minmax.h instead of rolling our own
	* gl/lib/mbsalign.c, gl/lib/randread.c, src/system.h (MAX, MIN):
	Remove; include minmax.h instead.
	* gl/modules/mbsalign, gl/modules/randread (Depends-on): Add minmax.
	* src/factor.c (MIN): Remove.

	maint: add function attributes to .h files
	Add _GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_MALLOC,
	_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DALLOC_FREE,
	_GL_ATTRIBUTE_RETURNS_NONNULL to .h files when appropriate.
	* gl/lib/mbsalign.h, gl/lib/randperm.h, src/chown-core.h:
	Include stdlib.h, for the benefit of _GL_ATTRIBUTE_DALLOC_FREE.
	* gl/lib/randread.c (randread_free_body): New static function.
	(randread_new, randread_free): Use it.
	* src/copy.c (valid_options): Remove assert that is no longer
	needed because it is now checked statically.

	maint: enable -Wsuggest-attribute=format
	* configure.ac (WERROR_CFLAGS): Enable -Wsuggest-attribute=format
	for lib/ and src/.
	* src/copy.c (copy_attr_error, copy_attr_allerror):
	Add ATTRIBUTE_FORMAT.
	(copy_attr): Ignore -Wsuggest-attribute=format in the
	small section of code that needs it ignored.
	* src/test.c (test_syntax_error): Mark with ATTRIBUTE_FORMAT.
	(binary_operator): Omit unnecessary NULL args, pacifying
	-Wsuggest-attribute=format.

	maint: modernize attribute usage
	* src/system.h (__attribute__): Remove.  Replace all uses that
	rely on this by _GL_ATTRIBUTE_xxx or ATTRIBUTE_xxx.
	(ATTRIBUTE_WARN_UNUSED_RESULT): Remove.  Replace all uses by
	NODISCARD.

	maint: remove unused __attribute__ defn
	* gl/lib/randread.c (__attribute__): Remove; no longer
	used after the recent _Noreturn change.

	b2sum: simplify attribute usage
	* src/blake2/blake2.h (BLAKE2_PACKED): Simplify, and port better
	to older GCC, by using _GL_ATTRIBUTE_PACKED.

	maint: prefer attribute.h in .c files
	This will help us make the transition to C2x, where some
	attributes must come at the start of function decls.
	Leave the attributes alone in .h files for now,
	as the Gnulib tradition is to not expose attribute.h to users.
	* bootstrap.conf (gnulib_modules): Add ‘attribute’.
	* gl/lib/randperm.c, src/make-prime-list.c, src/system.h:
	Include attribute.h.
	* gl/lib/strnumcmp.c (strnumcmp): Remove _GL_ATTRIBUTE_PURE here,
	as this belongs in the .h file.
	* gl/lib/strnumcmp.h (strnumcmp): Add _GL_ATTRIBUTE_PURE here.
	* src/sort.c (human_numcompare, numcompare): Now ATTRIBUTE_PURE;
	discovered due to strnumcmp.h change.
	* gl/lib/randperm.c, src/copy.c, src/dd.c, src/df.c, src/digest.c:
	* src/env.c, src/expr.c, src/factor.c, src/ls.c:
	* src/make-prime-list.c, src/numfmt.c, src/od.c, src/pathchk.c:
	* src/pinky.c, src/pr.c, src/ptx.c, src/realpath.c, src/relpath.c:
	* src/seq.c, src/sort.c, src/stat.c, src/stty.c, src/system.h:
	* src/tr.c, src/uniq.c, src/wc.c:
	In .c files, crefer ATTRIBUTE_CONST to _GL_ATTRIBUTE_CONST, and
	similarly for ATTRIBUTE_FORMAT and ATTRIBUTE_PURE.
	* src/system.h (FALLTHROUGH): Remove; attribute.h defines it.

2021-10-31  Pádraig Brady  <P@draigBrady.com>

	sort: --debug: add warnings about sign, radix, and grouping chars
	New warnings are added related to the handling
	of thousands grouping characters, decimal points, and sign characters.
	Examples now diagnosed are:

	$ printf '0,9\n1,a\n' | sort -nk1 --debug -t, -s
	sort: key 1 is numeric and spans multiple fields
	sort: field separator ‘,’ is treated as a group separator in numbers
	1,a
	_
	0,9
	___

	$ printf '1,a\n0,9\n' | LC_ALL=fr_FR.utf8 sort -gk1 --debug -t, -s
	sort: key 1 is numeric and spans multiple fields
	sort: field separator ‘,’ is treated as a decimal point in numbers
	0,9
	___
	1,a
	__

	$ printf '1.0\n0.9\n' | LC_ALL=fr_FR.utf8 sort -s -k1,1g --debug
	sort: note numbers use ‘,’ as a decimal point in this locale
	0.9
	_
	1.0
	_

	$ LC_ALL=fr_FR.utf8 sort -n --debug /dev/null
	sort: text ordering performed using ‘fr_FR.utf8’ sorting rules
	sort: note numbers use ‘,’ as a decimal point in this locale
	sort: the multi-byte number group separator in this locale \
	      is not supported

	$ sort --debug -t- -k1n /dev/null
	sort: key 1 is numeric and spans multiple fields
	sort: field separator ‘-’ is treated as a minus sign in numbers
	sort: note numbers use ‘.’ as a decimal point in this locale

	$ sort --debug -t+ -k1g /dev/null
	sort: key 1 is numeric and spans multiple fields
	sort: field separator ‘+’ is treated as a plus sign in numbers
	sort: note numbers use ‘.’ as a decimal point in this locale

	* src/sort.c (key_warnings): Add the warnings above.
	* tests/misc/sort-debug-warn.sh: Add test cases.
	Also check that all sort invocations succeed.
	* NEWS: Mention the improvement.
	Addresses https://bugs.gnu.org/51011

2021-10-31  Paul Eggert  <eggert@cs.ucla.edu>

	maint: modernize README-{hacking,prereq}

2021-10-30  Paul Eggert  <eggert@cs.ucla.edu>

	cp: revert unnecessary FreeBSD workaround
	That was a false alarm due to a bug in FreeBSD 9.1 truss;
	see Pádraig Brady’s report (Bug#51433#29).
	* src/copy.c (lseek_copy, infer_scantype): Don’t bother checking
	whether lseek returned -1.  This doesn’t entirely revert the
	previous change, as it keeps the code simplification of the
	previous change while reverting the check for -1.

	cp: defend better against FreeBSD 9.1 zfs bug
	Problem reported by Pádraig Brady (Bug#51433#14).
	* src/copy.c (lseek_copy, infer_scantype): Report an error if
	lseek with SEEK_DATA or SEEK_HOLE returns less than -1,
	as this is an lseek bug.

2021-10-22  Pádraig Brady  <P@draigBrady.com>

	doc: say that printf(1) is preferred over echo(1)
	* src/echo.c (usage): Say printf(1) is preferred
	due to being more standard and robust.
	* man/echo.x [SEE ALSO]: Reference printf(1).
	* doc/coreutils.texi (echo invocation): Mention in the
	summary that echo is not robust when outputting
	any string, and that printf is preferred.
	Also expand on the examples showing how to
	output a single '-n' string.
	Addresses https://bugs.gnu.org/51311

2021-10-12  Pádraig Brady  <P@draigBrady.com>

	doc: timeout --kill-after: clarify disabled timeouts
	* doc/coreutils.texi (timeout invocation): Clarify
	that -k is ignored if either its duration or the
	main timeout duration is 0.
	Addresses https://bugs.gnu.org/51128

	timeout: ensure --foreground -k exits with status 137
	* src/timeout.c (main): Propagate the killed status from the child.
	* doc/coreutils.texi (timeout invocation): Remove the
	description of the --foreground specific handling of SIGKILL,
	now that it's consistent with the default mode of operation.
	* tests/misc/timeout.sh: Add a test case.
	* NEWS: Mention the change in behavior.
	Fixes https://bugs.gnu.org/51135

2021-10-11  Pádraig Brady  <P@draigBrady.com>

	doc: timeout --foreground: add clarification on exit status
	* doc/coreutils.texi (timeout invocation): Add detail on
	how --foreground allows timeout(1) to use more standard
	exit status as the uncatchable SIGKILL is not sent to itself.
	Fixes https://bugs.gnu.org/51135

2021-10-11  Paul Eggert  <eggert@cs.ucla.edu>

	sort: fix unlikely bug when '\377' < 0
	* gl/lib/strintcmp.c (strintcmp): Don’t assume that the input
	cannot contain ((char) -1), as this equals '\377' when char is
	signed (assuming 8-bit char).
	* src/sort.c (decimal_point): Now char, to make it clear
	that it’s always in char range now.
	(NON_CHAR): New constant.
	(traverse_raw_number): Return char not unsigned char;
	this is simpler and could be faster.  All callers changed.
	(main): Do not convert decimal_point and thousands_sep to
	unsigned char, as this can mishandle comparisons on
	machines where char is signed and the input data contains
	((char) -1).  Use NON_CHAR, not -1, as an out-of-range value for
	thousands_sep.

2021-10-03  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: switch to C11-style _Noreturn
	Use C11-style _Noreturn instead of the old ATTRIBUTE_NORETURN
	macro.  This pacifies clang on OpenBSD 6.9, which otherwise
	complains "'noreturn' function does return" in some places.
	* gl/lib/randread.c, src/system.h (ATTRIBUTE_NORETURN):
	Remove.  All uses either removed as GCC no longer needs them, or
	changed to C11-style _Noreturn since Gnulib arranges for _Noreturn
	globally nowadays.

	ls: port to OpenBSD
	Problem reported by Brian Callahan (Bug#50972).
	* src/ls.c (decode_switches): Don’t assume __GNUC_PREREQ.

2021-09-26  Pádraig Brady  <P@draigBrady.com>

	doc: adjust ls --zero option order in texinfo
	* doc/coreutils.texi (ls invocation - general output formatting):
	The option ordering was not changed when the option was renamed
	from --null to --zero.

2021-09-25  Pádraig Brady  <P@draigBrady.com>

	tests: cp/sparse-perf: make more robust and add zfs comments
	* init.cfg (seek_data_capable_): Add a timeout to ensure failure for
	slow lseek(...SEEK_DATA) calls (even if that syscall isn't interrupted).
	* tests/cp/sparse-perf.sh: Run the SEEK_DATA check on the
	1TiB empty file to exclude both FreeBSD 9.1 which takes 35s,
	and ZFS which requires a delay of about 5s between file creation
	and use of SEEK_DATA to correctly determine it's empty (return ENXIO).
	Also remove the stat size checks as they invalidate the test
	due to cp never writing data due to it being always zeros,
	and thus converted to holes in the output.

2021-09-24  Pádraig Brady  <P@draigBrady.com>

	chmod: fix exit status when ignoring symlinks
	* src/chmod.c: Reorder enum so CH_NOT_APPLIED
	can be treated as a non error.
	* tests/chmod/ignore-symlink.sh: A new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/50784

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 9.0
	* NEWS: Record release date.

	tests: sparse-perf: avoid false failure
	* tests/cp/sparse-perf.sh: Avoid the case where
	we saw SEEK_DATA take 35s to return a result
	against a 1TB sparse file.  This happened on
	a FreeBSD 9.1 VM at least.
	Reported by Nelson H. F. Beebe.

	cksum: fix -a crc on 64 bit big endian systems
	* src/cksum.c (crc_sum_stream): On sparc64 for example,
	a crc of 0 was printed due to mismatch in size of
	variable copied between generator and output functions.
	uint_fast32_t is generally 64 bits on 64 bit systems,
	so we copy through an int to ensure we don't use the wrong
	end of a 64 bit variable.
	Reported by Nelson H. F. Beebe

2021-09-21  Pádraig Brady  <P@draigBrady.com>

	tail: fix detection of closed stdout on macOS
	* bootstrap.conf: We only need poll on Linux and AIX
	where poll is not replaced.  Also resinstate dependence
	on select so we can use it unconditionally.
	* src/tail.c (check_output_alive): Reinstate use of select()
	by default as poll was seen to be ineffective for this
	application on macOS.
	Fixes https://bugs.gnu.org/50714

	maint: clean up c++ style comments
	* src/expand-common.h: Remove commented variables.
	* src/remove.h: Change to C style comment.
	* src/tail.c: Likewise.

2021-09-20  Pádraig Brady  <P@draigBrady.com>

	tests: date-debug: avoid a false failure on solaris
	* tests/misc/date-debug.sh: Use a dynamic time format,
	as the C locale on solaris uses %T rather than %H:%M:%S
	for the time component.

2021-09-20  Jim Meyering  <meyering@fb.com>

	doc: drop extraneous single quotes in help
	* src/digest.c (usage) [cksum --help]: Drop single quotes
	around each checksum name.
	* src/tee.c (usage) [tee --help]: Likewise.

	cksum: list Pádraig as coauthor
	* src/digest.c (AUTHORS) [HASH_ALGO_CKSUM]: Add Pádraig as
	cksum coauthor.
	* AUTHORS: Likewise.

	tests: env-s.pl: avoid spurious failure on OS X
	* tests/misc/env-S.pl: The __CF_USER_TEXT_ENCODING envvar
	would cause many of these sub-tests to fail. Ignore it.

2021-09-20  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update to latest.
	Fixes "extern inline" and "rpl_free" issues.

	doc: fix --help formatting for checksum utils
	* src/digest.c (usage): Indicate that --length and --algorithm
	require arguments.  Emit corresponding emit_mandatory_arg_note().
	Use consistent alignment.

	cksum: support more transparent emulation of older utils
	* src/digest.c: Allow using the --untagged option with --check,
	so that `cksum -a md5 --untagged` used to emulate md5sum for example,
	may be augmented with the --check option.  Also support the --tag
	option with cksum, to allow overriding a previous --untagged setting.
	* doc/coreutils.texi: Adjust accordingly.
	* tests/misc/cksum-a.sh: Likewise.

	tests: avoid rare race in tail-2/F-vs-rename.sh
	* tests/tail-2/F-vs-rename.sh: Keep stdout and stderr separate,
	so that interspersion doesn't impact regex checks.  Also wait
	for each file's data to be printed to avoid multiple writes
	to a file to be printed in a single iteration, which would
	impact the regex checks.  Also we refactor the check function,
	rather than repeatedly redefining variations.

2021-09-17  Pádraig Brady  <P@draigBrady.com>

	maint: remove duplicate from THANKS.in
	* THANKS.in: Now that Tianjia Zhang has a commit in the repo.

2021-09-17  Tianjia Zhang  <tianjia.zhang@linux.alibaba.com>

	tests: fix typo in cksum-a.sh
	* tests/misc/cksum-a.sh: fix typo md5um to md5sum.

2021-09-17  Pádraig Brady  <P@draigBrady.com>

	tests: fix rare false failure in tail-2/F-vs-rename
	This is wrong fix really, as only introducing delay I think.

	* tests/tail-2/F-vs-rename.sh: Avoid a rare false failure
	due to a race in the test.  Now wait until tail has noticed
	that b is replaced before writing to a, so that the subsequent
	write of "y" to b will be displayed independently from
	current contents of b ("x").

2021-09-17  Pádraig Brady  <P@draigBrady.com>

	tests: port removed-directory test to FreeBSD
	* tests/ls/removed-directory.sh: On FreeBSD 9.1 at least,
	one gets ENOENT when trying to traverse the current removed dir
	with ../, so instead reference the parent dir directly.

2021-09-16  Pádraig Brady  <P@draigBrady.com>

	rmdir: fix uninitialized memory causing incorrect error
	* src/rmdir.c (main): Only inspect the returned stat structure,
	when stat(2) returns success.

2021-09-16  Jim Meyering  <meyering@fb.com>

	build: avoid new chmod.c warnings from upcoming GCC12
	Here are the warnings:
	src/chmod.c:175:3: error: 'ch.new_mode' may be used uninitialized in\
	    this function [-Werror=maybe-uninitialized]
	  175 |   strmode (ch->new_mode, perms);
	src/chmod.c:178:3: error: 'ch.old_mode' may be used uninitialized in\
	    this function [-Werror=maybe-uninitialized]
	  178 |   strmode (ch->old_mode, old_perms);

	* src/chmod.c (process_file): Initialize ch.  Its new_mode and
	old_mode fields could indeed be used uninitialized to form mode
	strings, but those are used only when built from initialized members.

2021-09-16  Pádraig Brady  <P@draigBrady.com>

	digest: ignore empty lines when checking
	* src/digest.c (digest_check): Treat empty lines like comments,
	as commented checksum files very often have empty lines.
	* tests/misc/md5sum.pl: Adjust accordingly.

	factor: sync longlong.h adjustments from upstream
	* src/longlong.h: Sync changes from:
	https://gmplib.org/repo/gmp/log/tip/longlong.h

	stat,tail: add support for the secretmem file system
	* src/stat.c (human_fstype): Add case for the 'secretmem'
	file system type.
	* NEWS: Mention the Improvement.

	maint: sync help2man to latest version
	* man/help2man: sync to changes from version 1.48.5.
	Note this doesn't materially change the generated man pages.

	doc: remove older ChangeLog items
	* Makefile.am: Update the oldest documented version
	to 8.25 which is now about 5 years old.

	tests: ensure returns_ check failures are propagated
	* tests/misc/cksum-a.sh: Set fail=1 if returns_ check fails.
	* tests/misc/sync.sh: Likewise.
	* tests/misc/yes.sh: Likewise.

	cksum: fix --check with non tagged format checksums
	* src/digest.c: Always set the digest_length, so that
	we check the correct number of hex digits when parsing
	non tagged format checksums.
	* tests/misc/cksum-a.sh: Add a test case.  Also fix
	up this test which was ineffective due to fail=1
	being set in a subshell and ignored.

2021-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	cksum: fix off-by-1 bug with \r stripping
	Problem reported by Jim Meyering (Bug#50611).
	* src/digest.c (digest_check): When stripping trailing \r,
	avoid subscript error before start of line.

2021-09-15  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer rawmemchr to memchr when easy
	* bootstrap.conf (gnulib_modules): Add rawmemchr.
	* src/csplit.c: Include idx.h.
	* src/csplit.c (record_line_starts):
	* src/head.c (elide_tail_lines_pipe):
	* src/shuf.c (next_line):
	* src/split.c (lines_split):
	* src/tail.c (pipe_lines):
	* src/wc.c (wc_lines):
	Prefer rawmemchr to memchr when rawmemchr is easy.
	* src/csplit.c (load_buffer):
	* src/head.c (struct linebuffer):
	Make room for a 1-byte sentinel.

	split: avoid NULL + 1
	* src/split.c (lines_chunk_split): Don’t add to a null pointer.
	It’s undefined behavior, and it’s unnecessarily confusing
	regardless.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	digest: support windows format checksum files
	Support checksum files with CRLF line endings,
	which is a common gotcha for using --check on windows,
	or with checksum files generated on windows.
	Note we escape \r here to support the original coreutils format
	(with file name at EOL), and file names with literal
	\r characters as the last character of their name.

	* src/digest.c (filename_unescape): Convert \\r -> \r.
	(print_filename): Escape \r -> \\r.
	(output_file): Detect \r chars in file names.
	(digest_check): Ignore literal \r char at EOL.
	* tests/misc/md5sum.pl: Add a test case.
	* tests/misc/sha1sum.pl: Likewise.
	* NEWS: Mention the improvement.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	doc: improve --help indenting in checksum utils
	* src/digest.c (usage): Indent multi-line descriptions for clarity.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	cksum: operate in binary mode only
	This only practically matters on windows.
	But given there are separate text handling options in cygwin,
	keep the interface simple, and avoid exposing the
	confusing binary/text difference here.

	* doc/coreutils.texi (md5sum invocation): Mention that
	--binary and --text are not supported by the cksum command.
	* src/digest.c: Set flag to use binary mode by default.
	(output_file): Don't distinguish text and binary modes with
	' ' and '*', and just use ' ' always.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	cksum: use --tag format by default
	This format is a better default, since it results in simpler usage,
	as you don't need to specify --tag on generation or -a on
	checking invocations.  Also it's a more general format supporting
	mixed and length adjusted digests.

	* doc/coreutils.texi (cksum invocation): Document a new --untagged
	option, to use the older coreutils format.
	(md5sum invocation): Mention that cksum doesn't support --tag.
	* src/digest.c: Adjust cksum(1) to default to --tag,
	and accept the new --untagged option.
	* tests/misc/b2sum.sh: Adjust accordingly.
	* tests/misc/cksum-a.sh: Likewise.
	* tests/misc/cksum-c.sh: Likewise.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	cksum: support --zero in default mode
	* src/cksum.h: Thread DELIM through the output functions.
	* src/digest.c: Likewise.
	* src/sum.c: Likewise.
	* src/sum.h: Likewise.
	* src/cksum.c: Likewise. Also adjust check to allow -z
	with traditional output modes.  Also ajust the global variable
	name to avoid shadowing warnings.
	* tests/misc/cksum-a.sh: Adjust accordingly.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	digest: support -length specifiers on all digest tags
	This will be generally useful going forward, for sha3-256 etc.

	* src/digest.c: Rename b2_length to digest_length, and
	adjust/simplify the code to operate on this for both
	b2sum and cksum -a blake2b.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	cksum: support digest detection for tagged format
	Support `cksum --check FILE` without having to specify a digest
	algorithm, allowing for more generic file check instructions.
	This also supports mixed digest checksum files, supporting
	more robust multi digest checks.

	* src/digest.c (algorithm_from_tag): A new function to
	identify the digest algorithm from a tagged format line.
	(split3): Set the algorithm depending on tag, and update
	the expected digest length accordingly.
	* tests/misc/cksum-c.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* tests/misc/md5sum.pl: Adjust to more generic error.
	* tests/misc/sha1sum.pl: Likewise.
	* doc/coreutils.texi (md5sum invocation): Mention the new -c feature.
	* NEWS: Mention the new feature.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	maint: simplify b2sum to only handle BLAKE2b
	Any further variants will use the cksum -a table driven mechanism.

	* src/digest.c: Remove BLAKE2 specific table driven code.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	digest: add support for sm3
	Add message digest sm3, which uses the OSCCA SM3 secure
	hash (OSCCA GM/T 0004-2012 SM3) generic hash transformation.

	* bootstrap.conf: Add the sm3 module.
	* doc/coreutils.texi: Mention the cksum -a option.
	* src/digest.c: Provide support for --algorithm='sm3'.
	* tests/misc/sm3sum.pl: Add a new test (from Tianjia Zhang)
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.

	Tested-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	cksum: add --algorithm option to select digest mode
	* src/digest.c: Organize HASH_ALGO_CKSUM to be table driven,
	and amalgamate all digest algorithms.
	(main): Parse all options if HASH_ALGO_CKSUM, and disallow
	--tag, --zero, and --check with the traditional bsd, sysv, and crc
	checksums for now.
	* src/local.mk: Reorganize to include all digest modules in cksum.
	* tests/misc/cksum-a.sh: Add a new test.
	* tests/misc/b2sum.sh: Update to default to checking with cksum,
	as b2sum's implementation diverges a bit from the others.
	* tests/local.mk: Reference the new test.
	* doc/coreutils.texi (cksum invocation): Adjust the summary to
	identify the new mode, and document the new --algorithm option.
	* man/cksum.x: Adjust description to be more general.
	* man/*sum.x: Add [See Also] section referencing cksum(1).
	* NEWS: Mention the new feature.

	digest: refactor cksum(1) into digest.c
	* cfg.mk: Adjust cksum.c to not require config.h
	and support a main (for crctab) without calling bindtextdomain().
	* po/POTFILES.in: Remove cksum_pclmul.c since it no longer
	concerns itself with diagnostics.
	* src/cksum.c: Refactor to just providing stream digest,
	and digest printing functionality.
	* src/cksum.h: Adjust to the new interface.
	* src/cksum_pclmul.c: Remove diagnostics, and determine errors
	internally.
	* src/crctab.c: Separate from cksum.h since that's now included
	multiple times.
	* src/digest.c: Provide cksum(1) functionality if -DHASH_ALGO_CKSUM
	* src/local.mk: Adjust to new crctab.c and HASH_ALGO_CKSUM define.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	cksum: document the --debug option
	This should have been part of commit v8.32-113-gb73b9fcb1

	* doc/coreutils.texi (cksum invocation): Add the --debug description.
	* src/cksum.c (usage): Likewise.
	(main): Also give explicit indication when using generic hardware.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	sum: handle EOVERFLOW for too large inputs
	* src/sum.c (bsd_sum_stream): Detect overflow when updating length.
	(sysv_sum_stream): Likewise.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	digest: refactor sum(1) into digest.c
	Since digest will be providing all digest functionality,
	refactor sum.c into it.

	* po/POTFILES.in: sum.c no longer has translatable strings so remove.
	* src/digest.c: Call out to new stream interfaces in sum.c
	* src/local.mk: Adjust sources for the sum binary.
	* src/sum.c: Provide a stream interface for BSD and SYSV digests.
	* src/sum.h: A new file to declare the exported functions in sum.c

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	digest: add LENGTH parameter to digest to support cksum
	* src/digest.c (digest_file): Add a LENGTH param,
	to support cksum(1), and sum(1) which output the
	length as part of their output.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	maint: rename md5sum.c to more general digest.c
	md5sum.c will be the base for all digest functions,
	so rename accordingly.

	* src/md5sum.c: Rename to ...
	* src/digest.c: ... renamed from md5sum.c
	* scripts/git-hooks/commit-msg: Allow digest: commit prefix.
	* po.POTFILES.in: Adjust to new name.
	* src/local.mk: Likewise.

2021-09-15  Pádraig Brady  <P@draigBrady.com>

	doc: fix ambiguities in logname(1) and whoami(1)
	* doc/coreutils.texi (whoami invocation): Clarify it prints names,
	not numeric IDs.
	* man/whoami.x: Likewise.
	* man/logname.x: Reference getlogin(3).
	* src/logname.c: Clarify that it prints the login name,
	rather than the name of the effective user ID.

	Fixes https://bugs.gnu.org/48894

2021-09-15  nl6720  <nl6720@gmail.com>

	dircolors: add *direct* to TERM matching
	Search for "direct color" at:
	https://invisible-island.net/xterm/terminfo.html

	* src/dircolors.hin: Add *direct* to match terminals that
	support direct colors (24-bit color / TrueColor).
	The trailing * will match entries like xterm-direct2.

	Addresses https://bugs.gnu.org/39827

2021-09-12  Pádraig Brady  <P@draigBrady.com>

	tests: stat-vs-dirent.sh: avoid a false failure
	* tests/ls/stat-vs-dirent.sh: Skip the test if we can't stat(1),
	as the file may have been removed, or have a malformed name
	due to '\n' etc. in the file name.

2021-09-09  Pádraig Brady  <P@draigBrady.com>

	tests: add new stdin reading programs to tty-eof test
	* tests/misc/tty-eof.pl: Add b2sum and basenc.

	build: update gnulib submodule to latest
	* gnulib: Update to latest. This fixes a gnulib test failure in base64,
	among other fixes.
	* cfg.mk: Disable sc_indent as auto indent is too invasive for now.

2021-09-09  Pádraig Brady  <P@draigBrady.com>

	doc: fix repeated word
	A proposed change to gnulib's sc_prohibit_doubled_word
	was made to detect this in future.

	* README: s/can can/can/.
	Fixes https://bugs.gnu.org/50484

2021-09-09  Paul Eggert  <eggert@cs.ucla.edu>

	doc: can “can can”
	Problem reported by Akbarkhon Variskhanov (Bug#50484).

2021-09-08  Paul Eggert  <eggert@cs.ucla.edu>

	doc: add missing "as" (thanks to Nelson H.F. Beebe)

2021-09-05  Justin Tracey  <j2tracey@gmail.com>

	tests: narrow scope of faulty join args
	* tests/misc/join.pl: Only test invalid-j with an invalid -j field,
	not with missing operands as well.

2021-08-31  Pádraig Brady  <P@draigBrady.com>

	doc: indicate the default algorithm in the sum(1) man page
	* src/sum.c (usage): Indicate that -r (BSD algorithm) is the default.

2021-08-31  Pádraig Brady  <P@draigBrady.com>

	sum: always output a file name if one passed
	Adjust to output the file name if any name parameter is passed.
	This is consistent with sum -s, cksum, and sum implementations
	on other platforms.  This should not cause significant compat
	issues, as multiple fields are already output, and so already
	need to be parsed.

	* src/sum.c (bsd_sum_file): Output the file name
	if any name parameter is passed.
	* tests/misc/sum.pl: Adjust accordingly.
	* doc/coreutils.texi (sum invocation): Likewise.
	* NEWS: Mention the change in behavior.

2021-08-31  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port better to NetBSD
	* tests/misc/help-version.sh: Test that /dev/full causes
	shell printf to fail.  This ports better to NetBSD 9.88.46,
	where it doesn’t.  Problem reported by Nelson H. F. Beebe.

	tests: merge help-version changes back from gzip
	* tests/misc/help-version.sh: Merge gzip-related changes
	back from gzip/tests/help-version.  This fixes problems
	when TERM is not 'dumb', and should simplify maintenance.

2021-08-30  Assaf Gordon  <assafgordon@gmail.com>

	basenc: fix bug49741: using wrong decoding buffer length
	Emil Lundberg <lundberg.emil@gmail.com> reports in
	https://bugs.gnu.org/49741 about a 'basenc --base64 -d' decoding bug.
	The input buffer length was not divisible by 3, resulting in
	decoding errors.

	* NEWS: Mention fix.
	* src/basenc.c (DEC_BLOCKSIZE): Change from 1024*5 to 4200 (35*3*5*8)
	which is divisible by 3,4,5,8 - satisfying both base32 and base64;
	Use compile-time verify() macro to enforce the above.
	* tests/misc/basenc.pl: Add test.

2021-08-28  Paul Eggert  <eggert@cs.ucla.edu>

	basenc: prefer signed to unsigned integers
	This patch modifies basenc to prefer signed integers to
	unsigned, as signed are less error-prone.
	This patch also updates Gnulib to to latest, which updates Gnulib’s
	base32 and base64 modules to prefer signed to unsigned integers.
	* src/basenc.c: Include idx.h.
	(struct base2_decode_context): Use unsigned char, not unsigned
	for an octet that must fit in an unsigned char.
	(base_encode, struct base_decode_context)
	(base64_decode_ctx_wrapper, prepare_inbuf, base64url_encode)
	(base64url_decode_ctx_wrapper, base32_decode_ctx_wrapper)
	(base32hex_encode, base32hex_decode_ctx_wrapper, base16_encode)
	(base16_decode_ctx, z85_encode, Z85_HI_CTX_TO_32BIT_VAL)
	(z85_decoding, z85_decode_ctx, base2msbf_encode)
	(base2lsbf_encode, base2lsbf_decode_ctx, base2msbf_decode_ctx)
	(wrap_write, do_encode, do_decode, main):
	Prefer signed integers to unsigned.
	(main): Treat extremely large wrap columns as if they were
	infinite; that’s good enough.  Since we’re now using xstrtoimax,
	this allows ‘-w -0’ (same as ‘-w 0’).
	* tests/misc/base64.pl (gen_tests): -w-0 is no longer an error.

2021-08-25  Jim Meyering  <meyering@fb.com>

	maint: avoid new syntax-check failure
	find-mount-point.h rightly includes <stdlib.h> for its use
	of _GL_ATTRIBUTE_DEALLOC_FREE, which uses free, yet that new
	inclusion provoked a syntax-check failure. Exempt this header
	file as we've done for others.
	* cfg.mk (exclude_file_name_regexp--sc_system_h_headers):
	Add find-mount-point.h to the regexp.
	(sc_system_h_headers): Use grep -E, for a more readable regexp.

2021-08-25  Pádraig Brady  <P@draigBrady.com>

	tests: avoid reflinks when testing SEEK_DATA logic
	This better tests the SEEK_HOLE logic which
	replaced the original fiemap hole identification logic.
	Also it avoids a false failure in sparse-2.sh
	on reflink supporting file systems, where we
	try to correlate the file sizes produced by cp and dd.

	* tests/cp/sparse-2.sh: s/cp/cp --reflink=never/
	* tests/cp/sparse-extents-2.sh: Likewise.
	* tests/cp/sparse-extents.sh: Likewise.
	* tests/cp/sparse-perf.sh: Likewise.
	* tests/cp/sparse.sh: Likewise.

	Fixes https://github.com/coreutils/coreutils/issues/54

2021-08-22  Paul Eggert  <eggert@cs.ucla.edu>

	df: pacify -Wsuggest-attribute=malloc
	Problem found with latest Gnulib and GCC 11.2.1.
	* src/find-mount-point.h (find_mount_point):
	Add _GL_ATTRIBUTE_MALLOC and _GL_ATTRIBUTE_DEALLOC_FREE.

	build: update gnulib submodule to latest

	maint: use clearerr on stdin when appropriate
	This is so that commands like ‘fmt - -’ read from stdin
	both times, even when it is a tty.  Fix some other minor
	issues that are related.
	* src/blake2/b2sum.c (main):
	* src/cksum.c (cksum):
	* src/cut.c (cut_file):
	* src/expand-common.c (next_file):
	* src/fmt.c (fmt):
	* src/fold.c (fold_file):
	* src/md5sum.c (digest_file, digest_check):
	* src/nl.c (nl_file):
	* src/od.c (check_and_close):
	* src/paste.c (paste_parallel, paste_serial):
	* src/pr.c (close_file):
	* src/sum.c (bsd_sum_file):
	Use clearerr on stdin so that stdin can be read multiple times
	even if it is a tty.  Do not assume that ferror preserves errno as
	POSIX does not guarantee this.  Coalesce duplicate diagnostic
	calls.
	* src/blake2/b2sum.c (main):
	* src/fmt.c (main, fmt):
	Report read error, even if it's merely fclose failure.
	* src/fmt.c: Include die.h.
	(fmt): New arg FILE.  Close input (reporting error) if not stdin.
	All callers changed.
	* src/ptx.c (swallow_file_in_memory): Clear stdin's EOF flag.
	* src/sort.c (xfclose): Remove unnecessary feof call.

	doc: spell out stdin, stdout, stderr
	* doc/coreutils.texi: Spell out words like “stdin” in
	English prose.

2021-08-16  Paul Eggert  <eggert@cs.ucla.edu>

	chmod: fix use of uninitialized var if -v
	Problem reported by Michael Debertol (Bug#50070).
	* NEWS: Mention the fix.
	* src/chmod.c (struct change_status): New struct, replacing the
	old enum Change_status.  All uses changed.
	(describe_change): Distinguish between cases depending on
	whether 'stat' or its equivalent succeeded.  Report a line
	of output even if 'stat' failed, as that matches the documentation.
	Rework to avoid casts.
	(process_file): Do not output nonsense modes computed from
	uninitialized storage, removing a couple of IF_LINTs.  Simplify by
	defaulting to CH_NO_STAT.

2021-08-14  Pádraig Brady  <P@draigBrady.com>

	maint: update .gitignore
	* .gitignore: ignore new lib/malloc gnulib directory.

	maint: allow hook script accept "Signed-off-by:"
	* scripts/git-hooks/commit-msg: Relax this constraint.

2021-08-11  Paul Eggert  <eggert@cs.ucla.edu>

	df: fix bug with automounted
	If the command-line argument is automounted, df would use
	stat info that became wrong after the following open.
	* NEWS: Mention the fix (bug#50012).
	* src/df.c (automount_stat_err): New function.
	This fixes the hang on fifos in a better way, by using O_NONBLOCK.
	(main): Use it.

2021-08-08  Pádraig Brady  <P@draigBrady.com>

	cat: with -E fix handling of \r\n spanning buffers
	We must delay handling when \r is the last character
	of the buffer being processed, as the next character
	may or may not be \n.

	* src/cat.c (pending_cr): A new global to record whether
	the last character processed (in -E mode) is '\r'.
	(cat): Honor pending_cr when processing the start of the buffer.
	(main): Honor pending_cr if no more files to process.
	* tests/misc/cat-E.sh: Add test cases.
	Fixes https://bugs.gnu.org/49925

2021-07-31  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update .gitignore

	build: update gnulib submodule to latest

	uniq: pacify GCC -fanalyzer
	Pacify GCC 11.1 -fanalyzer.
	* src/uniq.c (check_file): Use simpler test to check whether this
	is the first time through the loop.  Although the old test was
	correct, the new one is easier to understand and perhaps a tiny
	bit more efficient.

	numfmt: omit unnecessary pointer test
	Caught by GCC 11.1 -fanalyzer.
	* src/numfmt.c (simple_strtod_int): Remove unnecessary test of
	*endptr vs NULL.  Presumably this was a typo and **endptr was
	intended instead of *endptr, but an **endptr test is also
	unnecessary since c_isdigit (0) returns false.

2021-07-29  Pádraig Brady  <P@draigBrady.com>

	doc: add options summary list to tr texinfo
	* doc/coreutils.texi (tr invocation): Provide a summary
	list of the available options, which is useful to
	provide a quick reminder for those already familiar
	with the functionality of tr.
	Fixes https://bugs.gnu.org/49764

2021-07-28  Pádraig Brady  <P@draigBrady.com>

	tests: augment new ls --zero test cases
	* tests/ls/zero-option.sh: Check for the disabled, disallowed,
	and allowed option combinations.

	maint: avoid syntax-check failures in recent ls changes
	* src/ls.c: Fix ifdef indenting and long line.

2021-07-28  Paul Eggert  <eggert@cs.ucla.edu>

	doc: modernize usage of “disk” and “core”
	In documentation and comments, don’t assume that secondary storage
	devices are disk devices.  Similarly, don’t assume that main memory
	uses magnetic cores, which became obsolete in the 1970s.
	* src/du.c (usage):
	* src/ls.c (usage):
	* src/shred.c (usage): Reword to avoid “disk” in usage messages.

	doc: improve ls documentation
	* doc/coreutils.texi (ls invocation): Document implementation more
	closely.  Be more consistent about style.  Omit some needless words.
	* src/ls.c (usage): Don’t overdocument -f, as the details were wrong.
	Omit -1 advice as it’s a bit obsolete now that we have --zero and
	is a bit much for --usage output anyway.

	ls: rename --null to --zero (Bug#49716)
	* NEWS, doc/coreutils.texi (General output formatting):
	* src/ls.c (usage):
	Document this.
	* src/ls.c (ZERO_OPTION): Rename from NULL_OPTION.
	All uses changed.
	(long_options): Rename --null to --zero.
	(dired_dump_obstack, main, print_dir): Use '\n' instead of
	eolbyte where eolbyte must equal '\n'.
	(decode_switches): Decode --zero instead of --null.
	--zero also implies -1, -N, --color=none, --show-control-chars.
	Use easier-to-decipher code to set ‘format’ and ‘dired’.
	Reject attempts to combine --dired and --zero.
	* tests/local.mk: Adjust to test script renaming.
	* tests/ls/zero-option.sh: Rename from tests/ls/null-option.sh,
	and test --zero instead of --null.

	ls: compute defaults more lazily
	* src/ls.c (enum time_type, enum sort_type, enum indicator_style)
	(enum Dereference_symlink, ignore_mode):
	Put ‘= 0’ after default values, since the code relies
	on static storage defaulting to zero.
	(enum sort_type): Reorder so that -1 can be used to represent unset.
	(main): Test print_with_color after parse_ls_color may have reset it.
	(decode_line_length): Return the line length instead of setting
	static storage.  All uses changed.  Treat line lengths exceeding
	PTRDIFF_MAX as infinite, to avoid pointer-subtraction glitches.
	(stdout_isatty): New function, to avoid calling isatty twice.
	(decode_switches): Calculate defaults more lazily, to avoid using
	syscalls or getenv during startup unless the results are more
	likely to be needed.  Use -1 to indicate options that haven’t been
	set on the command line yet.  Move print_with_color test from
	here to ‘main’.  Suppress bogus GCC warning.
	(getenv_quoting_style): Return the quoting style instead of
	setting static storage.
	(init_column_info): New arg MAX_COLS, to avoid recalculating it.
	Caller changed.

2021-07-26  Pádraig Brady  <P@draigBrady.com>

	maint: avoid recent syntax-check issues
	* .gitignore: Cater for recently added poll module.
	* src/stdbuf.c: Avoid false positive from sc_prohibit_readlink.

2021-07-26  Paul Eggert  <eggert@cs.ucla.edu>

	ls: add --null option (Bug#49716)
	* NEWS, doc/coreutils.texi (General output formatting):
	* src/ls.c (usage): Document this.
	* src/ls.c (NULL_OPTION): New constant.
	(long_options): Add --null.
	(eolbyte): New static var.
	(dired_dump_obstack, main, print_dir, print_current_files)
	(print_many_per_line, print_horizontal, print_with_separator):
	Output eolbyte instead of '\n'.
	(decode_switches): Decode --null.
	* tests/ls/null-option.sh: New file.
	* tests/local.mk (all_tests): Add it.

	ls: port to wider off_t, uid_t, gid_t
	* src/ls.c (dired_pos): Now off_t, not size_t, since it counts
	output file offsets.
	(dired_dump_obstack): This obstack's file offsets are now
	off_t, not size_t.
	(format_user_or_group, format_user_or_group_width):
	ID arg is now uintmax_t, not unsigned long, since uid_t and
	gid_t values might exceed ULONG_MAX.
	(format_user_or_group_width): Use snprintf with NULL instead of
	sprintf with a discarded buffer.  This avoids a stack buffer,
	and so should be safer.

	ls: demacroize
	Prefer functions or constants to macros where either will do.
	That’s cleaner, and nowadays there’s no performance reason to
	prefer macros.  All uses changed.
	* src/ls.c (INITIAL_TABLE_SIZE, MIN_COLUMN_WIDTH):
	Now constants instead of macros.
	(file_or_link_mode): New function, replacing the old macro
	FILE_OR_LINK_MODE.
	(dired_outbyte): New function, replacing the old macro DIRED_PUTCHAR.
	(dired_outbuf): New function, replacing the old macro DIRED_FPUTS.
	(dired_outstring): New function, replacing the old macro
	DIRED_FPUTS_LITERAL.
	(dired_indent): New function, replacing the old macro DIRED_INDENT.
	(push_current_dired_pos): New function, replacing the old macro
	PUSH_CURRENT_DIRED_POS.
	(assert_matching_dev_ino): New function, replacing the old macro
	ASSERT_MATCHING_DEV_INO.
	(do_stat, do_lstat, stat_for_mode, stat_for_ino, fstat_for_ino)
	(signal_init, signal_restore, cmp_ctime, cmp_mtime, cmp_atime)
	(cmp_btime, cmp_size, cmp_name, cmp_extension)
	(fileinfo_name_width, cmp_width, cmp_version):
	No longer inline; compilers can deduce this well enough nowadays.
	(main): Protect unused assert with ‘if (false)’ rather than
	commenting it out, so that the compiler checks the code.
	(print_dir): Output the space and newline in the same buffer
	as the human-readable number they surround.
	(dirfirst_check): New function, replacing the old macro
	DIRFIRST_CHECK.  Simplify by using subtraction.
	(off_cmp): New function, replacing the old macro longdiff.
	(print_long_format): No need to null-terminate the string now.
	(format_user_or_group): Let printf count the bytes.

	ls: simplify sprintf usage
	* src/ls.c (format_user_or_group_width, print_long_format):
	Use return value from sprintf instead of calling strlen on
	the resulting buffer, or inferring the length some other way.

	build: update gnulib submodule to latest

	maint: fix white space

	env: fix usage typo
	* src/env.c (usage): Fix pluralization typo.

2021-07-02  Kamil Dudka  <kdudka@redhat.com>

	df: fix duplicated remote entries due to bind mounts
	As originally reported in <https://bugzilla.redhat.com/1962515>,
	df invoked without -a printed duplicated entries for NFS mounts
	of bind mounts.  This is a regression from commit v8.25-54-g1c17f61ef99,
	which introduced the use of a hash table.

	The proposed patch makes sure that the devlist entry seen the last time
	is used for comparison when eliminating duplicated mount entries.  This
	way it worked before introducing the hash table.

	Patch co-authored by Roberto Bergantinos.

	* src/ls.c (struct devlist): Introduce the seen_last pointer.
	(devlist_for_dev): Return the devlist entry seen the last time if found.
	(filter_mount_list): Remember the devlist entry seen the last time for
	each hashed item.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/49298

2021-06-27  Paul Eggert  <eggert@cs.ucla.edu>

	tail: use poll, not select
	This fixes an unlikely stack out-of-bounds write reported by
	Stepan Broz via Kamil Dudka (Bug#49209).
	* bootstrap.conf (gnulib_modules): Replace select with poll.
	* src/tail.c: Do not include <sys/select.h>.
	[!_AIX]: Include poll.h.
	(check_output_alive) [!_AIX]: Use poll instead of select.
	(tail_forever_inotify): Likewise.  Simplify logic, as there is no
	need for a ‘while (len <= evbuf_off)’ loop.

	tail: fix abuse2 test race
	* tests/tail-2/inotify-hash-abuse2.sh (fastpoll):
	Fix race where tailed file ‘f’ temporarily did not exist.

	maint: while (1) → while (true)

2021-06-21  Nikolay Nechaev  <Nikolay_Nechaev@mail.ru>

	maint: remove redundant checks on buffer sizes in tail
	* src/tail.c: remove redundant size checks before calls to
	`xwrite_stdout`

2021-06-21  Pádraig Brady  <P@draigBrady.com>

	stat: use decomposed decimal device numbers by default
	* src/stat.c (default_format): Use decomposed decimal
	representation (major,minor) in the default format.
	This is least ambiguous for human interpretation,
	and more consistent with ls for example.
	Fixes https://bugs.gnu.org/48960

2021-06-21  Pádraig Brady  <P@draigBrady.com>

	stat: support more device number representations
	In preparation for changing the default device number
	representation (to decomposed decimal), provide more
	formatting options for device numbers.

	These new (FreeBSD compat) formatting options are added:

	   %Hd  major device number in decimal (st_dev)
	   %Ld  minor device number in decimal (st_dev)
	   %Hr  major device type in decimal (st_rdev)
	   %Lr  minor device type in decimal (st_rdev)
	   %r   (composed) device type in decimal (st_rdev)
	   %R   (composed) device type in hex (st_rdev)

	* doc/coreutils.texi (stat invocation): Document new formats.
	* src/stat.c (print_it): Handle the new %H and %L modifiers.
	(print_statfs): Adjust to passing the format as two chars
	rather than an int.  Using an int was introduced in commit db42ae78,
	but using separate chars is cleaner and more extensible.
	(print_stat): Likewise.  Handle any modifiers and the new 'r' format.
	(usage): Document the new formats.
	* tests/misc/stat-fmt.sh: Add a test case for new modifiers.
	Addresses https://bugs.gnu.org/48960

2021-06-12  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	Coreutils mistakenly did not list xstrndup as a module
	that it depends on directly.  When the latest Gnulib removed
	the dirname module's dependency on xstrndup, this mistake
	caused coreutils to not build.  Since all of Coreutils's
	uses of xstrndup know the string length, xmemdup0 is a better
	match for what's needed.  Since the size args are typically
	signed or derived from subtracting pointers, the new Gnulib
	ximemdup0 function is a better match yet.
	So, use ximemdup0 instead of xstrndup.
	* src/cut.c, src/dircolors.c, src/expand-common.c, src/expand.c:
	* src/numfmt.c, src/set-fields.c, src/unexpand.c:
	Do not include xstrndup.h; no longer needed.
	* src/dircolors.c (parse_line):
	* src/expand-common.c (parse_tab_stops):
	* src/numfmt.c (parse_format_string):
	* src/set-fields.c (set_fields):
	Use ximemdup0 instead of xstrndup.

2021-05-28  Jim Meyering  <meyering@fb.com>

	maint: bootstrap: remove reference to unused hash-pjw module
	* bootstrap.conf (gnulib_modules): Remove hash-pjw. No longer used.

2021-05-15  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	Fixes a false test failure with MALLOC_CHECK_ set.

	* gnulib: Update to latest.

2021-05-15  Pádraig Brady  <P@draigBrady.com>

	copy: remove fiemap logic
	This is now only used on 10 year old linux kernels,
	and performs a sync before each copy.

	* src/copy.c (extent_copy): Remove function and all callers.
	* src/extent-scan.c: Remove.
	* src/extent-scan.h: Remove.
	* src/fiemap.h: Remove.
	* src/local.mk: Adjust for removed files.
	* NEWS: Adjust to say fiemap is removed.

2021-05-13  Pádraig Brady  <P@draigBrady.com>

	copy: disallow copy_file_range() on Linux kernels before 5.3
	copy_file_range() before Linux kernel release 5.3 had many issues,
	as described at https://lwn.net/Articles/789527/, which was
	referenced from https://lwn.net/Articles/846403/; a more general
	article discussing the generality of copy_file_range().
	Linux kernel 5.3 was released in September 2019, which is new enough
	that we need to actively avoid older kernels.

	* src/copy.c (functional_copy_file_range): A new function
	that returns false for Linux kernels before version 5.3.
	(sparse_copy): Call this new function to gate use of
	copy_file_range().

2021-05-12  Pádraig Brady  <P@draigBrady.com>

	tests: fix tests/cp/sparse-2.sh false failure on some systems
	* tests/cp/sparse-2.sh: Double check cp --sparse=always,
	with dd conv=sparse, in the case where the former didn't
	create a sparse file.  Now that this test is being newly run
	on macos, we're seeing a failure due to seek() not creating
	holes on apfs unless the size is >= 16MiB.

2021-05-12  Pádraig Brady  <P@draigBrady.com>

	tests: ensure we test SEEK_DATA where used
	fiemap is no longer the default copy implementation,
	so check for SEEK_DATA support instead as that's preferred.
	This will ensure better test coverage on systems without fiemap.

	* init.cfg: Replace fiemap_capable_ with seek_data_capable_.
	This is best supported with python 3 so prefer that.
	* tests/seek-data-capable: A new test script checking for
	SEEK_DATA support on the passed file name,
	called from seek_data_capable_.
	* tests/fiemap-capable: Remove no longer used probing script.
	* tests/cp/fiemap-perf.sh: Renamed to tests/cp/sparse-perf.sh
	* tests/cp/fiemap-2.sh: Renamed to tests/cp/sparse-2.sh
	* tests/cp/fiemap-extents.sh: Renamed to tests/cp/sparse-extents.sh
	* tests/cp/sparse-fiemap.sh: Renamed to tests/cp/sparse-extents-2.sh
	* tests/cp/fiemap-FMR.sh: Renamed to tests/cp/copy-FMR.sh
	* tests/local.mk: Reference the renamed tests.

2021-05-12  Pádraig Brady  <P@draigBrady.com>

	copy: handle system security config issues with copy_file_range()
	* src/copy.c (sparse_copy): Upon EPERM from copy_file_range(),
	fall back to a standard copy, which will give a more accurate
	error as to whether the issue is with the source or destination.
	Also this will avoid the issue where seccomp or apparmor are
	not configured to handle copy_file_range(), in which case
	the fall back standard copy would succeed without issue.
	This specific issue with seccomp was noticed for example in:
	https://github.com/golang/go/issues/40900

	copy: handle EOPNOTSUPP from SEEK_DATA
	* src/copy.c (infer_scantype): Ensure we don't error out
	if SEEK_DATA returns EOPNOTSUPP, on systems where this value
	is distinct from ENOTSUP.  Generally both of these should be checked.

	copy: handle ENOTSUP from copy_file_range()
	* src/copy.c (sparse_copy): Ensure we fall back to
	a standard copy if copy_file_range() returns ENOTSUP.
	This generally is best checked when checking ENOSYS,
	but it also seems to be a practical concern on Centos 7,
	as a quick search gave https://bugzilla.redhat.com/1840284

2021-05-10  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	Fixes a bits/long-double.h include build issue on some systems.

	* bootstrap: Sync new --version option from gnulib.
	* gnulib: Update to lastest.
	Reported by Carl Edquist

2021-05-10  Carl Edquist  <edquist@cs.wisc.edu>

	build: fix __get_cpuid_count check to catch link failure
	The test program will compile successfully even if __get_cpuid_count
	is not declared.  The error for the missing symbol will only show up
	at link time.  Thus, use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE.

	* configure.ac (__get_cpuid_count check): Use C_LINK_IFELSE instead
	of AC_COMPILE_IFELSE.
	(__get_cpuid check): Likewise.

2021-05-08  Pádraig Brady  <P@draigBrady.com>

	maint: consistently free hash structures in dev mode
	Ensure we call hash_free() to avoid valgrind and leak_sanitizer
	"definitely lost" warnings.  These were not real leaks as
	we terminate immediately after, but we should avoid these
	"definitely lost" warnings where possible.

	* src/copy.c: Add dest_info_free() and src_info_free().
	* src/copy.h: Declare the above.
	* src/cp-hash.c: Don't define unless "lint" is defined.
	* src/install.c: Call dest_info_free() in dev mode.
	* src/mv.c: Likewise.
	* src/cp.c: Likewise. Also call src_info_free().
	* src/ln.c: Call hash_free() in dev mode.
	* src/tail.c: Call hash_free() even if about to exit, in dev mode.

	Fixes https://bugs.gnu.org/48189

2021-05-06  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: fix sc_space_before_open_paren failure
	* src/copy.c (dest_info_init): Add space before parens.
	(src_info_init): Likewise.
	Syntax-check failure introduced in the previous commit.

2021-05-03  Pádraig Brady  <P@draigBrady.com>

	copy: exit immediately upon failure to allocate hash memory
	* src/copy.c (dest_info_init, src_info_init): Terminate immediately
	upon memory exhaustion.

2021-05-02  Pádraig Brady  <P@draigBrady.com>

	copy: ensure we enforce --reflink=never
	* src/copy.c (sparse_copy): Don't use copy_file_range()
	with --reflink=never as copy_file_range() may implicitly
	use acceleration techniques like reflinking.
	(extent_copy): Pass through whether we allow reflinking.
	(lseek_copy): Likewise.
	Fixes https://bugs.gnu.org/48164

	wc: add --debug to diagnose which implementation used
	* src/wc.c: (main): Handle the new --debug option.
	Only call avx2_supported if needed.
	(avx2_supported): Diagnose various failures and attempts.
	* NEWS: Mention the new wc improvement and --debug option.

2021-05-02  Kristoffer Brånemyr  <ztion1@yahoo.se>

	wc: use avx2 optimization when counting only lines
	Use cpuid to detect CPU support for avx2 instructions.
	Performance was seen to improve by 5x for a file with only newlines,
	while the performance for a file with no such characters is unchanged.

	* configure.ac [USE_AVX2_WC_LINECOUNT]: A new conditional,
	set when __get_cpuid_count() and avx2 compiler intrinsics are supported.
	* src/wc.c (avx2_supported): A new function using __get_cpuid_count()
	to determine if avx2 instructions are supported.
	(wc_lines): A new function refactored from wc(),
	which implements the standard line counting logic,
	and provides the fallback implementation for when avx2 is not supported.
	* src/wc_avx2.c: A new module to implement using avx2 intrinsics.
	* src/local.mk: Reference the new module.  Note we build as a separate
	lib so that it can be portably built with separate -mavx2 etc. flags.

2021-05-01  Paul Eggert  <eggert@cs.ucla.edu>

	touch: fix wrong diagnostic (Bug#48106)
	Problem reported by Roland (Bug#48106).
	* src/touch.c (touch): Take more care when deciding whether
	to use open_errno or utime_errno in the diagnostic.
	Stop worrying about SunOS 4 (which as part of the problem),
	as it’s long obsolete.  For Solaris 10, verify that EINVAL
	really means the file was a directory.

2021-04-27  Paul Eggert  <eggert@cs.ucla.edu>

	maint: port to Autoconf 2.71
	* configure.ac: Use AC_PROG_CC, not AC_PROG_CC_STDC.
	* gl/modules/smack (configure.ac):
	* m4/jm-macros.m4 (coreutils_MACROS):
	* m4/xattr.m4 (gl_FUNC_XATTR):
	Use AS_HELP_STRING, not AC_HELP_STRING.
	* m4/check-decl.m4 (gl_CHECK_DECLS):
	Do not require AC_HEADER_TIME; we no longer care about it directly.
	* m4/jm-macros.m4 (coreutils_MACROS):
	Do not require AC_ISC_POSIX, which became obsolete in 2006.
	Use AC_LINK_IFELSE instead of AC_TRY_LINK.

	csplit: size_t overflow check
	* src/csplit.c (get_new_buffer): Fix unlikely size_t overflow.

	build: update gnulib submodule to latest
	* src/csplit.c (load_buffer):
	* src/pinky.c (create_fullname):
	Use intprops-based checks rather than xalloc_oversized,
	since Gnulib xalloc.h no longer includes xalloc-oversized.h.

2021-04-27  Zorro Lang  <zlang@redhat.com>

	copy: do not refuse to copy a swap file
	* src/copy.c (sparse_copy): Fallback to read() if copy_file_range()
	fails with ETXTBSY.  Otherwise it would be impossible to copy files
	that are being used as swap.  This used to work before introducing
	the support for copy_file_range() in coreutils.  (Bug#48036)

2021-04-22  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: fix FP in ls/stat-free-color.sh
	On newer systems like Fedora 34 and openSUSE Tumbleweed, ls(1) calls
	newfstatat(STDOUT_FILENO, ...), but only when there is something to
	output.

	* tests/ls/stat-free-color.sh: Add -a option to the reference invocation
	of ls, thus enforcing something gets output.

2021-04-11  Pádraig Brady  <P@draigBrady.com>

	doc: clarify that ln --relative requires --symbolic to be specified
	* doc/coreutils.texi (ln invocation): State --symbolic is required.
	* src/ln.c (usage): Explicitly state -s is not implied.
	Fixes https://bugs.gnu.org/47703

	doc: clarify what's counted by wc
	* src/wc.c (usage): State that only printable characters are considered
	when counting words.  This also disambiguates wether we're talking
	about bytes or characters in this context.
	* doc/coreutils.texi (wc invocation): Likewise.  Also clarify
	that --characters counts valid locale aware characters,
	and that --lines does not count a trailing "line" unless
	it ends with a newline character.
	Fixes https://bugs.gnu.org/47702

	maint: use "char const *" rather than "const char *"
	* cfg.mk (sc_prohibit-const-char): Add a new syntax-check to
	enforce this style.
	* *.[ch]: sed -i 's/const char \*/char const */g'

2021-04-11  Pádraig Brady  <P@draigBrady.com>

	ls: cache name width determination
	This is especially important now for --sort=width,
	as that can greatly increase how often this
	expensive quote_name_width() function is called per file.

	This also helps the default invocation of ls,
	or specifically the --format={across,vertical} cases
	(when --width is not set to 0),
	to avoid two calls to this function per file.

	Note the only case where we later compute the width,
	is for --format=commas.  That's only done once though,
	so we leave the computation close to use to
	maximize hardware caching.

	* src/ls.c (struct fileinfo): Add a WIDTH member to cache
	the screen width of the file name.
	(update_current_files_info): Set the WIDTH members for cases
	they're needed multiple times.  Note we do this explicitly here,
	rather than caching at use, so that the fileinfo
	structures can remain const in the sorting and presentation functions.
	(sort_files): Call the new update_current_files_info() in this
	initialization function.
	(fileinfo_name_width): Renamed from fileinfo_width,
	and adjusted to return the cached value if available.

2021-04-11  Carl Edquist  <edquist@cs.wisc.edu>

	ls: add --sort=width option to sort by file name width
	This helps identify the outliers for long filenames, and also produces
	a more compact display of columns when listing a directory with many
	entries of various widths.

	* src/ls.c (sort_type, sort_types, sort_width): New sort_width sort
	type.
	(sort_args): Add "width" sort arg.
	(cmp_width, fileinfo_width): New sort function and helper for file name
	width.
	(quote_name_width): Add function prototype declaration.
	(usage): Document --sort=width option.
	* doc/coreutils.texi: Document --sort=width option.
	* tests/ls/sort-width-option.sh: New test for --sort=width option.
	* tests/local.mk: Reference new test.
	* NEWS: Mention the new feature.

2021-03-30  Paul Eggert  <eggert@cs.ucla.edu>

	env: simplify --split-string memory management
	* bootstrap.conf (gnulib_modules): Add idx.
	* src/env.c: Include idx.h, minmax.h.
	Prefer idx_t to ptrdiff_t when values are nonnegative.
	(valid_escape_sequence, escape_char, validate_split_str)
	(CHECK_START_NEW_ARG):
	Remove; no longer needed now that we validate as we go.
	(struct splitbuf): New type.
	(splitbuf_grow, splitbuf_append_byte, check_start_new_arg)
	(splitbuf_finishup): New functions.
	(build_argv): New arg ARGC.  Validate and process in one go, using
	the new functions; this is simpler and more reliable than the old
	approach (as witness the recent bug).  Avoid integer overflow in
	the unlikely case where the string contains more than INT_MAX
	arguments.
	(parse_split_string): Simplify by exploiting the new build_argv.

	build: update gnulib submodule to latest

2021-03-29  Pádraig Brady  <P@draigBrady.com>

	tests: add a test case for recent env fix
	* tests/misc/env-S.pl: Add a test case for recent commit ec6904f0.

	maint: ignore all .a files in .gitignore
	* .gitignore: Rather than add the new src/libcksum_pclmul.a,
	just ignore any such libs.
	* src/.gitignore: Likewise.
	Reported by Kristoffer Brånemyr.

2021-03-26  Paul Eggert  <eggert@cs.ucla.edu>

	env: prefer ptrdiff_t
	* src/env.c (usvars_used, vnlen, unset_envvars, expansion)
	(build_argv): Prefer ptrdiff_t to size_t when either will do.

	env: improve whitespace warning
	* src/env.c (main): Issue -S warning for any whitespace,
	not just space.

	env: use GNU coding style
	* src/env.c: Use GNU coding style for recentish changes.

	env: remove asserts
	The assertions didn’t help catch the most recent bug which
	was in their area, and kind of get in the way.
	* src/env.c: Do not include <assert.h>, and remove all assertions.
	These seem to have been put in to pacify gcov, but surely there’s
	a better way.
	(escape_char): Pacify GCC with 'assume' instead.

	doc: document env fix
	* NEWS, doc/coreutils.texi (env invocation): Document recent change.

	env: fix address violation with '\v' in -S
	Problem reported by Frank Busse (Bug#47412).
	* src/env.c (C_ISSPACE_CHARS): New macro.
	(shortopts, build_argv, main): Treate all C-locale space
	characters like space and tab, for compatibility with FreeBSD.
	(validate_split_str, build_argv, parse_split_string):
	Use the C locale, not the current locale, to determine whether a
	byte is a space character.

2021-03-25  Paul Eggert  <eggert@cs.ucla.edu>

	hostname: pacify valgrind
	* src/hostname.c (main) [IF_LINT]: Free hostname (Bug#47384).

	hostname: use puts
	* src/hostname.c (main): Prefer puts to printf "%s\n".

	maint: indenting
	* src/ln.c: Fix indenting.

2021-03-25  Kamil Dudka  <kdudka@redhat.com>

	ln: fix memory leaks in do_link
	* src/ln.c (do_link): Free memory allocated by convert_abs_rel
	on all code paths (Bug#47373).

2021-03-25  Paul Eggert  <eggert@cs.ucla.edu>

	stdbuf: port lib to macOS
	* src/libstdbuf.c (fprintf, free, strtoumax): Undef these too,
	since Gnulib might replace them.

2021-03-24  Paul Eggert  <eggert@cs.ucla.edu>

	cksum: port recent changes to macOS
	* src/cksum.c (cksum_slice8): Fix bug on little-endian
	platforms lacking __bswap_32: the SWAP macro evaluates
	its argument multiple times, but the macro has a side effect.

2021-03-22  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: update bootstrap from gnulib
	* bootstrap: Sync from gnulib/build-aux/bootstrap; the previous gnulib
	update (commit 1a3eb6c30) missed to update that file.

2021-03-21  Paul Eggert  <eggert@cs.ucla.edu>

	ptx: remove use of diacrit module
	The diacrit module is obsolete, and ptx’s use of it is obsolete
	too; it assumes an 8-bit locale (not that common these days) and
	that TeX cannot process the 8-bit characters (nowadays, it can).
	* NEWS, doc/coreutils.texi (Charset selection in ptx): Document this.
	* bootstrap.conf (gnulib_modules): Remove diacrit.
	* src/ptx.c: Do not include diacrit.h.
	(print_field, fix_output_parameters): Remove obsolete support
	for 8-bit diacritics.

	build: update gnulib submodule to latest

2021-03-15  Pádraig Brady  <P@draigBrady.com>

	cksum: don't exit immediately if a single file overflows
	This behavior was introduced in commit FILEUTILS-4_0_44-4-g519b707b4.

	* src/cksum.c (cksum_slice8): Only report the overflow, and continue.
	* src/cksum_pclmul.c (cksum_pclmul): Likewise.

2021-03-15  Pádraig Brady  <P@draigBrady.com>

	cksum: add --debug to diagnose which implementation used
	* src/cksum.c: (main): Use getopt_long to parse options,
	and handle the new --debug option.
	(pclmul_supported): Diagnose various failures and attempts.
	* NEWS: Mention the new option.

2021-03-15  Kristoffer Brånemyr  <ztion1@yahoo.se>

	cksum: use pclmul hardware instruction for CRC32 calculation
	Use cpuid to detect CPU support for hardware instruction.
	Fall back to slice by 8 algorithm if not supported.
	A 500MiB file improves from 1.40s to 0.67s on an i3-2310M

	* configure.ac [USE_PCLMUL_CRC32]: A new conditional,
	set when __get_cpuid() and clmul compiler intrinsics are supported.
	* src/cksum.c (pclmul_supported): A new function using __get_cpuid()
	to determine if pclmul instructions are supported.
	(cksum): A new function refactored from cksum_slice8(),
	which calls pclmul_supported() and then cksum_slice8()
	or cksum_pclmul() as appropriate.
	* src/cksum.h: Export the crctab array for use in the new module.
	* src/cksum_pclmul.c: A new module to implement using pclmul intrinsics.
	* po/POTFILES.in: Reference the new cksum_pclmul module.
	* src/local.mk: Likewise.  Note we build it as a separate library
	so that it can be portably built with separate -mavx etc. flags.
	* tests/misc/cksum.sh: Add new test modes for pertinent buffer sizes.

2021-03-14  Pádraig Brady  <P@draigBrady.com>

	maint: propagate DEPENDENCIES to libs in single binary mode
	build-aux/gen-single-binary.sh (override_single): A new function
	to refactor the existing mappings for dir, vdir, and arch.
	This function now also sets the DEPENDENCIES variable so that these
	dependencies can be maintained later in the script, where
	we now propagate the automake generated $(src_$cmd_DEPENDENCIES)
	to our equivalent src_libsinglebin_$cmd_a_DEPENDENCIES.
	This will ensure that any required libs are built,
	which we require in a following change to cksum that
	builds part of it as a separate library.

2021-02-19  Pádraig Brady  <P@draigBrady.com>

	rmdir: diagnose non following of symlinks with trailing slash
	GNU/Linux is unusual here in that rmdir("symlink/") returns ENOTDIR,
	whereas Solaris and FreeBSD at least, will follow the symlink
	and remove the target directory.  We don't make the behavior
	on Linux kernels consistent, but at least clarify
	the confusing error message.

	* src/rmdir (main): Output a specific error message for the above case.
	(remove_parents): In the error message, don't assume intermediate paths
	are directories, as they could be symlinks.
	* tests/rmdir/symlink-errors.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the improvement.

2021-02-18  Kamil Dudka  <kdudka@redhat.com>

	stat,tail: add support for the exfat file system
	Bug: https://bugzilla.redhat.com/1921427

	* src/stat.c (human_fstype): Add case for the 'exfat' file system type.
	* NEWS: Mention the Improvement.
	Fixes https://bugs.gnu.org/46613

2021-02-15  Erik Auerswald  <auerswal@unix-ag.uni-kl.de>

	pr: fix alignment of input tabs to multiple columns
	This regression was introduced in commit COREUTILS-6_8-58-g553d347d3

	* src/pr.c (init_parameters): Process tabs for multiple columns.
	* tests/pr/pr-tests.pl: Add test cases.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/46422

2021-02-10  Pádraig Brady  <P@draigBrady.com>

	cat: extend --show-ends to show \r\n as ^M$
	  - \r\n is common a line end combination
	  - catting such a file without options causes it to display normally
	  - overwriting the first char with $, loses info

	* src/cat.c (cat): Convert \r preceeding a \n to ^M.
	* tests/misc/cat-E.sh: New test.
	* tests/local.mk: Reference new test.
	* tests/misc/cat-proc.sh: Fix typo.
	* doc/coreutils.texi (cat invocation): Mention the new behavior.
	* NEWS: Mention the improvement.

2021-01-26  Paul Eggert  <eggert@cs.ucla.edu>

	expr: fix bug with unmatched \(...\)
	Problem reported by Qiuhao Li.
	* NEWS: Mention this.
	* doc/coreutils.texi (String expressions):
	Document the correct behavior, which POSIX requires.
	* src/expr.c (docolon): Treat unmatched \(...\) as empty.
	* tests/misc/expr.pl: New test.

2021-01-25  Pádraig Brady  <P@draigBrady.com>

	split: fix --number=K/N to output correct part of file
	This functionality regressed with the adjustments
	in commit v8.25-4-g62e7af032

	* src/split.c (bytes_chunk_extract): Account for already read data
	when seeking into the file.
	* tests/split/b-chunk.sh: Use the hidden ---io-blksize option,
	to test this functionality.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/46048

2021-01-19  Paul Eggert  <eggert@cs.ucla.edu>

	doc: rmdir --recursive substitutes
	* doc/coreutils.texi (rmdir invocation): Add note on how to remove
	empty subdirectories recursively.

2021-01-15  Paul Eggert  <eggert@cs.ucla.edu>

	mkdir: fix bug when -m's more generous than umask
	Problem reported by David McCall (Bug#45886).
	I introduced this problem when fixing Bug#14371.
	* NEWS: Mention the fix.
	* src/mkdir.c (struct mkdir_options): New members umask_ancestor,
	umask_self, replacing umask_value.
	(make_ancestor): Use them when temporarily adjusting umask.
	(main): Set them, and set the umask to umask_self instead
	of leaving it alone.
	* tests/mkdir/perm.sh (tests): Add test case for bug.

2021-01-09  Paul Eggert  <eggert@cs.ucla.edu>

	doc: modernize and fix regexp xref
	* doc/coreutils.texi: Fix regexp cross-reference that had become
	out-of-date (Bug#45749).  Also, fix some obsolete references to
	SunOS and to /usr/dict/words, and change “Linux” to “GNU/Linux”
	where appropriate.  Unfortunately the pipeline example gets more
	complicated since /usr/share/dict/words is not sorted the way that
	‘comm’ wants.

2021-01-03  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: make formatting of SEE ALSO in cat.1 and tac.1 consistent
	None of the coreutils man pages - but the two above - are using bold
	setting for the references to other man pages in the SEE ALSO section.

	* man/cat.x (SEE ALSO): Remove '\fB...\fP' setting.
	* man/tac.x: Likewise, and add a reference to cat(1).

2021-01-02  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: exempt 'doc/fdl.texi' from 'make update-copyright'
	This file is a copy from gnulib and therefore should not get changed
	by the yearly update.

	* .x-update-copyright: Add pattern for the above file.
	* doc/fdl.texi: Revert the previous change.

2021-01-01  Pádraig Brady  <P@draigBrady.com>

	maint: update all copyright year number ranges
	Run "make update-copyright" and then...

	* gnulib: Update to latest with copyright year adjusted.
	* tests/init.sh: Sync with gnulib to pick up copyright year.
	* bootstrap: Likewise.
	* tests/sample-test: Adjust to use the single most recent year.

2020-12-28  Pádraig Brady  <P@draigBrady.com>

	tests: add a test for cksum
	* tests/misc/cksum.sh: Test basic operation.
	* tests/local.mk: Reference the new test.

2020-12-28  Kristoffer Brånemyr  <ztion1@yahoo.se>

	cksum: use more efficient slice by 8 algorithm
	A 100MB file improves from 2.50s to 1.80s on a Sparc T5220
	A 100MB file improves from 0.54s to 0.13s on an i3-2310M

	* bootstrap.conf: Explicitly depend on byteswap,
	since now used directly by coreutils.
	* src/cksum.c (cksum): Process in multiples of 8 bytes.
	(main): Adjust for generation of expanded crctab.
	* src/cksum.h: Split now larger crctab to separate header.
	* src/local.mk: Reference the new header.
	* NEWS: Mention the improvement.

2020-12-25  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* src/make-prime-list.c (free): Undef, since Gnulib's free-posix
	module now defines this to rpl_free on some platforms.

2020-12-18  Pádraig Brady  <P@draigBrady.com>

	doc: remove extraneous ./src/ prefix from examples
	* doc/coreutils.texi (numfmt invocation): s|./src/numfmt|numfmt|

	doc: add `seq inf` and `sleep inf` examples to texinfo
	* doc/coreutils.texi (seq invocation): Mention "inf" is supported,
	and describe that it's handled specially to generate infinite
	whole integer sequences.  Also mention that such infinite generation
	is supported for integer steps up to 200.
	(sleep invocation): Give `sleep inf` as an example to sleep forever.
	* src/seq.c: Add a comment on SEQ_FAST_STEP_LIMIT, to say it's
	reflected in the texinfo description.

2020-12-15  Paul Eggert  <eggert@cs.ucla.edu>

	doc: document mkdir -m -p better
	Chris Colohan wrote that the man page did not do enough to dispel
	a common misunderstanding that “contributed to one of the scariest
	outages Google has ever seen” (Bug#45258).
	* doc/coreutils.texi (mkdir invocation):
	* src/mkdir.c (usage): Document -m vs -p better.

2020-12-15  KOBAYASHI Takashi  <a1415tk@aiit.ac.jp>

	nl: fix --section-delimiter handling of single characters
	* src/nl.c (main): Enforce the POSIX specified
	behavior of assuming ':' is specified after a single
	character argument to -d.
	* tests/misc/nl.sh: Add a test case.
	* NEWS: Mention the bug fix.

2020-12-15  Pádraig Brady  <P@draigBrady.com>

	doc: mention the GNU extensions to nl --section-delimiter
	* doc/coreutils.texi (nl invocation): Mention the GNU extensions
	of allowing arbitrary length and empty delimiter strings.
	* src/nl.c (usage): Likewise.
	* tests/misc/nl.sh: Add test cases for the GNU extensions.

	maint: refactor nl section delimiter handling
	* src/nl.c (main): Update the default delimiter characters
	when passed two characters with --section-delimiter.
	Avoid redundant copies for the body and footer delimiter strings,
	and instead, just offset into the header string.
	(check_section): Avoid redundant comparing of 2 bytes of memory
	for an empty delimiter.

2020-12-12  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2020-12-08  Arman Absalan  <armanaxh@gmail.com>

	chroot,comm,join: fix usage options style
	* src/chroot.c (usage): Fix indentation of options.
	* src/comm.c: Likewise.
	* src/join.c: Likewise.

2020-12-01  Pádraig Brady  <P@draigBrady.com>

	date: with --debug, show the output format
	The format can be determined from --options or the locale,
	so it's useful to output the format string being used.

	* src/date.c (show_date): Show the output format
	along with the date being shown.
	* tests/misc/date-debug.sh: Adjust accordingly.
	Addresses https://bugs.gnu.org/44960

2020-11-27  Tim Gates  <tim.gates@iress.com>

	maint: fix typo, characteres -> characters
	* src/expr.c: Fix typo in comment.

2020-11-26  Nishant Nayan  <nishant.nayan@oracle.com>

	rm: do not skip files upon failure to remove an empty dir
	When removing a directory fails for some reason, and that directory
	is empty, the rm_fts code gets the return value of the excise call
	confused with the return value of its earlier call to prompt,
	causing fts_skip_tree to be called again and the next file
	that rm would otherwise have deleted to survive.

	* src/remove.c (rm_fts): Ensure we only skip a single fts entry,
	when processing empty dirs.  I.e. only skip the entry
	having successfully removed it.
	* tests/rm/empty-immutable-skip.sh: New root-only test.
	* tests/local.mk: Add it.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/44883

2020-11-26  Pádraig Brady  <P@draigBrady.com>

	maint: mention in NEWS about new df remote fs types
	* NEWS: Mention new remote file system types
	recognized since gnulib commit dd1fc46b.

2020-11-23  Pádraig Brady  <P@draigBrady.com>

	maint: remove no longer needed se_const helper
	This was needed before libselinux-2.3 (May 2014),
	but modern releases have the correct const declarations.

	* src/chcon.c: Remove se_const() wrapper.
	* src/cp.c: Likewise.
	* src/install.c: Likewise.
	* src/mkdir.c: Likewise.
	* src/mkfifo.c: Likewise.
	* src/mknod.c: Likewise.
	* src/system.h: Likewise.
	* gnulib: update to pick up const correctness fixes in selinux stubs.

2020-11-23  Pádraig Brady  <P@draigBrady.com>

	maint: fix syntax-check failure
	* po/POTFILES.in (src/selinux.c): Remove entry as this source doesn't
	contain any translatable strings anymore; avoids a sc_po_check failure.

2020-11-23  Paul Eggert  <eggert@cs.ucla.edu>

	install: suppress "Operation not supported" false alarms
	At least, I *think* they are false alarms.  An SELinux expert eye
	would be welcome.
	* src/install.c (setdefaultfilecon): If selabel_lookup fails
	due to either ENOTSUP or ENODATA, don’t diagnose the issue.
	Problem reported by Kamil Dudka in:
	https://lists.gnu.org/r/coreutils/2020-11/msg00050.html

	maint: propagate errno better in selinux.c
	* src/selinux.c: Don’t include die.h; no longer needed.
	(computecon, defaultcon, restorecon): Propagate errno.
	(defaultcon, restorecon): Don’t diagnose errors or exit, as that’s
	the caller’s responsibility.

2020-11-23  Pádraig Brady  <P@draigBrady.com>

	maint: use absolute paths with selabel_lookup
	* src/selinux.c: selabel_lookup requires absolute paths
	(while only older matchpathcon before libselinux < 2.1.5 2011-0826 did).
	* po/POTFILES.in: Readd src/selinux.c since we now have
	a translatable error message.

2020-11-22  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: minor cleanup
	The previous commit introduced a couple of syntax-check failures.

	* .gitignore (/lib/se-label.h): Add entry to silence the
	sc_gitignore_missing check.  Sort entries in C locale.
	* po/POTFILES.in (src/selinux.c): Remove entry as this source doesn't
	contain any translatable strings anymore; avoids a sc_po_check failure.
	* src/mv.c: Replace tabs by spaces to avoid complaints by
	sc_prohibit_tab_based_indentation.

2020-11-22  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: port from matchpathcon to selabel_lookup
	Ubuntu 20.10 is using a newer version of libselinux that
	complains that matchpathcon is obsolete.  Rewrite the code
	that it uses the recommended selabel_lookup instead.
	* m4/jm-macros.m4 (coreutils_MACROS): Do not check for
	matchpathcon_init_prefix, as it is no longer used.
	* src/copy.c (set_file_security_ctx): Omit process_local arg,
	as it is equivalent to !x->set_security_context.  All callers changed.
	* src/copy.h (struct cp_options): set_security_context is now of
	type struct selabel_handle *, not bool.  All uses changed.
	* src/cp.c, src/install.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
	* src/mv.c: Include selinux/label.h.
	(main): Use selabel_open for set_security context.
	* src/install.c (matchpathcon_init_prefix): Remove; now unused.
	(get_labeling_handle): New static function.
	(setdefaultfilecon, main): Use it.
	(setdefaultfilecon): Do something regardless of
	ENABLE_MATCHPATHCON, which seems to be a revenant macro.
	(setdefaultfilecon): Use selabel_lookup instead of the obsolescent
	matchpathcon.  Report an error unless it fails due to ENOENT.
	* src/local.mk (src_ginstall_CPPFLAGS): Remove.
	* src/selinux.c: Include selinux/label.h
	Do not include die.h, error.h, canonicalize.h.
	(defaultcon, restorecon_private, restorecon):
	New arg HANDLE.  All callers changed.
	Use selabel_lookup rather than matchpathcon.
	(restorecon_private, restorecon): Don’t lose track of errno.
	* src/selinux.c, src/selinux.h:
	(restorecon): Don’t call ‘error’; that’s the caller’s job.
	Use HAVE_SELINUX_LABEL_H, not HAVE_SELINUX_SELINUX_H,
	in case there is some weird system with the former but not the latter.
	* src/selinux.h (struct selinux_handle): Add forward decl.

	build: port to Solaris 10
	* src/local.mk (src_ln_LDADD, src_mktemp_LDADD, src_tac_LDADD):
	Add $(LIB_CLOCK_GETTIME), since these use tempname which uses
	clock_gettime if getrandom fails.  On platforms like Solaris 10,
	clock_gettime is not in the standard C library.

	build: update gnulib submodule to latest

2020-11-18  Pádraig Brady  <P@draigBrady.com>

	doc: mention that sort -g supports hex numbers
	* doc/coreutils.texi (sort invocation): Mention explicitly
	that --general-numeric-sort supports arbitrary format hex numbers,
	but also mention that consistent case/width hex numbers can
	be sorted faster with a standard sort.

2020-11-14  Pádraig Brady  <P@draigBrady.com>

	tr: fix crash validating -c with some case char classes
	This crash was identified by Cyber Independent Testing Lab:
	https://cyber-itl.org/2020/10/28/citl-7000-defects.html
	and was introduced with commit v8.5-163-g3f48829c2

	* src/tr.c (validate_case_classes): Don't apply these
	extra case alignment checks in the --complement case,
	which is even more restrictive as to the contents of SET2.
	* tests/misc/tr-case-class.sh: Add a test case,
	for a large SET1, which caused the length adjustment
	in validate_case_classes to underflow and trigger the assert.
	* NEWS: Mention the bug fix.

2020-11-12  Ben Pfaff  <blp@cs.stanford.edu>

	doc: clarify in texinfo that `test == ...` is non portable
	* doc/coreutils.texi (test invocation): Mention non portability
	of the double equals form.

2020-11-11  Pádraig Brady  <P@draigBrady.com>

	ls: fix crash printing SELinux context for unstatable files
	This crash was identified by Cyber Independent Testing Lab:
	https://cyber-itl.org/2020/10/28/citl-7000-defects.html
	and was introduced with commit v6.9.90-11-g4245876e2

	* src/ls.c (gobble_file): Ensure scontext is initialized
	in the case where files are not statable.
	* tests/ls/selinux-segfault.sh: Renamed from proc-selinux-segfault.sh,
	and added test case for broken symlinks.
	* tests/local.mk: Adjust for the renamed test.
	* NEWS: Mention the bug fix.

2020-11-07  Pádraig Brady  <P@draigBrady.com>

	timeout: support sub-second timeouts on macOS
	* m4/jm-macros.m4: Check for setitimer.
	* src/timeout.c: Use setitimer if timer_settime is not available.
	* NEWS: Mention the improvement.

2020-11-07  Pádraig Brady  <P@draigBrady.com>

	maint: avoid strncat warning on GCC
	GCC 10.1.1 without optimization gives:

	  error: ‘strncat’ argument 2 declared attribute ‘nonstring’
	    [-Werror=stringop-overflow=]
	    strncat (comment, UT_ID (utmp_ent), utmpsize);

	Note the strncat man page says that:
	  "src does not need to be null-terminated
	   if it contains n or more bytes."
	And the POSIX spec says that the second (source) parameter
	is an array not a string.
	So I think it's incorrect for strncat to require src be a string type.
	This constraint seems to be being added to the gcc builtin strncat,
	as specifiying -fno-builtin also avoids the warning.
	Note specifying any optimization level also avoids the warning.

	* src/who.c (make_id_equals_comment): Avoid the issue by using
	stpcpy + stzncpy, instead of strcpy + strncat.
	This pattern is used elsewhere in who.c

2020-10-28  Pádraig Brady  <P@draigBrady.com>

	stat,tail: sync file system constants from the linux kernel
	* src/stat.c: Add magic constants for "devmem", and
	"zonefs" file systems.
	* NEWS: Mention the improvement.

	maint: cleanup operation of fs-magic-compare
	* src/local.mk: Ensure we map 2 hex digits to 4,
	so that we don't output already handled Z3FOLD file system (0x33).
	Also hide the generation command for src/fs.h.

2020-10-27  Pádraig Brady  <P@draigBrady.com>

	doc: make blank lines before --help consistent
	* src/basenc.c (usage): Remove extraneous blank line,
	to be consistent with other utilities that have options.
	* src/realpath.c: Likewise.
	* src/runcon.c: Likewise.
	Addresses https://bugs.gnu.org/44248

2020-10-26  Jim Meyering  <meyering@fb.com>

	maint: avoid new sort.c warning from upcoming GCC11
	gcc version 11.0.0 20201025 (experimental) warns that
	src/sort.c:1655:1: warning: function might be candidate for attribute \
	  'pure' if it is known to return normally [-Wsuggest-attribute=pure]
	* src/sort.c (limfield): Mark as pure.

2020-10-26  Kamil Dudka  <kdudka@redhat.com>

	dd: drop old workaround for lseek() bug in Linux kernel
	The workaround triggers warnings from newer kernel versions in case
	a user does not have sufficient privileges for the MTIOCGET ioctl.

	* src/dd.c (skip_via_lseek): Drop wrapper function no longer needed.
	(skip): Use lseek() directly.
	(advance_input_after_read_error): Likewise.

	Reported-by: Nir Soffer at https://bugzilla.redhat.com/1876840
	Fixes https://bugs.gnu.org/44235

2020-10-26  KOBAYASHI Takashi  <a1415tk@aiit.ac.jp>

	nl: support a negative --line-increment
	* src/nl.c (main): Allow -i to accept down to INTMAX_MIN.
	* tests/misc/nl.sh: Add test cases.
	* NEWS: Mention the new feature.

2020-10-25  Pádraig Brady  <P@draigBrady.com>

	nl: only fail if need to output overflowed numbers
	Previously we would have failed immediately upon internal overflow,
	which didn't output the full line being processed, and assumed
	there would be another numbered line.

	* src/nl.c (line_no_overflow): A new global to track overflow.
	(print_lineno): Only fail if about to output an overflowed number.
	(reset_lineno): A new function to refactor resetting of the number,
	and which also clears line_no_overflow.
	* tests/misc/nl.sh: Add a test case.

2020-10-25  Pádraig Brady  <P@draigBrady.com>

	maint: add lib/parse-datetime-gen.h to .gitignore
	* .gitignore: update to ignore new file
	generated by the latest gnulib update.

	maint: sync help2man to latest version
	* man/help2man: sync to changes from version 1.47.16.
	Note this doesn't materially change the generated man pages.
	Addresses https://bugs.gnu.org/44105

2020-10-19  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* gl/lib/randperm.c, src/cp-hash.c, src/ls.c, src/sort.c, src/tail.c:
	Change all instaces of hash_delete to hash_remove to accommodate
	change to Gnulib API.

2020-10-17  Grigorii Sokolik  <g.sokol99@g-sokol.info>

	maint: remove already handled FIXME in tail.c
	* src/tail.c: Remove FIXME to follow a file name in a recreated
	directory. The comment was added in commit v8.5-191-g61b77891c
	while the fix (albeit not using inotify) was added in
	commit v8.27-21-gba5fe2d4b

	maint: update docs for build prerequisites
	* README-prereq: Explicitly pull tags,
	and update the xz git repo url.

2020-09-29  Benno Schulenberg  <bensberg@telfort.nl>

	doc: fix punctuation in stat --help
	* src/stat.c (usage): Replace a mistaken semicolon with a colon,
	and replace mistaken backticks with single quotes.  Also reorder
	some words, for clarity.
	Fixes https://bugs.gnu.org/43707

2020-08-12  Pádraig Brady  <P@draigBrady.com>

	doc: clarify timeout --foreground description
	* doc/coreutils.texi (timeout invocation): Avoid any implication
	that `timeout --foreground` could be used to retroactively
	timeout commands not already invoked by timeout(1).
	Fixes bug https://bugs.gnu.org/42831

2020-08-08  Emanuele Giacomelli  <vpooldyn-linux@yahoo.it>

	csplit: fix regex suppression with specific match count
	* src/csplit.c (process_regexp): Process the line suppression
	in all invocations so that the last match is suppressed.
	Previously with a non infinite match count,
	the last regex pattern was not suppressed.
	* NEWS: Mention the bug fix.
	* tests/misc/csplit-suppress-matched.pl: Add a test case.
	Fixes https://bugs.gnu.org/42764

2020-07-31  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: skip some parts of 'tests/rmdir/ignore.sh' if run as root
	Parts of this test expect that the rmdir syscall returns with EPERM,
	but the root user does not see that.

	* tests/rmdir/ignore.sh: Add uid_is_privileged_ guards around parts
	of the test which expect rmdir() to fail with EPERM.

	Reported by Nick Alcock <nix@esperi.org.uk> in
	https://bugs.gnu.org/42633

2020-07-28  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: show version in title of HTML manual
	* doc/coreutils.texi (@include version.texi): Move before ...
	(@settitle): ... this.  Add the version after the package name.

	Suggested by Jonny Grant <jg@jguk.org> in
	https://lists.gnu.org/r/bug-coreutils/2020-07/msg00021.html

2020-07-28  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* src/local.mk (src_expr_LDADD, src_factor_LDADD):
	Adjust to Gnulib renaming of LIB_GMP to LIBGMP.

2020-07-27  Pádraig Brady  <P@draigBrady.com>

	doc: fix typo in env --split-string documentation
	* doc/coreutils.texi: Fix grammar.

2020-07-24  Paul Eggert  <eggert@cs.ucla.edu>

	date: clarify the Epoch
	* src/date.c (usage): Mention the Epoch under %s for clarity,
	and capitalize.

	doc: modernize date examples
	* doc/coreutils.texi: Use more-modern date examples.
	Capitalize “Epoch” to be consistent with POSIX.

	build: update gnulib submodule to latest
	* bootstrap.conf (gnulib_modules): Add hash-triple.

2020-07-20  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: clarify 'timeout -k' behavior
	* doc/coreutils.texi (timeout invocation): Document that the the
	duration of --kill-after=DURATION begins when sending the initial
	signal.  Also mention that -k does not have any effect if timeout's
	duration is 0.

	Suggested by Jonny Grant <jg@jguk.org>.

2020-07-19  Paul Eggert  <eggert@cs.ucla.edu>

	factor: port to --without-libgmp
	* src/factor.c (mp_factor_using_division): Use mpz_fdiv_q_2exp
	instead of its no-longer-documented mpz_div_2exp alias.
	(print_factors): Use mpz_out_str instead of gmp_printf.

2020-07-11  Paul Eggert  <eggert@cs.ucla.edu>

	build: be less aggressive about -fanalyzer
	* configure.ac: Don’t enable -fanalyzer unless configured with the
	new --enable-gcc-warnings=expensive option.  See thread at:
	https://lists.gnu.org/r/coreutils/2020-07/msg00011.html

2020-07-09  Paul Eggert  <eggert@cs.ucla.edu>

	factor: explain why non-GMP code (Bug#42269)
	* doc/coreutils.texi (factor invocation):
	* src/factor.c: Explain why the two-word algorithm is useful.

2020-07-08  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention expr and factor bignums
	* NEWS:
	* doc/coreutils.texi (expr invocation, factor invocation):
	Mention bignum support on all platforms.  Modernize timings.

	factor: treat ' +bignum' like non-bignum
	* src/factor.c (strto2uintmax): Instead of here ...
	(print_factors): ... skip spaces and '+' here, so that
	bignums are treated like non-bignums.
	* tests/misc/factor.pl (bug-gmp-plus_2_sup_128_plus_1): New test.

	tests: simplify since expr now works on bignums
	* cfg.mk (sc_prohibit_expr_unsigned): Remove.
	* tests/dd/skip-seek-past-dev.sh (DEV_OFLOW):
	* tests/id/setgid.sh (gp1):
	* tests/misc/cut-huge-range.sh (CUT_MAX):
	* tests/misc/expr.pl:
	* tests/misc/sort-discrim.sh:
	Assume expr works on bignums.
	* tests/misc/cut-huge-range.sh (subtract_one):
	Remove; no longer needed.

	factor: simplify tests by assuming libgmp
	* tests/misc/factor.pl: Test bignums even if !HAVE_GMP.

2020-07-07  Paul Eggert  <eggert@cs.ucla.edu>

	maint: use Gnulib libgmp module
	This lets use assume multiple-precision arithmetic on all
	platforms, simplifying the code.
	* bootstrap.conf (gnulib_modules): Add libgmp.
	* configure.ac: Don’t call cu_GMP, as this is now done by Gnulib.
	* m4/gmp.m4: Remove.
	* src/expr.c, src/factor.c: Use gmp.h unconditionally.
	* src/factor.c: Use the simpler ‘#ifndef mpz_inits’ to
	determine whether there is an mpz_inits macro.

	build: update gnulib submodule to latest

2020-07-03  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: add timeout examples
	* doc/coreutils.texi (timeout invocation): Add examples.

	Suggested by Jonny Grant <jg@jguk.org> in
	https://lists.gnu.org/r/bug-coreutils/2020-06/msg00018.html

2020-06-30  Andreas Schwab  <schwab@linux-m68k.org>

	tests: avoid spurious testsuite failure
	* tests/dd/stats.sh: Increase timeout.
	Fixes https://bugs.gnu.org/42135

2020-06-26  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failure with valgrind and reflink
	* tests/cp/fiemap-FMR.sh: Avoid FICLONE ioctl,
	which would avoid the point of the test (fiemap testing).
	Also it avoids a valgrind bug with this ioctl:
	https://bugs.kde.org/show_bug.cgi?id=397605

2020-06-26  Paul Eggert  <eggert@cs.ucla.edu>

	cp: use copy_file_range if available
	* NEWS: Mention this.
	* bootstrap.conf (gnulib_modules): Add copy-file-range.
	* src/copy.c (sparse_copy): Try copy_file_range if not
	looking for holes.

	cp: use SEEK_DATA/SEEK_HOLE if available
	If it works, prefer lseek with SEEK_DATA and SEEK_HOLE to FIEMAP,
	as lseek is simpler and more portable (will be in next POSIX).
	Problem reported in 2011 by Jeff Liu (Bug#8061).
	* NEWS: Mention this.
	* src/copy.c (lseek_copy) [SEEK_HOLE]: New function.
	(enum scantype): New constants ERROR_SCANTYPE, LSEEK_SCANTYPE.
	(union scan_inference): New type.
	(infer_scantype): Last arg is now union scan_inference *,
	not struct extent_scan *.  All callers changed.
	Prefer SEEK_HOLE to FIEMAP if both work, since
	SEEK_HOLE is simpler and more portable.
	(copy_reg): Do the fdadvise after initial scan, in case the scan
	fails.  Report an error if the initial scan fails.
	(copy_reg) [SEEK_HOLE]: Use lseek_copy if scantype says so.

	cp: avoid copy_reg goto
	* src/copy.c (copy_reg): Redo to avoid label and goto.

	cp: refactor extent_copy
	* src/copy.c (extent_copy): New arg SCAN, replacing
	REQUIRE_NORMAL_COPY.  All callers changed.
	(enum scantype): New type.
	(infer_scantype): Rename from is_probably_sparse and return
	the new type.  Add args FD and SCAN.  All callers changed.

	maint: typo fix
	* NEWS: Fix typo.

2020-06-23  Paul Eggert  <eggert@cs.ucla.edu>

	chmod: man page fixes
	* man/chmod.x: Mention -6000 too.  Use .BR to fix trailing period.

2020-06-21  Pádraig Brady  <P@draigBrady.com>

	doc: fix punctuation in man pages
	* man/chmod.x: Add missing punctuation.
	* src/expand-common.c: Likewise.
	* src/numfmt.c: Likewise.
	* src/rm.c: Likewise.

	Fixes https://bugs.gnu.org/41962

2020-06-20  Bernhard Voelker  <mail@bernhard-voelker.de>

	stat,tail: add support for the VBOXSF file system
	* src/stat.c (human_fstype): Add case for the 'vboxsf' file system type
	which is used for VirtualBox Shared Folders mounted in VirtualBox guest
	VMs.
	* NEWS: Mention the Improvement.
	Fixes https://bugs.gnu.org/41935

2020-06-19  Paul Eggert  <eggert@cs.ucla.edu>

	cp: default to COW
	Likewise for ‘install’.  Proposed in Bug#24400, and long past due.
	* NEWS:
	* doc/coreutils.texi (cp invocation):
	* src/copy.h (enum Reflink_type): Document this.
	* src/cp.c (cp_option_init):
	* src/install.c (cp_option_init): Implement this.

2020-06-15  Tobias Stoeckmann  <tobias@stoeckmann.org>

	maint: avoid signed integer overflows
	Since -LONG_MIN results in LONG_MIN again, the operation itself is
	a signed integer overflow.

	This can be observed with the following calls (best if compiled
	with -ftrapv or -fsanitize=undefined):

	  $ numfmt --padding=-9223372036854775808
	  $ seq 1e-9223372036854775808

	Technically, the change in seq "reduces" the precision, but a double
	or long double that small would be represented as 0 anyway.

	* src/numfmt.c: Explicitly disallow --padding=LONG_MIN.
	* src/seq.c: Treat 1e$LONG_MIN as 1e-$LONG_MAX.
	* tests/misc/numfmt.pl: Add a test case.
	* tests/misc/seq-precision.sh: Likewise.

	Fixes https://bugs.gnu.org/41850

2020-06-07  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: timeout: improve documentation of the exit status
	* doc/coreutils.texi (timeout invocation): Document that the exit
	status is 137 when the KILL signal is used, regardless of whether that
	signal is sent to COMMAND or timeout.
	* src/timeout.c (usage): Likewise. Also split out and expand
	on the possible exit status values to a separate table.

	Discussed at https://bugs.gnu.org/41634

2020-06-01  Paul Eggert  <eggert@cs.ucla.edu>

	maint: use getrandom, not getentropy
	This makes for one Gnulib module less, and at runtime there’s
	typically just one getrandom syscall instead of several for large
	nonces.
	* gl/lib/randread.c: Include sys/random.h instead of sys/time.h
	and unistd.h.
	(get_nonce): Use getrandom, not getentropy.
	* gl/modules/randread (Depends-on):
	Depend on getrandom, not getentropy.
	* src/shred.c (main):
	* src/shuf.c (main):
	* src/sort.c (random_md5_state_init):
	Say "getrandom" rather than "getentropy" in (unlikely) diagnostic.

	maint: use getentropy and new tempname modules
	Update gnulib submodule to latest and use its new features.
	Gnulib’s new getentropy module means coreutils can now assume
	getentropy instead of approximating it, badly in some cases.
	Gnulib’s improvements to the tempname module mean coreutils no
	longer needs to maintain private patches.
	* bootstrap.conf (gnulib_modules): Remove gettimeofday.
	* gl/lib/randread.c (NAME_OF_NONCE_DEVICE): Remove.
	(get_nonce): Return success indicator.  Remove bytes_bound arg.
	All callers changed.  Rewrite by using getentropy instead of
	reading the nonce device and falling back on gettimeofday.
	Fail if getentropy fails.
	(randread_new): Return NULL (setting errno) if get_nonce fails.
	All callers changed.
	* gl/lib/tempname.c.diff, gl/lib/tempname.h.diff:
	* gl/modules/tempname.diff: Remove.
	* gl/modules/randread (Depends-on):
	Depend on getentropy, not gettimeofday.
	* src/ptx.c (swallow_file_in_memory):
	* src/shuf.c (read_input):
	Adjust to read_file changes in Gnulib.
	* src/shred.c (main):
	* src/shuf.c (main):
	* src/sort.c (random_md5_state_init):
	Diagnose the new form of randread_new failures: randread_new can
	fail now when !random_source, meaning getentropy failed.

	echo: pacify Oracle Studio 12.6
	* src/echo.c (main): Don’t assign pointer to bool.
	This is well-defined in C99, but is arguably bad style
	and Oracle Studio 12.6 complains.

2020-05-25  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: copy FDL from gnulib instead of using it as module
	Since the previous gnulib update, bootstrap outputs this warning:

	  Notice from module fdl:
	    Don't use this module! Instead, copy the referenced license file \
	    into your version control repository.

	See gnulib commit:
	  https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=88fc5afbccc9

	* bootstrap.conf (gnulib_modules): Remove 'fdl'.
	* doc/fdl.texi: Add file as a copy of 'gnulib/doc/fdl.texi'.
	* doc/.gitignore (/fdl.texi): Remove entry.
	* cfg.mk (FILTER_LONG_LINES): Add pattern for the 'fdl.texi' file.

2020-05-23  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: fix syntax-check failure from recent adjustment
	* cfg.mk (old_NEWS_hash): Regenerate after commit v8.32-15-g6d0107a37

2020-05-23  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: fix removed-directory test
	The previous attempt to skip that test on NFS (commit 4181fc518362)
	made the test fail; it introduced two problems:
	a) In the good case, i.e., when the subshell returns with exit status 0,
	the test ran into framework_failure_.
	b) As the subshell also runs with 'set -x', the later comparison of
	/dev/null with 'err' would fail.

	* tests/ls/removed-directory.sh: Revert to the style without subshell,
	and add 'test -d .' to verify that 'ls' can read the removed dir.

2020-05-21  Paul Eggert  <eggert@cs.ucla.edu>

	date: document +%-N change
	Suggested by Kamil Dudka in:
	https://lists.gnu.org/r/bug-gnulib/2020-05/msg00205.html
	* NEWS: Mention the change for coreutils 8.23.
	* doc/coreutils.texi (Padding and other flags):
	Document it.

	ls: port removed-directory test to NFS
	* tests/ls/removed-directory.sh:
	Port test to NFS, where one gets a stale file handle
	when looking at a removed directory.

	dd: omit unnecessary vars when !lint
	* src/dd.c (real_ibuf, real_obuf) [!lint]:
	Remove, as they're needed only when lint checking.
	All uses removed when 'lint' is not defined.

	maint: omit unnecessary pragmas and fix tsort.c
	* src/chown-core.c, src/comm.c:
	* src/tsort.c (record_relation):
	Remove GCC 10 pragmas that are not needed in GCC 10.1.0 (the first
	public GCC 10 release) and that in some cases cause diagnostics
	with GCC 10.1.0.  The tsort.c change fixes a bug that was
	inadvertantly introduced when these pragmas were added.

	build: update gnulib submodule to latest

2020-05-11  Pádraig Brady  <P@draigBrady.com>

	maint: avoid warnings from GCC's -fanalyzer
	* src/env.c (build_argv): Add an assert() to avoid:
	  warning: use of NULL 'n' where non-null expected
	  [CWE-690] [-Wanalyzer-null-argument]
	  note: argument 1 of 'getenv' must be non-null
	* src/dd.c (alloc_ibuf): Don't discard the allocated pointer, to avoid:
	  [CWE-401] [-Wanalyzer-malloc-leak]
	(alloc_obuf): Likewise.
	(cleanup): Deallocate the now tracked buffers which
	also avoids "possibly lost" warnings from valgrind.
	* src/tsort.c (search_item): Add asserts to avoid:
	  [CWE-690] [-Wanalyzer-null-dereference]
	(record_relation): An assert doesn't suffice here,
	so disable the warning for this function.
	* src/comm.c: Suppress the following false positive for the whole file:
	  [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
	* src/chown-core.c: Suppress the following false positive for the file:
	  [CWE-415] [-Wanalyzer-double-free]

2020-04-27  Jason Kim  <git@jasonk.me>

	ls: allow --classify to be ignored for non tty output
	Have the `ls` `--classify` option take an optional argument for when to
	classify ("always", "auto", "never"), just like the optional argument
	for `--color`.  When the optional argument is not specified, default to
	"always" for backwards compatibility.

	* src/ls.c (usage): Update help text.
	(decode_switches): Support an optional argument for --classify.
	* tests/ls/classify.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the new feature.

2020-04-22  Bernhard Voelker  <mail@bernhard-voelker.de>

	build: update gnulib to latest - to avoid du(1) crash on XFS
	Pull in a fix for FTS to avoid a crash when traversing a heavily
	changed XFS file system:

	> fts: remove NOSTAT_LEAF_OPTIMIZATION

	* NEWS (Bug fixes): Mention the fix.
	* gnulib: Update to latest.
	* bootstrap: Sync from gnulib/build-aux/bootstrap.

	Discussed at:
	<https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html>

2020-04-02  Pádraig Brady  <P@draigBrady.com>

	maint: clean up recently added test
	* tests/misc/uniq-collate.sh: Remove logic that
	was already refactored into gen_input().

	cp: ensure --attributes-only doesn't remove files
	* src/copy.c (copy_internal): Ensure we don't unlink the destination
	unless explicitly requested.
	* tests/cp/attr-existing.sh: Add test cases.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/40352

2020-03-28  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest
	* src/selinux.c: Do not include dosname.h; not needed, since
	system.h does that for us via dirname.h.

2020-03-15  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: add texi2dvi build directory to doc/.gitignore
	* doc/.gitignore (/coreutils.t2p/): Add entry for the build directory
	left behind after 'make pdf'.
	While at it, sort the file.

2020-03-07  Paul Eggert  <eggert@cs.ucla.edu>

	ls: improve removed-directory test
	* tests/ls/removed-directory.sh: Remove host_triplet test.
	Skip this test if one cannot remove the working directory.
	From a suggestion by Bernhard Voelker (Bug#39929).

	ls: restore 8.31 behavior on removed directories
	* NEWS: Mention this.
	* src/ls.c: Do not include <sys/sycall.h>
	(print_dir): Don't worry about whether the directory is removed.
	* tests/ls/removed-directory.sh: Adjust to match new (i.e., old)
	behavior.

2020-03-05  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 8.32
	* NEWS: Record release date.


See the source repo for older entries
