We would like to make a new bug-fix-only release of grep soon, so here is a snapshot of the latest sources. Please build and test on whatever systems you can find, and let us know how that goes -- reports of success are welcome, too.
grep snapshot: http://meyering.net/grep/grep-ss.tar.xz 1.3 MB http://meyering.net/grep/grep-ss.tar.xz.sig http://meyering.net/grep/grep-2.22.29-83df.tar.xz Here are the NEWS entries: ** Bug fixes Binary files are now less likely to generate diagnostics and more likely to yield text matches. grep now reports "Binary file FOO matches" and suppresses further output instead of outputting a line containing an encoding error; hence grep can now report matching text before a later binary match. Formerly, grep reported FOO to be binary when it found an encoding error in FOO before generating output for FOO, which meant it never reported both matching text and matching binary data; this was less useful for searching text containing encoding errors in non-matching lines. [bug introduced in grep-2.21] grep -c no longer stops counting when finding binary data. [bug introduced in grep-2.21] grep no longer outputs encoding errors in unibyte locales. For example, if the byte '\x81' is not a valid character in a unibyte locale, grep treats the byte as binary data. [bug introduced in grep-2.21] grep -oP is no longer susceptible to an infinite loop when processing invalid UTF8 just before a match. [bug introduced in grep-2.22] --exclude and related options are now matched against trailing parts of command-line arguments, not against the entire arguments. This partly reverts the --exclude-related change in 2.22. [bug introduced in grep-2.22] --line-buffer is no longer ineffective when combined with -l. [bug introduced in grep-2.5] -xw is now equivalent to -x more consistently, with -P and with backrefs. [bug only partially fixed in grep-2.19] More detailed changes in grep since v2.22: Jim Meyering (9): maint: post-release administrivia tests: mark performance-related tests as expensive grep -oP: don't infloop when processing invalid UTF8 preceding a match maint: correct (make sorted) order of test file names maint: update copyright year, bootstrap, init.sh mb-non-UTF8-performance: avoid FP test failure on fast hardware tests: fix encoding-error test failure to use of printf '\xHH' tests: do use "yes" but via an AWK replacement maint: fix typo in NEWS: s/a/an/ Paul Eggert (20): grep: --exclude matches trailing parts of args grep: be less picky about encoding errors dfa: port to tinycc grep: -c should keep counting after binary data grep: report line-buffered write error right away grep: remove duplicate init grep: fix -l --line-buffer bug doc: minor clarifications doc: clarify text vs binary match output grep: fix bug with with invalid unibyte sequence Fix calculation of unibyte_mask grep: restore -P PCRE_NO_UTF8_CHECK optimization grep: restore -P optimization (followup fix) Improve on fix for Bug#22181 grep: improve unibyte -P performance doc: mention unibyte encoding fix tests: port to other POSIXish platforms * tests/pcre-count: Don't assume the page size is 32kB. tests: omit update-copyright-tests grep: -x now supersedes -w more consistently Changes in gnulib since v2.22: * gnulib 956fa54...271dfe3 (45): > autoupdate > tests: for compare_(), use cmp -s where available > version-etc: new year > human: fix output buffer overrun by 1 > autoupdate > maint: add missing ChangeLog entry for previous commit > maint: fix operator precedence in mbrtowc test > autoupdate > regexprops-generic: update from regex.h > strftime-tests: avoid false failure on OS X > update from texinfo > fts: ensure leaf optimization is used for NFS > fts: enable leaf optimization for XFS > non-recursive-gnulib-prefix-hack: preserve V_GPERF lines > intprops: comment fix > update from texinfo > intprops-test: work around GCC bug 68971 > autoupdate > gnulib-tool: allow multiple --local-dir usage > fix freadptr to work with ungetc on all uClibc configs > update from texinfo > autoupdate > parse-datetime: relax license to LGPLv2+, for OSTree > update from texinfo > autoupdate > autoupdate > update from texinfo > xalloc-oversized: improve performance with GCC 5 > intprops: new public macro EXPR_SIGNED > intprops: fix typo in clang port > test-timespec: fix typo in previous change > timespec-sub: fix overflow bug; add tests > intprops-test: suppress -Woverlength-strings > maint: add missing ChangeLog entry for previous commit > quotearg: add quotearg_n_style_colon() > intprops: revise _WRAPV macros, revert _OVERFLOW > intprops: add parentheses for when OP has precedence lower than "-" > quotearg: constify get_quoting_style parameters > quotearg: add support for $'' shell escaping > maint: use a more standard return from mbrtowc test > intprops: add WRAPV and const flavors for GCC 5 > doc: use extended timezone format in iso-8601 example > update from texinfo > update from texinfo > update from texinfo