This avoids the "%.5119Lf" issue on Solaris 11
where an extraneous e+00 is output.
seq uses printf, while numfmt uses snprintf.
I.e. this fixes:
$ numfmt --to=si --format='%.5119f' 1 | tail -c5
$ seq -f %.5119f 1 | tail -c5
Note gnulib printf module dependencies were previously discussed at:
https://lists.gnu.org/r/coreutils/2014-11/msg00046.htmlhttps://github.com/coreutils/coreutils/commit/b817f6276
* bootstrap.conf: Depend on {printf,snprintf,sprintf}-posix modules.
This fixes an extraneous e+00 output on Solaris with:
$ printf '%.5119Lf' 1 | tail -c4
* gnulib: Update, specifically for commit 9e797dc36b:
printf: Detect %Lf large precision issue on Solaris
* doc/coreutils.texi (uname invocation): Describe -A,--all-labeled.
* src/uname.c (main): Accept new option.
(print_element): Also output label if enabled.
* tests/misc/uname-labeled.sh: Add a new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the new feature.
Link: https://github.com/coreutils/coreutils/issues/313
* tests/env/env.sh: Filter out __CF_USER_TEXT_ENCODING from the output.
Make the regex more strict.
* tests/misc/printenv.sh: Likewise.
Reported by Bruno Haible.
'ptx -W "a*"' would never terminate. SKIP_SOMETHING advanced the cursor
by the length of the match, which is zero when the word regexp matches
the empty string, and no other value in the surrounding loop conditions
changes. find_occurs_in_text already skips zero length matches, and a
zero length --context-regexp match is rejected outright; only this macro
lacked the forward progress guarantee.
* src/ptx.c (SKIP_SOMETHING): Advance by at least one byte on a zero
length match, as the other branches of the macro already do.
* tests/ptx/word-regex-loop.sh: New test.
* tests/local.mk (all_tests): Reference it.
* NEWS: Mention the fix.
Link: https://github.com/coreutils/coreutils/pull/328
* doc/coreutils.texi (printenvAlwaysQuoted): New macro.
(printenv invocation): Use it.
(env invocation): Use it.
* src/printenv.h: New file.
* src/local.mk (noinst_HEADERS): Add it.
(src_env_SOURCES): Likewise. Group with src_printenv_SOURCES.
(src_printenv_SOURCES): New variable.
* src/printenv.c: Include argmatch.h and printenv.h.
(main): Quote printed variable names and values.
* src/env.c: Include argmatch.h and printenv.h.
(main): Quote printed variable names and values.
* tests/misc/printenv.sh: Add test cases.
* tests/env/env.sh: Likewise. Adjust invalid UTF-8 test cases.
* NEWS: Mention the change in behavior.
* doc/coreutils.texi (terminalQuoted): New macro.
(readlink invocation, basename invocation, dirname invocation): Use it.
* src/dirname.c (quote_output): New variable.
(main): Quote output when appropriate.
* src/system.h (quoteN_mem): New macro.
* tests/misc/dirname.pl: Add test cases based on the ones added for
basename in commit e897dfd02 (basename: quote problematic names on tty,
2026-07-30). Copy some logic from tests/misc/basename.pl to test the -z
option.
* tests/misc/tty-quoting.sh: Also test dirname.
* NEWS: Mention the improvement.
* doc/coreutils.texi: Mention $QUOTING_STYLE is significant.
* src/realpath.c (print_relative_path): New function to buffer
relative paths when quoting, and otherwise stream them.
(main): Look up $QUOTING_STYLE when outputting to a tty and
--zero is not specified.
* tests/misc/realpath.sh: Add a test case.
* NEWS: Mention the improvement.
* src/system.h (getenv_quoting_style): Move here from ls.c and stat.c.
* src/ls.c (getenv_quoting_style): Remove.
* src/stat.c (getenv_quoting_style): Remove. Ensure ARGMATCH is
defined for system.h.
* src/stat.c (getenv_quoting_style): Return the selected style.
(initialize_quoting_style): New function, retaining lazy initialization.
(print_statfs, print_stat): Use it.
Add extra protection for newlines that might be output to log files etc.
* doc/coreutils.texi (ls invocation): Expand --literal description.
* src/ls.c (quote_name_buf): Replace '\n' with '?' if appropriate.
* tests/ls/dired.sh: Add a negative test case.
* tests/ls/zero-option.sh: Likewise.
* tests/ls/m-option.sh: Likewise. Also add a positive test case.
* NEWS: Mention the improvement.
With GNU extensions disabled, before_max_width can go negative, and
define_all_fields then loops forever trying to shrink the before field
to a width narrower than empty:
$ printf 'qux\n' | src/ptx -G -w2
[hangs]
Commit v6.12-96-g773be9eca added a clamp for this, but placed it in
the GNU-extensions branch only. Move it after that if/else so that
both branches are covered.
* src/ptx.c (fix_output_parameters): Clamp before_max_width for both
the GNU and non-GNU cases.
* tests/ptx/ptx-overrun.sh: Add a test case.
* NEWS: Mention the bug fix.
Fixes https://bugs.gnu.org/81507
* tests/expr/expr-multibyte.pl: Add 'cu' prefixed cases running in
C.UTF-8, which names no language but has a UTF-8 codeset, ensuring
length, index, substr and match still operate on characters there.
Skip them where that locale is unavailable.
Link: https://github.com/coreutils/coreutils/pull/323
* tests/sort/sort-locale.sh: C.UTF-8 has a UTF-8 codeset but the
collation rules of C, so add a case ensuring the ordering there stays
byte-wise rather than following the linguistic rules exercised for
en_US.iso8859-1 and fr_FR.UTF-8 above.
Link: https://github.com/coreutils/coreutils/pull/323
The quoting characters and the printability of a multibyte character are
selected by the locale's codeset, not by its language, but no test
covered a locale that has a UTF-8 codeset and no language.
* tests/ls/quoting-utf8.sh: Check that in C.UTF-8 the locale/clocale
styles use the Unicode quotes and that literal/escape/shell-escape pass
a multibyte character through unaltered, whereas the plain C locale
octal-escapes it or replaces it with '?'.
Link: https://github.com/coreutils/coreutils/pull/323
* tests/tail/inotify-rotate-resources.sh: Use require_inotify_supported_
instead of require_local_dir_ and the recently added check for
overlayfs.
Suggested by Pádraig Brady.
* NEWS: Mention the bug fix.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_test_minus_ao): Exclude
NEWS.
* src/test.c (term): Treat '-a' and '-o' as strings instead of expecting
them to be valid unary operators.
* tests/test/test.pl: Add some test cases.
* tests/test/test-diag.pl: Also test the diagnostics with '-a arg'.
$ valgrind --quiet --leak-check=full --show-leak-kinds=definite \
src/ls --hyperlink=always foo bar
ls: cannot access 'foo': No such file or directory
ls: cannot access 'bar': No such file or directory
32 bytes in 1 blocks are definitely lost in loss record 3 of 7
at malloc (vg_replace_malloc.c:447)
by canonicalize_filename_mode_stk (canonicalize.c:450)
by canonicalize_filename_mode (canonicalize.c:471)
by gobble_file.constprop.0 (ls.c:3392)
by main (ls.c:1765)
* src/ls.c (gobble_file): Call free_ent() before returning.
* src/fts-missing.h: Add helper routines to determine
if an FTS entry is skippable. I.e., that is traversed
and not specified on the command line.
* src/chcon.c (process_file): Setup to ignore skippable files.
(change_file_context): Ignore missing files if appropriate.
* src/chmod.c (process_file): Setup to ignore skippable files.
Ignore missing files if appropriate.
(mode_changed): Ignore missing files if appropriate.
* src/chown-core.c (change_file_owner): Setup to ignore skippable files.
Ignore missing files if appropriate.
* src/du.c (process_file): Likewise.
* src/ls.c (print_dir): Ignore missing files if appropriate.
(get_link_name): Likewise.
(gobble_file): Likewise. Also handle the dangling symlink case.
* src/system.h (ignorable_traversal_errno): Match ENOENT for missing
files.
* tests/chcon/traversal-missing.sh: A new test.
* tests/misc/traversal-missing.sh: Likewise.
* tests/local.mk: Reference the new tests.
* NEWS: Mention the bug fix.
Fixes https://bugs.gnu.org/81444
* doc/coreutils.texi (echo invocation): Parameterize the escape list.
(printf invocation): Remove the C escape reference as it mentions
\' which we don't support, and doesn't mention \e which we do support
(and GCC also does). Instead directly present the escape list
as done for the echo command, adjusted accordingly.