summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* maint: post-release administriviaHEADmasterJim Meyering2023-05-133-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.11v3.11Jim Meyering2023-05-131-1/+1
| | | | * NEWS: Record release date.
* doc: spelling fixes in doc/, comments and old ChangeLogJosh Soref2023-05-103-21/+21
| | | | | | * ChangeLog-2009: Fix spelling errors. * bootstrap: Likewise. * doc/grep.texi: Likewise.
* tests: reenable gnulib's strtoll and strtoull testsJim Meyering2023-05-041-2/+0
| | | | | * bootstrap.conf (avoided_gnulib_modules): Restore those tests. The failures I saw must have been due to a stale config.cache.
* tests: temporarily omit gnulib's strtoll and strtoull testsJim Meyering2023-04-301-0/+2
| | | | | * bootstrap.conf (avoided_gnulib_modules): Omit strtoll and strtoull tests, because the edge-case 0[bx] tests fail on recent systems.
* build: update gnulib to latestJim Meyering2023-04-301-0/+0
|
* pcre: work around a PCRE2_MATCH_INVALID_UTF bugCarlo Marcelo Arenas Belón2023-04-304-12/+54
| | | | | | | | | | | | | | 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.
* doc: improve doc for -P '\d'Paul Eggert2023-04-292-14/+13
| | | | | | | | | | | | 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=’Paul Eggert2023-04-291-1/+1
| | | | | * m4/pcre.m4 (gl_FUNC_PCRE): Check whether PCRE_CFLAGS and PCRE_LIBS are set, not whether they are set to a nonempty value.
* doc: say that `-f -` reads patterns from stdinJim Meyering2023-04-293-0/+7
| | | | | | | | * 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
* build: prevent pkg-config from overriding PCRE_* settingsCarlo Marcelo Arenas Belón2023-04-222-2/+8
| | | | | | | | 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
* doc: note when a bug was introducedJim Meyering2023-04-201-0/+1
| | | | * NEWS: say that the \d bug was introduced in 3.10.
* build: update gnulib to latestJim Meyering2023-04-201-0/+0
|
* grep: make -P survive JIT compilation failurePaul Eggert2023-04-131-3/+3
| | | | | * src/pcresearch.c (Pcompile): Ignore failure returns from pcre2_jit_compile.
* grep: improve PCRE2 version outputPaul Eggert2023-04-105-12/+14
| | | | | | | | | | * 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.
* tests: skip y2038 test upon touch setup failureJim Meyering2023-04-101-1/+1
| | | | | | * 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.
* build: update gnulib to latestJim Meyering2023-04-091-0/+0
|
* tests: add a known-failing glibc-infloop testJim Meyering2023-04-094-2/+41
| | | | | | | | | * 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 infoJim Meyering2023-04-094-0/+36
| | | | | | | | | | 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 bugJim Meyering2023-04-092-0/+14
| | | | | * tests/y2038-vs-32-bit: New file. * tests/Makefile.am (TESTS): Add the file name
* grep: re-fix Y2038 bug on glibc 2.34+ x86, ARMPaul Eggert2023-04-032-0/+5
| | | | | | | | | | 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.
* grep: fix -P [\d] by fixing \w only if PCRE2 10.43Paul Eggert2023-04-024-99/+27
| | | | | | | | | | | | | | 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.
* maint: post-release administriviaJim Meyering2023-03-223-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.10v3.10Jim Meyering2023-03-221-1/+1
| | | | * NEWS: Record release date.
* doc: avoid capital sharp S with TeXPaul Eggert2023-03-221-1/+7
| | | | | | 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.”
* build: update gnulib to latestJim Meyering2023-03-221-0/+0
|
* build: update gnulib to latestJim Meyering2023-03-201-0/+0
|
* doc: clarify BRE vs ERE (bug#62272)Paul Eggert2023-03-202-11/+13
|
* grep: -P (--perl-regexp) \D once again works like [^0-9]Jim Meyering2023-03-194-18/+51
| | | | | | | | | | | * 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
* grep: forward port to PCRE2 10.43Paul Eggert2023-03-193-91/+99
| | | | | | | | | | | * 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 PCREPaul Eggert2023-03-191-0/+6
| | | | * doc/grep.texi: Mention that PCRE might not match Perl exactly.
* grep: -P (--perl-regexp) \d: match only ASCII digitsJim Meyering2023-03-185-1/+154
| | | | | | | | | | | | | | | | 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
* build: update gnulib to latestJim Meyering2023-03-181-0/+0
|
* doc: remove mention of unused _N_GNU_nonoption_argv_flags_ envvarJim Meyering2023-03-093-37/+1
| | | | | | | | | * 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.
* maint: post-release administriviaJim Meyering2023-03-053-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.9v3.9Jim Meyering2023-03-051-1/+1
| | | | * NEWS: Record release date.
* build: update gnulib to latestJim Meyering2023-03-051-0/+0
|
* tests: avoid failure on Alpine Linux 3.17, due to non-POSIX compliant trBruno Haible2023-03-051-4/+4
| | | | | * tests/fmbtest: Don't use [x*n] syntax in the tr options, since tr from BusyBox 1.35 does not support it.
* build: update gnulib to latestJim Meyering2023-02-261-0/+0
|
* build: avoid --enable-gcc-warnings clang-vs-sprintf build failureJim Meyering2023-02-191-0/+1
| | | | | * configure.ac (WERROR_CFLAGS): Disable -Wdeprecated-declarations to accommodate Apple's clang 14 that's installed as "gcc".
* maint: remove stray characterJim Meyering2023-02-041-1/+1
| | | | * HACKING: Remove a stray "[" alone on a line.
* maint: prefer https: to git:Jim Meyering2023-02-044-5/+5
| | | | | | | | | | | | | | | | | | | | 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.
* Don't require 'rsync' as a prerequisite. It is no longer needed since 2018.Bruno Haible2023-01-302-2/+0
| | | | | * bootstrap.conf (buildreq): Remove rsync. * README-prereq: Likewise.
* build: update gnulib submodule to latestPaul Eggert2023-01-221-0/+0
|
* maint: stop including getprogname.hPaul Eggert2023-01-212-3/+0
| | | | | | 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 latestPaul Eggert2023-01-211-0/+0
|
* build: update gnulib submodule to latestPaul Eggert2023-01-181-0/+0
|
* maint: spelling fixesPaul Eggert2023-01-163-3/+4
|
* tests: fix test -eq problemPaul Eggert2023-01-151-1/+1
| | | | | 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 latestPaul Eggert2023-01-151-0/+0
|