As a GNU extension, "\c[" in a regexp matches the ESC character
(i.e., control-[). Yet 's/\c[//' was rejected because "[" was treated
as the beginning of a bracket expression.
* sed/compile.c (match_slash): When matching "slash"es, treat \c as
an escape sequence, so that s/\c[// no longer fails because it
misinterprets [ as a bracket-group start.
* testsuite/misc.pl (bug79519_1,2,3,fail): Add tests.
* NEWS (Bug fixes): Mention it.
Reported by Michael Ludwig in https://bugs.gnu.org/79519.
* sed/compile.c (match_slash): Convert regex parameter from int to bool
since all callers use true or false. Add s_command parameter and warn
about nonportable backslashes when true.
(compile_address, compile_program): Update calls to match_slash.
* testsuite/posix-backslash-warn.sh: New test.
* testsuite/local.mk (T): Add it.
* NEWS: Mention the change.
* doc/sed.texi (multiple sed commands): Mention that e, r, R, w and W
are like the a, c and i commands, in that one cannot terminate such
commands with a semicolon.
* bootstrap.conf: Gnulib's stdckdint and stdbool modules are
deprecated, in favor of stdckdint-h and bool.
Induce this change with the following:
perl -pi -e 's{^stdckdint$}{$1-h};s{^stdbool$}{bool}' bootstrap.conf
And sort the resulting list of module names.
* sed/sed.c: Spell as <getopt.h> and hoist it to be with other system
header includes. Also, use "", not <> for "selinux/selinux.h".
* testsuite/test-mbrtowc.c: Same, for <error.h>.
* sed/utils.c (ck_rename): When diagnosting rename failure,
also mention the target file name.
* testsuite/in-place-suffix-backup.sh: Adjust test expectations
to match.
Reported by Sebastian Carlos in https://bugs.gnu.org/63833
Following Pádraig Brady's example from coreutils, ...
* bootstrap.conf: Add an explicit requirement on m4.
Add an explicit requirement on texi2pdf -- often packaged separately
rather than with makeinfo -- its absence would otherwise induce a
failure late in the build process.
Replace the rsync dependency with wget,
which gnulib changed to in 2018.
Also, add an xz requirement and a version for autopoint.
The idea is to defend against some adversary-in-the-middle attacks.
Also prefer git.savannah.gnu.org over its shorter alias, git.sv.gnu.org
to avoid a warning e.g., from git clone.
Also, drop any final ".git" suffix on the resulting URIs.
Inspired by Paul Eggert's nearly identical changes to coreutils.
* basicdefs.h: Do not include alloca.h.
* bootstrap.conf (gnulib_modules): Remove alloca, stdalign,
c-ctype, closeout, mbrlen, verify.
Add version-etc.
* lib/.gitignore, m4/.gitignore: Omit now-unused files.
* po/POTFILES.in: Remove closeout.c.
* testsuite/test-mbrtowc.c: Do not include closeout.h.
(main): Close stdout by hand, to avoid a dependency on closeout.
* sed/local.mk (sed_sed_LDADD): Update for current Gnulib
by using $(CLOCK_LIB__GETTIME), $(GETRANDOM_LIB),
$(HARD_LOCALE_LIB), $(MBRTOWC_LIB), $(SETLOCALE_NULL_LIB)
instead of $(LIB_CLOCK_GETTIME), $(LIB_GETRANDOM),
$(LIB_HARD_LOCALE, $(LIB_MBRTOWC), $(LIB_SETLOCALE_NULL).