2023-05-13  Jim Meyering  <meyering@meta.com>

	version 3.11
	* NEWS: Record release date.

2023-05-10  Josh Soref  <jsoref@gmail.com>

	doc: spelling fixes in doc/, comments and old ChangeLog
	* ChangeLog-2009: Fix spelling errors.
	* bootstrap: Likewise.
	* doc/grep.texi: Likewise.

2023-05-04  Jim Meyering  <meyering@fb.com>

	tests: reenable gnulib's strtoll and strtoull tests
	* bootstrap.conf (avoided_gnulib_modules): Restore those tests.
	The failures I saw must have been due to a stale config.cache.

2023-04-30  Jim Meyering  <meyering@fb.com>

	tests: temporarily omit gnulib's strtoll and strtoull tests
	* bootstrap.conf (avoided_gnulib_modules): Omit strtoll and strtoull
	tests, because the edge-case 0[bx] tests fail on recent systems.

2023-04-30  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2023-04-30  Carlo Marcelo Arenas Belón  <carenas@gmail.com>

	pcre: work around a PCRE2_MATCH_INVALID_UTF bug
	PCRE2 has a bug when using PCRE2_MATCH_INVALID_UTF: it would
	sometimes fail to match patterns using negative classes
	like \W and \D.

	* NEWS (Bug fixes): Mention it.
	* src/pcre2search.c: Restrict impact of the bug.
	Do not use the problematic flag with broken versions of PCRE2.
	Also, generate locale tables only for single-byte locales,
	as the PCRE2 documentation recommends this.
	* tests/Makefile.am (TESTS): Add the file name
	* tests/pcre-utf8-bug224: New file, to test for this.

2023-04-29  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve doc for -P '\d'
	This follows up to Carlo Marcelo Arenas Belón’s email
	<https://lists.gnu.org/r/grep-devel/2023-04/msg00017.html>
	that proposed changing the code too.  These patches change
	only the documentation since we’re so near a release.
	* NEWS: Be less optimistic about the fix for -P '\d',
	and warn that behavior is likely to change again.
	* doc/grep.texi (grep Programs): Be less specific about -P \d
	behavior, since it’s still in flux.  Warn about mismatching
	Unicode versions, or disagreements about obscure constructs.

	build: support explicit ‘PCRE_CFLAGS= PCRE_LIBS=’
	* m4/pcre.m4 (gl_FUNC_PCRE): Check whether PCRE_CFLAGS and
	PCRE_LIBS are set, not whether they are set to a nonempty value.

2023-04-29  Jim Meyering  <meyering@fb.com>

	doc: say that `-f -` reads patterns from stdin
	* doc/grep.texi (Matching Control): Mention that when -f's FILE is -,
	grep reads patterns from stdin.
	* doc/grep.in.1: Likewise.
	* THANKS.in: Add the name.
	Suggested by Sebastian Carlos in https://bugs.gnu.org/63146

2023-04-22  Carlo Marcelo Arenas Belón  <carenas@gmail.com>

	build: prevent pkg-config from overriding PCRE_* settings
	The use of PCRE_CFLAGS and PCRE_LIBS, as documented in the output of
	`--help`, is meant to override those settings from pkg-config.

	* NEWS: mention this
	* m4/pcre.m4: avoid overriding user provided settings

2023-04-20  Jim Meyering  <meyering@fb.com>

	doc: note when a bug was introduced
	* NEWS: say that the \d bug was introduced in 3.10.

2023-04-20  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2023-04-13  Paul Eggert  <eggert@cs.ucla.edu>

	grep: make -P survive JIT compilation failure
	* src/pcresearch.c (Pcompile): Ignore failure returns
	from pcre2_jit_compile.

2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>

	grep: improve PCRE2 version output
	* src/grep.c: No need to include pcre2.h.
	(main) [HAVE_LIBPCRE]: Call Pprint_version instead of
	doing it ourselves.
	* src/pcresearch.c (Pprint_version): New function.
	It also checks belatedly for buffer overflow, and
	says "grep -P uses PCRE2" instead of "Built with PCRE".
	* tests/version-pcre: Adjust test to match.

2023-04-10  Jim Meyering  <meyering@fb.com>

	tests: skip y2038 test upon touch setup failure
	* tests/y2038-vs-32-bit: Skip rather than fail, when
	the touch -t 2039... setup fails.  That command failed
	on a solaris10 sparc build farm host.

2023-04-09  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2023-04-09  Jim Meyering  <meyering@fb.com>

	tests: add a known-failing glibc-infloop test
	* tests/glibc-infloop: New file.
	Based on the command from Koen Claessen
	reported in https://bugs.gnu.org/62483
	* configure.ac (USE_INCLUDED_REGEX): define.
	* tests/Makefile.am (TESTS): Add the file name
	* THANKS.in: Add name of reporter.

	grep: --version: print pcre version info
	PCRE is integral to the functioning of grep's -P option, so it is in our
	interest to make it easy to see which version of PCRE grep uses.
	* src/grep.c [HAVE_LIBPCRE]: Include <pcre2.h>.
	[HAVE_LIBPCRE] (main): Print pcre version info.
	* tests/version-pcre: New test for this.
	* tests/Makefile.am (TESTS): Add the file name.
	* NEWS (Changes in behavior): Mention it.

	tests: test for the year-2038 bug
	* tests/y2038-vs-32-bit: New file.
	* tests/Makefile.am (TESTS): Add the file name

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

	grep: re-fix Y2038 bug on glibc 2.34+ x86, ARM
	The meaning of AC_SYS_LARGEFILE has changed to no longer even try
	to use wider time_t if available.  So use AC_SYS_YEAR2038 as well.
	A more-aggressive change would be to use the next Autoconf’s
	AC_SYS_YEAR2038_REQUIRED but at least let’s restore the grep 3.8
	behavior.
	* NEWS: Mention this.
	* bootstrap.conf: Add year2038.

2023-04-02  Paul Eggert  <eggert@cs.ucla.edu>

	grep: fix -P [\d] by fixing \w only if PCRE2 10.43
	Our prepass-based fixes for the -P \d bug have caused repeated
	further bugs.  Avoid the need for a prepass, by using PCRE2_UCP
	only if PCRE2_EXTRA_ASCII_BSD is also supported.  Since the -P \w
	bug was present from grep 2.5 through 3.8 it’s OK if we wait a
	little longer to fix it.
	* NEWS: Mention this.
	* src/pcresearch.c (pcre_pattern_expand_backslash_d}: Remove.
	Remove its use.
	(Pcompile): Use PCRE2_UCP only if PCRE2_EXTRA_ASCII_BSD.
	* tests/pcre-ascii-digits, tests/pcre-utf8-w:
	Skip tests on older PCRE2 implementations.

2023-03-22  Jim Meyering  <meyering@meta.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 3.10
	* NEWS: Record release date.

2023-03-22  Paul Eggert  <eggert@cs.ucla.edu>

	doc: avoid capital sharp S with TeX
	Do not use “ẞ” (U+1E9E, LATIN CAPITAL LETTER SHARP S) in tex, as
	texinfo version 2023-03-04.12 complains “Character missing, sorry:
	LONG S.”

2023-03-22  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2023-03-20  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2023-03-20  Paul Eggert  <eggert@cs.ucla.edu>

	doc: clarify BRE vs ERE (bug#62272)

2023-03-19  Jim Meyering  <meyering@fb.com>

	grep: -P (--perl-regexp) \D once again works like [^0-9]
	* NEWS: Mention \D, too.
	* doc/grep.texi: Likewise
	* src/pcresearch.c (pcre_pattern_expand_backslash_d): Handle \D.
	Also, ifdef-out this new function and its call site when not needed.
	* tests/pcre-ascii-digits: Test \D, too.
	Tighten one test by using returns_ 1.
	Add comments and tests that work only with 10.43 and newer.
	Paul Eggert raised the issue of \D in https://bugs.gnu.org/62267#8

2023-03-19  Paul Eggert  <eggert@cs.ucla.edu>

	grep: forward port to PCRE2 10.43
	* doc/grep.texi: Document this.
	* src/grep.c: Move recent changes into pcresearch.c.
	(P_MATCHER_INDEX): Remove.
	(pcre_pattern_expand_backslash_d): Move from here ...
	* src/pcresearch.c: ... to here.
	(PCRE2_EXTRA_ASCII_BSD): Default to 0.
	(Pcompile): Use PCRE2_EXTRA_ASCII_BSD if available,
	and expand \d to [0-9] otherwise.

	doc: distinguish Perl from PCRE
	* doc/grep.texi: Mention that PCRE might not match Perl exactly.

2023-03-18  Jim Meyering  <meyering@fb.com>

	grep: -P (--perl-regexp) \d: match only ASCII digits
	Prior to grep-3.9, the PCRE matcher had always treated \d just
	like [0-9]. grep-3.9's fix for \w and \b mistakenly relaxed \d
	to also match multibyte digits.
	* src/grep.c (P_MATCHER_INDEX): Define enum.
	(pcre_pattern_expand_backslash_d): New function.
	(main): Call it for -P.
	* NEWS (Bug fixes): Mention it.
	* doc/grep.texi: Document it: with -P, \d matches only ASCII digits.
	Provide a PCRE documentation URL and an example of how
	to use (?s) with -z.
	* tests/pcre-ascii-digits: New test.
	* tests/Makefile.am (TESTS): Add that file name.
	Reported as https://bugs.gnu.org/62267

2023-03-18  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2023-03-09  Jim Meyering  <meyering@fb.com>

	doc: remove mention of unused _N_GNU_nonoption_argv_flags_ envvar
	* doc/grep.texi (Environment Variables): This environment variable
	has not been usable for decades. Remove its documentation.
	* doc/grep.in.1: Likewise.
	Reported by Emanuele Torre torreemanuele6@gmail.com
	in https://bugs.gnu.org/62052
	* THANKS.in: Add the name.

2023-03-05  Jim Meyering  <meyering@meta.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 3.9
	* NEWS: Record release date.

	build: update gnulib to latest

2023-03-05  Bruno Haible  <bruno@clisp.org>

	tests: avoid failure on Alpine Linux 3.17, due to non-POSIX compliant tr
	* tests/fmbtest: Don't use [x*n] syntax in the tr options, since tr from
	BusyBox 1.35 does not support it.

2023-02-26  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2023-02-19  Jim Meyering  <meyering@fb.com>

	build: avoid --enable-gcc-warnings clang-vs-sprintf build failure
	* configure.ac (WERROR_CFLAGS): Disable -Wdeprecated-declarations
	to accommodate Apple's clang 14 that's installed as "gcc".

2023-02-04  Jim Meyering  <meyering@fb.com>

	maint: remove stray character
	* HACKING: Remove a stray "[" alone on a line.

	maint: prefer https: to git:
	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.
	Induced by running these commands:
	git grep -l 'git clone git:'|xargs perl -pi -e \
	  's{(git clone) git://(\S+)/([^/]+)\b}{$1 https://$2/git/$3}'
	git grep -l git.sv.gn \
	  |xargs perl -pi -e 's{git\.sv\.gnu}{git\.savannah\.gnu}'
	perl -pi -e \
	  's{(url =) git://(\S+)/([^/.]+)(\.git)?\b}{$1 https://$2/git/$3}'\
	  .gitmodules
	* .gitmodules: As above.
	* HACKING: Likewise.
	* README-hacking: Likewise.
	* src/grep.c (main): Likewise.

2023-01-30  Bruno Haible  <bruno@clisp.org>

	Don't require 'rsync' as a prerequisite. It is no longer needed since 2018.
	* bootstrap.conf (buildreq): Remove rsync.
	* README-prereq: Likewise.

2023-01-21  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: stop including getprogname.h
	It’s obsolete in bleeding-edge Gnulib.
	* src/grep.c, tests/get-mb-cur-max.c: Don’t include getprogname.h.
	Instead, rely on stdlib.h to declare getprogname.

	build: update gnulib submodule to latest

2023-01-18  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

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

	maint: spelling fixes

2023-01-15  Paul Eggert  <eggert@cs.ucla.edu>

	tests: fix test -eq problem
	Do not use ‘test "" -eq 1’ when get-mb-cur-max fails,
	as Bash complains about this.  Problem found on AIX.

	build: update gnulib submodule to latest

	tests: port U+10000+ to AIX 7.2
	* tests/hangul-syllable, tests/surrogate-search:
	32-bit AIX has WCHAR_MAX == 0xFFFF, and so cannot handle
	U+10000 and greater.  Skip tests involving such chars
	on this platform.

	tests: update tests/init.sh
	* tests/init.sh: Update from Gnulib.

	grep: fix rawmemrchr etc. comments
	* src/grep.c: Fix comments.

2023-01-14  Paul Eggert  <eggert@cs.ucla.edu>

	tests: omit duplicate tests
	* tests/skip-read: Omit duplicates.  Reported by Bruno Haible in:
	https://lists.gnu.org/r/grep-devel/2023-01/msg00003.html

	build: update gnulib submodule to latest

2023-01-12  Paul Eggert  <eggert@cs.ucla.edu>

	tests: better diagnostic for -P sans Unicode
	* tests/init.cfg (require_pcre_): When in a UTF-8 locale, test
	also for Unicode support so that it can be diagnosed differently
	(Bug#60708).

	grep: diagnose no UTF-8 support (Bug#60708)
	* src/pcresearch.c (Pcompile): Issue a diagnostic and exit instead
	of misbehaving if libpcre2 does not support the requested locale.

2023-01-11  Carlo Marcelo Arenas Belón  <carenas@gmail.com>

	pcre: use UTF only when available in the library
	Before this change, if linked with a PCRE library without unicode
	any invocations of grep when using a UTF locale will error with:

	  grep: this version of PCRE2 does not have Unicode support

	* src/pcresearch.c: Check whether Unicode was compiled in.
	* tests/pcre-utf8-w: Add check to skip test.
	* tests/pcre-utf8: Update check.

2023-01-07  Carlo Marcelo Arenas Belón  <carenas@gmail.com>

	pcre: use UCP in UTF mode
	This fixes a serious bug affecting word-boundary and word-constituent regular
	expressions when the desired match involves non-ASCII UTF8 characters.
	* src/pcresearch.c: Set PCRE2_UCP together with PCRE2_UTF
	* tests/pcre-utf8-w: New file.
	* tests/Makefile.am (TESTS): Add it.
	* NEWS (Bug fixes): Mention this.
	* THANKS.in: Add Gro-Tsen and Karl Petterson.
	Reported by Gro-Tsen https://twitter.com/gro_tsen/status/1610972356972875777
	via Karl Pettersson in https://github.com/PCRE2Project/pcre2/issues/185
	This bug was present from grep-2.5, when --perl-regexp (-P) support was added.

2023-01-01  Jim Meyering  <meyering@fb.com>

	maint: update copyright dates

	build: update gnulib to latest

	maint: avoid warnings about unportable grep -q
	* cfg.mk (local-checks-to-skip): This is grep itself,
	so using grep -q is not a problem here, as long as it
	is running the just-built grep.

2022-12-10  Jim Meyering  <meyering@fb.com>

	maint: src/dfasearch.c: remove unnecessary re_set_syntax call
	* src/dfasearch.c (GEAcompile): Don't call "re_set_syntax (syntax_bits)"
	just before regex_compile; that function does the same thing already.

2022-12-05  Paul Eggert  <eggert@cs.ucla.edu>

	grep: bug: backref in last of multiple patterns
	* NEWS: Mention this.
	* src/dfasearch.c (GEAcompile): Trim trailing newline from
	the last pattern, even if it has back-references and follows
	a pattern that lacks back-references.
	* tests/backref: Add test for this bug.

2022-10-11  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer stdckdint.h to intprops.h
	Prefer the standard C23 ckd_* macros to Gnulib’s *_WRAPV macros.
	* bootstrap.conf (gnulib_modules): Add stdckdint.
	* src/grep.c, src/kwset.c, src/pcresearch.c:
	Include stdckdint.h, and prefer ckd_* to *_WRAPV.
	Include intprops.h only if needed.

	maint: add missing include
	* src/pcresearch.c: Include intprops.h.

	maint: prefer C23 style for static_assert
	* bootstrap.conf (gnulib_modules): Add assert-h,
	for static_assert.
	* src/dfasearch.c (regex_compile): Prefer static_assert to verify.

	build: update gnulib submodule to latest

2022-09-10  Paul Eggert  <eggert@cs.ucla.edu>

	Assume C23-like bool
	Gnulib’s stdbool module now provides C23-like semantics,
	so there’s no longer any need to include stdbool.h.
	* src/die.h, src/grep.h, src/kwset.h: Don’t include stdbool.h.

	build: update gnulib submodule to latest

2022-09-09  Paul Eggert  <eggert@cs.ucla.edu>

	doc: improve GREP_COLORS doc (Bug#57696)

2022-09-06  Paul Eggert  <eggert@cs.ucla.edu>

	Fix obsolescence doc for egrep, fgrep

2022-09-02  Jim Meyering  <meyering@fb.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 3.8
	* NEWS: Record release date.

2022-07-10  Jim Meyering  <meyering@fb.com>

	build: update gnulib to latest

2022-07-09  Jim Meyering  <meyering@fb.com>

	tests: long-pattern-perf: avoid FP failure on unusual systems
	* tests/long-pattern-perf: Skip this test whenever the base
	case takes more than 800ms.  See comment for details.
	Reported by Bruno Haible in
	https://lists.gnu.org/r/grep-devel/2022-07/msg00004.html
	https://lists.gnu.org/r/grep-devel/2022-07/msg00006.html

2022-07-03  Jim Meyering  <meyering@fb.com>

	tests: long-pattern-perf: better handle exhausted virtual memory
	* tests/long-pattern-perf: Don't fail due to a syntax error
	when one of the subtests exhausts virtual memory. The larger
	test (with a 2MiB regexp) needs about 870MiB of virtual memory.
	Require that each timing run exit with status 0, else fail with
	a framework_failure_. Reported by Bruno Haible in
	https://lists.gnu.org/r/grep-devel/2022-07/msg00006.html

	tests: note that triple-backref is still not fixed
	* tests/triple-backref: I noticed that our sole XFAIL is still
	required, in spite of a glibc comment that bug 11053 is fixed,
	so confirmed that it no longer evokes an abort, but still fails
	to produce the expected match.  I.e., this prints nothing:
	echo a | grep -E '(.?)(.?)(.?)\3\2\1' -- it should print its input.

	tests: do not emit ratio of test durations
	* tests/hash-collision-perf (ratio): Remove stray diagnostic.

2022-06-30  Jim Meyering  <meyering@fb.com>

	build: update gnulib to latest

	maint: remove reference to gnulib module, alloca
	* bootstrap.conf (gnulib_modules): Remove alloca; we do not
	use it directly.

2022-06-29  Jim Meyering  <meyering@fb.com>

	build: add parentheses to placate clang-14
	* src/dfasearch.c (regex_compile): Parenthesize to avoid
	this warning:
	  dfasearch.c:154:43: error: operator '?:' has lower precedence
	  than '|'; '|' will be evaluated first
	  [-Werror,-Wbitwise-conditional-parentheses]

2022-06-24  Paul Eggert  <eggert@cs.ucla.edu>

	grep: fix regex compilation memory leaks
	Problem reported by Jim Meyering in:
	https://lists.gnu.org/r/grep-devel/2022-06/msg00012.html
	* src/dfasearch.c (regex_compile): Fix memory leaks when SYNTAX_ONLY.

2022-06-08  Jim Meyering  <meyering@fb.com>

	build: update gnulib to latest

	maint: stop using obsolete iswctype gnulib module
	* bootstrap.conf (gnulib_modules): Remove iswctype, an unused and obsolete module.

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

	grep: don’t diagnose "grep '\-c'"
	* src/grep.c (main): Skip past leading backslash of a pattern that
	begins with "\-".  Inspired by a remark by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2022-06/msg00022.html

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

	doc: document \] and \}
	* doc/grep.texi (Special Backslash Expressions)
	(Problematic Expressions): Document that grep supports
	\] and \} as extensions to POSIX.

	build: update gnulib submodule to latest

2022-06-03  Paul Eggert  <eggert@cs.ucla.edu>

	build: update bootstrap to gnulib latest

	build: update gnulib submodule to latest

	maint: spelling fixes

2022-05-31  Paul Eggert  <eggert@cs.ucla.edu>

	grep: sanity-check GREP_COLOR
	This patch closes a longstanding security issue with GREP_COLOR that I
	just noticed, where if the attacker has control over GREP_COLOR's
	settings the attacker can trash the victim's terminal or have 'grep'
	generate misleading output.  For example, without the patch
	the shell command:
	GREP_COLOR="$(printf '31m\33[2J\33[31')" grep --color=always PATTERN
	mucks with the screen, leaving behind only the trailing part of
	the last matching line.  With the patch, this GREP_COLOR is ignored.
	* src/grep.c (main): Sanity-check GREP_COLOR contents the same way
	GREP_COLORS values are checked, to not trash the user's terminal.
	This follows up the recent fix to Bug#55641.

2022-05-29  Jim Meyering  <meyering@fb.com>

	tests: placate syntax-check's sorted-test rule
	* tests/Makefile.am (TESTS): Insert color-colors in sorted order.

	maint: include fdl.texi in version control, per gnulib module advice
	* bootstrap.conf (gnulib_modules): Remove fdl.
	* doc/.gitignore: Do not list fdl.texi
	* doc/fdl.texi: New file.
	* cfg.mk (FILTER_LONG_LINES): Add doc/fdl.texi.

	maint: po/POTFILES.in: add src/dfasearch.c to avoid syntax-check failure
	* po/POTFILES.in: Add src/dfasearch.c.

	build: sync init.sh from gnulib

2022-05-29  Paul Eggert  <eggert@cs.ucla.edu>

	grep: document --color[=WHEN] more carefully

	tests: new test color-colors
	* tests/Makefile.am (TESTS): Add it.
	* tests/color-colors: New file.

	grep: deprecate GREP_COLOR
	This is to avoid confusion such as that reported by Cholden in:
	https://bugs.gnu.org/55641
	* src/grep.c (main): Warn if GREP_COLOR has an effect.

2022-05-24  Paul Eggert  <eggert@cs.ucla.edu>

	maint: fix typo in bug number

	grep: warn about ‘(+x)’ etc.
	These expressions are not portable and don’t always work as
	expected, so warn about them.  For example, “grep -E '(+)'”
	doesn’t act like “grep '\(\+\)'”.
	* src/dfasearch.c (GEAcompile): Warn about a repetition op at the
	start of a regular expression or subexpression, except for ‘*’ in
	BREs which is portable.

	build: update gnulib submodule to latest

2022-05-23  Paul Eggert  <eggert@cs.ucla.edu>

	grep: warn about stray backslashes
	This papers over a problem reported by Benno Schulenberg and
	Tomasz Dziendzielski <https://bugs.gnu.org/39678> involving
	regular expressions like \a that have unspecified behavior.
	* src/dfasearch.c (dfawarn): Just output a warning.
	Don’t exit, as DFA_CONFUSING_BRACKETS_ERROR now
	does that for us, and we need the ability to warn
	without exiting to diagnose \a etc.
	(GEAcompile): Use new dfa options DFA_CONFUSING_BRACKETS_ERROR and
	DFA_STRAY_BACKSLASH_WARN.

	build: update gnulib submodule to latest

2022-05-22  Paul Eggert  <eggert@cs.ucla.edu>

	doc: document regex corner cases better
	* doc/grep.texi (Environment Variables)
	(Fundamental Structure, Character Classes and Bracket Expressions)
	(Special Backslash Expressions, Back-references and Subexpressions)
	(Basic vs Extended): Say more precisely what happens with
	problematic regular expressions.
	(Problematic Expressions): New section.

2022-05-21  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port to platforms lacking Perl
	* tests/init.cfg (require_perl_): New function.
	* tests/big-hole, tests/hash-collision-perf, tests/long-pattern-perf:
	* tests/many-regex-performance, tests/mb-non-UTF8-performance:
	Use it.

	build: be more careful about Perl
	Problem reported by Serge Belyshev for Coreutils (Bug#52844).
	I observed the same problem with current Grep on Fedora 35
	without Perl installed.
	* configure.ac (HAVE_PERL): Rely on latest Gnulib gl_PERL, which
	sets gl_cv_prog_perl.

	doc: document regex corner cases better
	* doc/grep.texi (Environment Variables)
	(Fundamental Structure, Character Classes and Bracket Expressions)
	(The Backslash Character and Special Expressions)
	(Back-references and Subexpressions, Basic vs Extended)
	(Basic vs Extended): Say more precisely what happens with oddball
	regular expressions.

	grep: assume POSIX.1-2017 for [:space:]
	* src/dfasearch.c (dfawarn): Always call dfaerror now,
	regardless of POSIXLY_CORRECT.
	* tests/warn-char-classes: Omit test of POSIX.1-2008 behavior,
	since POSIX.1-2017 allows the GNU behavior.

	tests: make spencer1.tests more POSIX-compliant
	* tests/spencer1.tests: Do not test the regular expression a\x as
	POSIX says the interpretation of \x is undefined and we may want
	to warn about it in the future, to allow for future extensions.
	Instead, test a\\x, a[\]x, and ax.

2022-05-19  Paul Eggert  <eggert@cs.ucla.edu>

	doc: omit -y from grep man page
	The obsolete -y option has been omitted from --help for a while, and
	now’s a good time to omit it from the man page too.

2022-05-17  Paul Eggert  <eggert@cs.ucla.edu>

	tests: improve tests of ‘.’
	* tests/hangul-syllable: Test some encoding errors too.

2022-05-16  Paul Eggert  <eggert@cs.ucla.edu>

	grep: document -m better
	* doc/grep.in.1, doc/grep.texi: Document behavior of -m 0 and -m -1.
	This documents longstanding behavior, and is consistent with
	how git grep -m will likely behave.

2022-05-14  Paul Eggert  <eggert@cs.ucla.edu>

	maint: spelling fixes

2022-05-13  Paul Eggert  <eggert@cs.ucla.edu>

	grep: fix bug with . and some Hangul Syllables
	* NEWS: Mention the fix, which comes from the recent Gnulib update.
	* tests/hangul-syllable: New file.
	* tests/Makefile.am (TESTS): Add it.

	build: update gnulib submodule to latest

2022-04-02  Jim Meyering  <meyering@fb.com>

	build: update gnulib to latest, for glob improvements

2022-03-22  Paul Eggert  <eggert@cs.ucla.edu>

	grep: Remove recent PCRE2 bug workarounds
	* src/pcresearch.c (Pcompile): Remove recent workaround for PCRE2
	bugs; apparently it’s not needed.  This reverts back to where
	things were before today.  Suggested by Carlo Arenas in:
	https://lists.gnu.org/r/grep-devel/2022-03/msg00006.html

	grep: work around another potential PCRE2 bug
	Potential problem reported by René Scharfe in:
	https://lore.kernel.org/git/99b0adb6-26ba-293c-3a8f-679f59e7cb4d@web.de/T
	* src/pcresearch.c (Pcompile): Mimic git grep’s workarounds
	for PCRE2 bugs more closely; this is more conservative.

	grep: work around PCRE2 bug 2642
	Problem reported by Carlo Arenas in:
	https://lists.gnu.org/r/grep-devel/2022-03/msg00004.html
	* src/pcresearch.c (Pcompile) [PCRE2_MATCH_INVALID_UTF]:
	In PCRE2 10.35 and earlier, disable start optimization if doing a
	caseless UTF-8 search.

	Pacify GCC 11.2.0
	* configure.ac: Re-disable -Wstack-protector, to pacify GCC Ubuntu
	11.2.0-7ubuntu2 x86-64 on knuth_morris_pratt and
	knuth_morris_pratt_multibyte.

2022-03-20  Jim Meyering  <meyering@fb.com>

	build: update gnulib to latest, for bootstrap long-line fix

	build: Re-disable -Winline
	* configure.ac: Re-disable -Winline. It is still needed.

	build: update gnulib to latest; also bootstrap and init.sh

	build: avoid build failure on systems that must compile regexec.c
	With --enable-gcc-warnings, compiling regexec.h would fail due to
	its use of a single variable-length array.
	* configure.ac: Add -Wvla to the list of disabled warnings and
	remove most of the others, that no longer need to be disabled.

	grep: very long lines no longer evoke unwarranted "memory exhausted"
	When calling xpalloc (NULL, &n, incr_min, alloc_max, 1) with
	nontrivial ALLOC_MAX, this must hold: N + INCR_MIN <= ALLOC_MAX.
	With a very long line, it did not, and grep would mistakenly fail
	with a report of "memory exhausted".
	* src/grep.c (fillbuf): When using nontrivial ALLOC_MAX, ensure it
	is at least N+INCR_MIN.
	* tests/fillbuf-long-line: New file, to test for this.
	* tests/Makefile.am (TESTS): Add its name.

2022-02-27  Paul Eggert  <eggert@cs.ucla.edu>

	doc: more on leading ‘-’
	* doc/grep.texi (Usage): Expand on leading ‘-’ problems (Bug#54174).

2022-02-24  Paul Eggert  <eggert@cs.ucla.edu>

	doc: mention issues with set -e
	* doc/grep.texi (Usage, Performance): Mention early exits (Bug#54035).

2022-02-15  Ulrich Eckhardt  <ulrich.eckhardt@base-42.de>  (tiny change)

	grep: Remove comment
	The comment was introduced in 500f07fee50ab16a70fe2946b85318020c7f4017 and
	relates to absent cleanup code at the end of main(), not the code following
	it. It relates to fallible flushing of stdout and related error handling,
	but even then it doesn't explain much.

2022-02-15  Ulrich Eckhardt  <ulrich.eckhardt@base-42.de>

	tests: remove redundant test
	* tests/empty: Test #4 is identical to test #1. Remove it.

2022-01-02  Ondřej Fiala  <temp.xanomes@volny.cz>  (tiny change)

	bug#52958: [PATCH] doc: fix man page syntax errors
	* doc/grep.in.1: Fix syntax errors.
	Introduced by commit v3.6-5-g91ce9cd.

2022-01-01  Jim Meyering  <meyering@fb.com>

	maint: make update-copyright

	build: update gnulib to latest; also bootstrap and init.sh

2021-12-26  Jim Meyering  <meyering@fb.com>

	build: disable some expensive compiler warnings by default
	* configure.ac (gl_GCC_VERSION_IFELSE): Copy from coreutils.
	(gcc-warnings): Update from coreutils.

2021-12-24  Jim Meyering  <meyering@fb.com>

	maint: avoid new syntax-check failures
	* cfg.mk (local-checks-to-skip): Add sc_indent, to skip it.
	Otherwise, "make syntax-check" would fail.
	(_gl_TS_unmarked_extern_functions): Add imbrlen to the list.

2021-12-20  Helge Kreutzmann  <debian@helgefjell.de>

	doc: --invert-match is described "above" --count, not below
	* doc/grep.in.1 (--count): s/below/above/.

2021-11-24  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2021-11-23  Paul Eggert  <eggert@cs.ucla.edu>

	tests: skip surrogate-search test on Cygwin
	Cygwin does not support surrogate-pair search strings, so
	skip the test there (Bug#27555).
	* tests/Makefile.am (TESTS): Add surrogate-search.
	* tests/surrogate-pair: Remove surrogate-search test,
	which is now done by surrogate-search.
	* tests/surrogate-search: New test, which is skipped on Cygwin.

2021-11-22  Paul Eggert  <eggert@cs.ucla.edu>

	doc: update to match recent "Binary files" change
	Suggested by Duncan Roe (Bug#51860#25).

2021-11-20  Paul Eggert  <eggert@cs.ucla.edu>

	grep: -s does not suppress “binary file matches”
	* src/grep.c (grep): Implement this.
	* tests/binary-file-matches: Add regression test.

	doc: "binary file matches" -> stderr [Bug#51860]

2021-11-14  Paul Eggert  <eggert@cs.ucla.edu>

	grep: port to PCRE2 10.20
	* src/pcresearch.c (PCRE2_SIZE_MAX): Default to SIZE_MAX.

	grep: fix minor -P memory leak
	* src/pcresearch.c (Pcompile): Free ccontext when no longer needed.

	grep: use ximalloc, not xcalloc
	* src/pcresearch.c (Pcompile): Use ximalloc, not xcalloc,
	and explicitly initialize the two slots that should be null.
	This is more likely to catch future errors if we use valgrind.

	grep: improve memory exhaustion checking with -P
	* src/pcresearch.c (struct pcre_comp): New member gcontext.
	(private_malloc, private_free): New functions.
	(jit_exec): It is OK to call pcre2_jit_stack_free (NULL), so simplify.
	Use gcontext for allocation.  Check for pcre2_jit_stack_create
	failure, since sljit bypasses private_malloc.  Redo to avoid two
	‘continue’s.
	(Pcompile): Create and use gcontext.

	grep: simplify JIT setup
	* src/pcresearch.c (Pcompile): Simplify since ‘die’ cannot return.

	grep: use PCRE2_EXTRA_MATCH_LINE
	* src/pcresearch.c (Pcompile): If available, use
	PCRE2_EXTRA_MATCH_LINE instead of doing it by hand.
	Simplify construction of substitute regular expression.

	grep: prefer signed integers
	* src/pcresearch.c (struct pcre_comp, jit_exec, Pexecute):
	Prefer signed to unsigned types when either will do.
	(jit_exec): Use INT_MULTIPLY_WRAPV instead of doing it by hand.
	(Pexecute): Omit line length limit test that is no longer
	needed with PCRE2.

	grep: speed up, fix bad-UTF8 check with -P
	* src/pcresearch.c (bad_utf8_from_pcre2): New function.  Fix bug
	where PCRE2_ERROR_UTF8_ERR1 was not treated as an encoding error.
	Improve performance when PCRE2_MATCH_INVALID_UTF is defined.
	(Pexecute): Use it.

	grep: improve pcre2_get_error_message comments
	* src/pcresearch.c (Pcompile): Improve comments re
	pcre2_get_error_message buffer.

	grep: Don’t limit jitstack_max to INT_MAX
	* src/pcresearch.c (jit_exec): Remove arbitrary INT_MAX limit on JIT
	stack size.

	maint: minor rewording and reindenting

2021-11-14  Carlo Marcelo Arenas Belón  <carenas@gmail.com>

	grep: migrate to pcre2
	Mostly a bug by bug translation of the original code to the PCRE2 API.
	Code still could do with some optimizations but should be good as a
	starting point.

	The API changes the sign of some types and therefore some ugly casts
	were needed, some of the changes are just to make sure all variables
	fit into the newer types better.

	Includes backward compatibility and could be made to build all the way
	to 10.00, but assumes a recent enough version and has been tested with
	10.23 (from CentOS 7, the oldest).

	Performance seems equivalent, and it also seems functionally complete.

	* m4/pcre.m4 (gl_FUNC_PCRE): Check for PCRE2, not the original PCRE.
	* src/pcresearch.c (struct pcre_comp, jit_exec)
	(Pcompile, Pexecute):
	Use PCRE2, not the original PCRE.
	* tests/filename-lineno.pl: Adjust to match PCRE2 diagnostics.

2021-11-11  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update README-prereq for Gperf, Rsync, Wget

2021-11-10  Paul Eggert  <eggert@cs.ucla.edu>

	tests: fix pcre test typo
	* tests/pcre-context: Initialize ‘fail’ earlier.

2021-11-10  Carlo Marcelo Arenas Belón  <carenas@gmail.com>

	tests: fix test logic for pcre-context
	Included in the original bug #20957, but corrupted somehow in
	transit as the required NUL characters are missing.

	Add a simpler version of the test case that uses plain characters
	and match the -z data and output to show the equivalence.

	Note the output is still not correct as it is missing the expected
	LF characters, but a full fix will have to wait until PCRE2.

	Fixes Bug#51735.

2021-11-09  Paul Eggert  <eggert@cs.ucla.edu>

	grep: work around PCRE bug
	Problem reported by Carlo Marcelo Arenas Belón (Bug#51710).
	* src/pcresearch.c (jit_exec): Don’t attempt to grow the JIT stack
	over INT_MAX - 8 * 1024.

	build: update gnulib submodule to latest

2021-10-30  Paul Eggert  <eggert@cs.ucla.edu>

	maint: modernize README-{hacking,prereq}

2021-10-28  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2021-08-27  Paul Eggert  <eggert@cs.ucla.edu>

	doc: document interval expression limitations
	* doc/grep.texi (Basic vs Extended, Performance):
	Document limitations of interval expressions (Bug#44538).

	build: update gnulib submodule to latest
	* src/system.h: Update decls to match current Gnulib.

2021-08-25  Paul Eggert  <eggert@cs.ucla.edu>

	grep: prefer signed to unsigned integers
	This improves runtime checking for integer overflow when compiling
	with gcc -fsanitize=undefined and the like.  It also avoids
	the need for some integer casts, which can be error-prone.
	* bootstrap.conf (gnulib_modules): Add idx.
	* src/dfasearch.c (struct dfa_comp, kwsmusts):
	(possible_backrefs_in_pattern, regex_compile, GEAcompile)
	(EGexecute):
	* src/grep.c (struct patloc, patlocs_allocated, patlocs_used)
	(n_patterns, update_patterns, pattern_file_name, poison_len)
	(asan_poison, fwrite_errno, compile_fp_t, execute_fp_t)
	(buf_has_encoding_errors, buf_has_nulls, file_must_have_nulls)
	(bufalloc, pagesize, all_zeros, fillbuf, nlscan)
	(print_line_head, print_line_middle, print_line_tail, grepbuf)
	(grep, contains_encoding_error, fgrep_icase_available)
	(fgrep_icase_charlen, fgrep_to_grep_pattern, try_fgrep_pattern)
	(main):
	* src/kwsearch.c (struct kwsearch, Fcompile, Fexecute):
	* src/kwset.c (struct trie, struct kwset, kwsalloc, kwsincr)
	(kwswords, treefails, memchr_kwset, acexec_trans, kwsexec)
	(treedelta, kwsprep, bm_delta2_search, bmexec_trans, bmexec)
	(acexec):
	* src/kwset.h (struct kwsmatch):
	* src/pcresearch.c (Pcompile, Pexecute):
	* src/search.h (mb_clen):
	* src/searchutils.c (kwsinit, mb_goback, wordchars_count)
	(wordchars_size, wordchar_next, wordchar_prev):
	Prefer idx_t to size_t or ptrdiff_t for nonnegative sizes,
	and prefer ptrdiff_t to size_t for sizes plus error values.
	* src/grep.c (uword_size): New constant, used for signed
	size calculations.
	(totalnl, add_count, totalcc, print_offset, print_line_head, grep):
	Prefer intmax_t to uintmax_t for wide integer calculations.
	(fgrep_icase_charlen): Prefer ptrdiff_t to int for size offsets.
	* src/grep.h: Include idx.h.
	* src/search.h (imbrlen): New function, like mbrlen except
[--snip--]
