* 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.
Collin Funk [Wed, 18 Feb 2026 08:03:05 +0000 (00:03 -0800)]
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.
Pádraig Brady [Sat, 14 Feb 2026 12:15:15 +0000 (12:15 +0000)]
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.
Collin Funk [Wed, 18 Feb 2026 02:45:33 +0000 (18:45 -0800)]
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.
Chris Down [Mon, 16 Feb 2026 05:06:31 +0000 (13:06 +0800)]
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")
oech3 [Thu, 12 Feb 2026 17:07:30 +0000 (17:07 +0000)]
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
Pádraig Brady [Sun, 8 Feb 2026 19:41:41 +0000 (19:41 +0000)]
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
Pádraig Brady [Sun, 8 Feb 2026 19:34:13 +0000 (19:34 +0000)]
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.
Collin Funk [Tue, 10 Feb 2026 06:30:48 +0000 (22:30 -0800)]
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.
Collin Funk [Sat, 7 Feb 2026 19:15:23 +0000 (11:15 -0800)]
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.
Sam James [Sun, 8 Feb 2026 00:25:40 +0000 (00:25 +0000)]
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.
Collin Funk [Fri, 6 Feb 2026 05:18:25 +0000 (21:18 -0800)]
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
Pádraig Brady [Mon, 2 Feb 2026 20:15:17 +0000 (20:15 +0000)]
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.
Pádraig Brady [Fri, 30 Jan 2026 17:34:28 +0000 (17:34 +0000)]
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.
Pádraig Brady [Tue, 27 Jan 2026 17:45:02 +0000 (17:45 +0000)]
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.
Paul Eggert [Mon, 26 Jan 2026 02:50:33 +0000 (18:50 -0800)]
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.
Collin Funk [Sat, 24 Jan 2026 22:12:10 +0000 (14:12 -0800)]
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.
Pádraig Brady [Sat, 24 Jan 2026 18:04:46 +0000 (18:04 +0000)]
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.
Collin Funk [Sat, 24 Jan 2026 19:15:10 +0000 (11:15 -0800)]
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.
Pádraig Brady [Sat, 24 Jan 2026 13:34:35 +0000 (13:34 +0000)]
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