summaryrefslogtreecommitdiff
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* Avoid DoS vulnerability through unsafe default assignment.Bruno Haible2022-07-231-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://www.shellcheck.net/wiki/SC2223 . * MODULES.html.sh (func_tmpdir): Surround default assignment with double-quotes. * build-aux/bootstrap: Likewise. * build-aux/csharpcomp.sh.in (func_tmpdir): Likewise. * build-aux/gendocs.sh: Likewise. * build-aux/libtool-next-version (func_tmpdir): Likewise. * config/srclist-update: Likewise. * gnulib-tool (func_tmpdir): Likewise. * posix-modules (func_tmpdir): Likewise. * tests/test-atexit.sh: Likewise. * tests/test-btoc32-1.sh: Likewise. * tests/test-btoc32-2.sh: Likewise. * tests/test-btowc1.sh: Likewise. * tests/test-btowc2.sh: Likewise. * tests/test-c-dtoastr.sh: Likewise. * tests/test-c-ldtoastr.sh: Likewise. * tests/test-c-snprintf.sh: Likewise. * tests/test-c-strcase.sh: Likewise. * tests/test-c-vasprintf.sh: Likewise. * tests/test-c-vsnprintf.sh: Likewise. * tests/test-c-xvasprintf.sh: Likewise. * tests/test-c32isalnum.sh: Likewise. * tests/test-c32isalpha.sh: Likewise. * tests/test-c32isblank.sh: Likewise. * tests/test-c32iscntrl.sh: Likewise. * tests/test-c32isdigit.sh: Likewise. * tests/test-c32isgraph.sh: Likewise. * tests/test-c32islower.sh: Likewise. * tests/test-c32isprint.sh: Likewise. * tests/test-c32ispunct.sh: Likewise. * tests/test-c32isspace.sh: Likewise. * tests/test-c32isupper.sh: Likewise. * tests/test-c32isxdigit.sh: Likewise. * tests/test-c32rtomb.sh: Likewise. * tests/test-c32snrtombs-1.sh: Likewise. * tests/test-c32snrtombs-2.sh: Likewise. * tests/test-c32snrtombs-3.sh: Likewise. * tests/test-c32snrtombs-4.sh: Likewise. * tests/test-c32srtombs-1.sh: Likewise. * tests/test-c32srtombs-2.sh: Likewise. * tests/test-c32srtombs-3.sh: Likewise. * tests/test-c32srtombs-4.sh: Likewise. * tests/test-c32stombs-1.sh: Likewise. * tests/test-c32stombs-2.sh: Likewise. * tests/test-c32stombs-3.sh: Likewise. * tests/test-c32stombs-4.sh: Likewise. * tests/test-closein.sh: Likewise. * tests/test-copy-acl.sh (func_tmpdir): Likewise. * tests/test-copy-file.sh (func_tmpdir): Likewise. * tests/test-dprintf-posix.sh: Likewise. * tests/test-execl.sh: Likewise. * tests/test-execle.sh: Likewise. * tests/test-execlp.sh: Likewise. * tests/test-execv.sh: Likewise. * tests/test-execve.sh: Likewise. * tests/test-execvp.sh: Likewise. * tests/test-execvpe.sh: Likewise. * tests/test-file-has-acl.sh (func_tmpdir): Likewise. * tests/test-fprintf-posix.sh: Likewise. * tests/test-init.sh: Likewise. * tests/test-iswdigit.sh: Likewise. * tests/test-iswxdigit.sh: Likewise. * tests/test-mbmemcasecmp1.sh: Likewise. * tests/test-mbmemcasecmp2.sh: Likewise. * tests/test-mbmemcasecmp3.sh: Likewise. * tests/test-mbmemcasecoll1.sh: Likewise. * tests/test-mbmemcasecoll2.sh: Likewise. * tests/test-mbmemcasecoll3.sh: Likewise. * tests/test-mbrtoc32-1.sh: Likewise. * tests/test-mbrtoc32-2.sh: Likewise. * tests/test-mbrtoc32-3.sh: Likewise. * tests/test-mbrtoc32-4.sh: Likewise. * tests/test-mbrtowc1.sh: Likewise. * tests/test-mbrtowc2.sh: Likewise. * tests/test-mbrtowc3.sh: Likewise. * tests/test-mbrtowc4.sh: Likewise. * tests/test-mbscasecmp.sh: Likewise. * tests/test-mbscasestr2.sh: Likewise. * tests/test-mbscasestr3.sh: Likewise. * tests/test-mbscasestr4.sh: Likewise. * tests/test-mbschr.sh: Likewise. * tests/test-mbscspn.sh: Likewise. * tests/test-mbsinit.sh: Likewise. * tests/test-mbsncasecmp.sh: Likewise. * tests/test-mbsnrtoc32s-1.sh: Likewise. * tests/test-mbsnrtoc32s-2.sh: Likewise. * tests/test-mbsnrtoc32s-3.sh: Likewise. * tests/test-mbsnrtoc32s-4.sh: Likewise. * tests/test-mbsnrtowcs1.sh: Likewise. * tests/test-mbsnrtowcs2.sh: Likewise. * tests/test-mbsnrtowcs3.sh: Likewise. * tests/test-mbsnrtowcs4.sh: Likewise. * tests/test-mbspbrk.sh: Likewise. * tests/test-mbspcasecmp.sh: Likewise. * tests/test-mbsrchr.sh: Likewise. * tests/test-mbsrtoc32s-1.sh: Likewise. * tests/test-mbsrtoc32s-2.sh: Likewise. * tests/test-mbsrtoc32s-3.sh: Likewise. * tests/test-mbsrtoc32s-4.sh: Likewise. * tests/test-mbsrtowcs1.sh: Likewise. * tests/test-mbsrtowcs2.sh: Likewise. * tests/test-mbsrtowcs3.sh: Likewise. * tests/test-mbsrtowcs4.sh: Likewise. * tests/test-mbsspn.sh: Likewise. * tests/test-mbsstr2.sh: Likewise. * tests/test-mbsstr3.sh: Likewise. * tests/test-mbstoc32s-1.sh: Likewise. * tests/test-mbstoc32s-2.sh: Likewise. * tests/test-mbstoc32s-3.sh: Likewise. * tests/test-mbstoc32s-4.sh: Likewise. * tests/test-nl_langinfo.sh: Likewise. * tests/test-parse-duration.sh (func_tmpdir): Likewise. * tests/test-perror.sh: Likewise. * tests/test-printf-posix.sh: Likewise. * tests/test-set-mode-acl.sh (func_tmpdir): Likewise. * tests/test-setlocale1.sh: Likewise. * tests/test-strtod1.sh: Likewise. * tests/test-strtold1.sh: Likewise. * tests/test-unicodeio2.sh: Likewise. * tests/test-unicodeio3.sh: Likewise. * tests/test-vasnprintf-posix2.sh: Likewise. * tests/test-vc-list-files-cvs.sh: Likewise. * tests/test-vc-list-files-git.sh: Likewise. * tests/test-vdprintf-posix.sh: Likewise. * tests/test-vfprintf-posix.sh: Likewise. * tests/test-vprintf-posix.sh: Likewise. * tests/test-wcrtomb.sh: Likewise. * tests/test-wcsnrtombs1.sh: Likewise. * tests/test-wcsnrtombs2.sh: Likewise. * tests/test-wcsnrtombs3.sh: Likewise. * tests/test-wcsnrtombs4.sh: Likewise. * tests/test-wcsrtombs1.sh: Likewise. * tests/test-wcsrtombs2.sh: Likewise. * tests/test-wcsrtombs3.sh: Likewise. * tests/test-wcsrtombs4.sh: Likewise. * tests/test-xprintf-posix.sh: Likewise. * tests/test-xstrtoimax.sh: Likewise. * tests/test-xstrtol.sh: Likewise. * tests/test-xstrtoll.sh: Likewise. * tests/test-xstrtoumax.sh: Likewise. * tests/test-yesno.sh: Likewise. * tests/unicase/test-locale-language.sh: Likewise. * tests/unicase/test-ulc-casecmp1.sh: Likewise. * tests/unicase/test-ulc-casecmp2.sh: Likewise. * tests/unicase/test-ulc-casecoll1.sh: Likewise. * tests/unicase/test-ulc-casecoll2.sh: Likewise. * tests/unigbrk/test-ulc-grapheme-breaks.sh: Likewise. * tests/unistdio/test-u16-vasnprintf2.sh: Likewise. * tests/unistdio/test-u16-vasnprintf3.sh: Likewise. * tests/unistdio/test-u32-vasnprintf2.sh: Likewise. * tests/unistdio/test-u32-vasnprintf3.sh: Likewise. * tests/unistdio/test-u8-vasnprintf2.sh: Likewise. * tests/unistdio/test-u8-vasnprintf3.sh: Likewise. * tests/unistdio/test-ulc-vasnprintf2.sh: Likewise. * tests/unistdio/test-ulc-vasnprintf3.sh: Likewise. * tests/uniwbrk/test-ulc-wordbreaks.sh: Likewise. * tests/uniwidth/test-uc_width2.sh: Likewise.
* bootstrap: Comments.Bruno Haible2022-07-181-0/+5
| | | | * build-aux/bootstrap: Comment about two unused variables.
* doc: Update README.Bruno Haible2022-07-171-0/+6
| | | | | * doc/README: Fix stale links (reported by Tzvetelin Katchov). Clarify the relation to build-aux/gnu-web-doc-update.
* doc: Fix typo.Bruno Haible2022-07-141-0/+7
| | | | | | | Reported by Eric Gallager <egall@gwmail.gwu.edu> in <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00045.html>. * doc/posix-functions/mmap.texi: Add parenthesis.
* parse-datetime: improve doc for TZ="<-07>7" etc.Paul Eggert2022-07-121-0/+6
| | | | | * doc/parse-datetime.texi (Specifying time zone rules): Give examples of POSIX TZ strings that specify UTC offsets (Bug#56524).
* sigsegv: Optimize stackvma implementation for AIX 7.Bruno Haible2022-07-101-0/+10
| | | | | | | | | | Reported by Neha Jain <nehajain29@in.ibm.com> in <https://lists.gnu.org/archive/html/bug-m4/2022-06/msg00005.html> via Eric Blake. * lib/stackvma.c: For AIX, add implementation that uses /proc/$pid/map, based on lib/vma-iter.c. (sigsegv_get_vma): Use it on AIX 7 or higher.
* vma-iter: Add support for AIX 7.Bruno Haible2022-07-101-0/+11
| | | | | | | | | | * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on AIX. * lib/vma-iter.c (vma_iterate): Add code for AIX, known to work on AIX 7. * lib/get-rusage-as.c: Update comments. * lib/get-rusage-data.c: Likewise. * tests/test-get-rusage-as.c (main): Take into account the special address space organization on AIX in 32-bit mode.
* iconv: Define a summary result.Bruno Haible2022-07-101-0/+7
| | | | | | | Reported by Simon Josefsson in <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00020.html>. * m4/iconv.m4 (AM_ICONV): Define also am_cv_func_iconv_summary.
* iconv: Remove obsolete comment.Bruno Haible2022-07-101-0/+6
| | | | | * m4/iconv.m4 (AM_ICONV): Remove comment that is obsolete since 2020-08-16.
* announce-gen: Fix internationalization in verification instructions.Bruno Haible2022-07-101-0/+6
| | | | | * build-aux/announce-gen: Set LC_ALL, not LANG, to "C", to force English output from gpg.
* lib-symbol-visibility: Improve documentation.Bruno Haible2022-07-101-0/+5
| | | | * doc/lib-symbol-visibility.texi: Tweak BUILDING_SHARED snippet.
* doc: Mark Minix as no longer tested.Bruno Haible2022-07-101-0/+9
| | | | | | | | | | Rationale: No commits since 2018 at https://git.minix3.org/. Reported by Paul Eggert and Jim Meyering in <https://lists.gnu.org/archive/html/grep-devel/2022-07/msg00027.html>. * doc/gnulib-intro.texi (Supported Platforms): Mark Minix as no longer tested.
* announce-gen: better diagnose some usage errorsJim Meyering2022-07-091-0/+12
| | | | | | | | | | | * build-aux/announce-gen (main): Erroneous usage would elicit a misleading diagnostic. When --gnulib-version=V was specified: - without --bootstrap-tools=..., or - with --bootstrap-tools=..., but without "gnulib" in that list we would give an inappropriate diagnostic. Now, each diagnostic is tailored to the precise erroneous condition. Reported by Bruno Haible in https://lists.gnu.org/r/bug-gnulib/2022-01/msg00025.html
* git-version-gen: Doc fix.Simon Josefsson2022-07-091-0/+8
| | | | | | | | Reported by Reuben Thomas <rrt@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00012.html>. * build-aux/git-version-gen (usage): Replace incorrect text with bug report instructions.
* announce-gen: Improve GnuPG verification instructions.Simon Josefsson2022-07-091-0/+6
| | | | | * build-aux/announce-gen: Add GPG fingerprint to output, and a pointer to GNU keyring.
* lib-symbol-visibility: Improve documentation.Simon Josefsson2022-07-081-0/+6
| | | | | * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet suggested by Bruno Haible.
* havelib: Fix 'configure --help' output.Bruno Haible2022-07-051-0/+5
| | | | * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Fix m4 quoting bug.
* lib-symbol-visibility: Improve documentation.Bruno Haible2022-07-031-0/+9
| | | | | | | | | Reported by Vivien Kraus <vivien@planete-kraus.eu> in <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00093.html>. * doc/lib-symbol-visibility.texi: List the platforms. Extend the LIBFOO_DLL_EXPORTED to work also with mingw and also with --disable-shared.
* supersede: Support the file name "/dev/null" on native Windows.Bruno Haible2022-07-031-0/+6
| | | | | * lib/supersede.c (open_supersede): On native Windows, map "/dev/null" to "NUL".
* maint.mk: fix syntax-check for unnecessary hash.h header useJim Meyering2022-06-231-0/+9
| | | | | | | | * top/maint.mk (_hash_re): Correct the regexp. It had two problems: - lacked the "hash_" prefix, so would match non-uses - failed to detect uses of the hash_x?initialize functions The former led to an excess/unneeded use of hash.h in coreutils' cut.c. The latter would have led to a FP "not needed" report for copy.c.
* fchmodat: Fix test failure on native Windows.Bruno Haible2022-06-221-0/+5
| | | | * modules/fchmodat (Depends-on): Add 'chmod'.
* chmod: Add tests.Bruno Haible2022-06-221-0/+4
| | | | | * tests/test-chmod.c: New file, based on tests/test-lchmod.c. * modules/chmod-tests: New file.
* chmod: New module.Bruno Haible2022-06-221-0/+15
| | | | | | | | | | | | | | * lib/sys_stat.in.h (chmod): Declare when GNULIB_CHMOD is 1. * lib/chmod.c: New file, based on lib/lchmod.c. * m4/chmod.m4: New file, based on m4/fchmodat.m4. * m4/sys_stat_h.m4 (gl_SYS_STAT_H): Test whether chmod is declared. (gl_SYS_STAT_H_REQUIRE_DEFAULTS): Initialize GNULIB_CHMOD. (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_CHMOD. * modules/sys_stat (Makefile.am): Substitute GNULIB_CHMOD, REPLACE_CHMOD. * modules/chmod: New file, based on modules/lchmod. * doc/posix-functions/chmod.texi: Mention the new module and the problems on IRIX and Windows.
* lchmod: Simplify.Bruno Haible2022-06-211-0/+5
| | | | * lib/lchmod.c: Remove unnecessary include, obsolete since 2020-02-23.
* javacomp-script, javaexec-script: Add support for disabling Java.Bruno Haible2022-06-201-0/+6
| | | | | * m4/javacomp.m4 (gt_JAVACOMP_DISABLED): New macro. * m4/javaexec.m4 (gt_JAVAEXEC_DISABLED): New macro.
* lchmod: port back to AIX 7.2Paul Eggert2022-06-191-0/+10
| | | | | | | | | | | Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html * lib/lchmod.c: Include string.h, for strlen. (lchmod): Do not depend on HAVE_READLINK since we now depend on the readlink module. Check for AIX 7.2 bug. * m4/lchmod.m4 (gl_PREREQ_LCHMOD): Do not check for readlink since we now depend on the readlink module. * modules/lchmod (Depends-on): Depend on readlink.
* fchmodat: pacify gcc -Wunused-variablePaul Eggert2022-06-191-0/+7
| | | | | | Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html * lib/fchmodat.c (fchmodat): Remove unused local.
* getlogin, getlogin_r tests: Really avoid test failure.Bruno Haible2022-06-191-0/+8
| | | | | | | | Reported by Letu Ren <fantasquex@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00037.html>. * tests/test-getlogin.h (test_getlogin_result): Parse the contents of /proc/self/loginuid as an unsigned integer.
* fchmodat: port better to MS-Windows etc.Paul Eggert2022-06-121-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | MS-Windows problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2022-06/msg00041.html Although I don’t use MS-Windows I see some related fstatat etc. problems and am trying to fix them with this further patch. * lib/fchmodat.c (fchmodat): * lib/lchmod.c (lchmod): * lib/lchown.c (lchown) [!HAVE_LCHOWN && HAVE_CHOWN && !CHOWN_MODIFIES_SYMLINK]: * lib/renameatu.c (renameatu) [HAVE_RENAME && RENAME_TRAILING_SLASH_SOURCE_BUG]: Use readlinkat/readlink instead of fstatat/lstat to test merely whether a string names a symlink, as this avoids problems with EOVERFLOW. Also, I hope it works around the MS-Windows issues that Bruno noted. * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Check for readlinkat, not lchmod. * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not require AC_CANONICAL_HOST or check for lstat. (gl_PREREQ_LCHMOD): Check for readlink. * modules/lchown (Depends-on): Add readlink. Do not depend on lstat merely because !HAVE_LCHOWN. * modules/renameatu (Depends-on): Add fstatat, readlinkat.
* doc: Update O_PATH platforms list.Bruno Haible2022-06-121-0/+5
| | | | * doc/posix-headers/fcntl.texi: Update O_PATH platforms list.
* fcntl: document O_PATHPaul Eggert2022-06-111-0/+3
| | | | * doc/posix-headers/fcntl.texi: Mention O_PATH.
* fchmodat: port to old Linux kernel + newer headersPaul Eggert2022-06-111-0/+21
| | | | | | | | | | | | | | | | | | | | Problem reported by Lance Fredrickson in: https://lists.gnu.org/r/bug-gnulib/2022-06/msg00038.html * lib/fchmodat.c (fchmodat): * lib/lchmod.c (lchmod): Do not rely on AT_EMPTY_PATH as to whether syscalls work on ""; instead, if a call fails with ENOENT assume that those syscalls do not work. Do not use fstatat to determine whether a file is a symlink, as this has problems with EOVERFLOW. Use readlinkat instead, and if it fails with EINVAL then the file is not a symlink. Remove #if tests on __linux__ || __ANDROID__ || __CYGWIN__ as this has been a maintenance hassle and it’s unlikely these days that a new platform would #define O_PATH without also either supporting /proc or keeping it absent. * modules/fchmodat (Depends-on): Remove fstatat. There should be no need for either fchmodat or lchmod to depend on readlinkat, since they use readlinkat only in contexts where it should work without Gnulib intervention.
* fopen-gnu: Make this module work again (regression 2022-01-03).Bruno Haible2022-06-061-0/+7
| | | | | | | Reported by Nelson H. F. Beebe <beebe@math.utah.edu> in <https://lists.gnu.org/archive/html/platform-testers/2022-04/msg00005.html>. * modules/fopen-gnu (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
* getlogin, getlogin_r tests: Avoid test failure in specific environments.Bruno Haible2022-06-061-0/+11
| | | | | | | | | | | Reported by Letu Ren <fantasquex@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00001.html>. * modules/getlogin-tests (Depends-on): Add stdbool. * modules/getlogin_r-tests (Depends-on): Likewise. * tests/test-getlogin.h: Include stdbool.h. (test_getlogin_result): On Linux, skip the test if /proc/self/loginuid contains "-1".
* doc: Add section to attract more people towards the GNU project.Bruno Haible2022-06-061-0/+2
| | | | | | | | Inspired by a suggestion from José E. Marchesi <jemarch@gnu.org> on the gnu-prog-discuss mailing list. * doc/join-gnu.texi: New file. * doc/gnulib-readme.texi: Include it.
* doc: Add section to attract more people towards the GNU project.Bruno Haible2022-06-051-0/+6
| | | | | | | | Inspired by a suggestion from José E. Marchesi <jemarch@gnu.org> on the gnu-prog-discuss mailing list. * doc/join-gnu.texi: New file. * doc/gnulib-readme.texi: Include it.
* doc: Fix warnings about regex chapter structure (regression 2022-05-15).Bruno Haible2022-06-051-0/+5
| | | | * doc/regex.texi (GNU Operators): Fix menu.
* regex-quote: \} -> } in EREsPaul Eggert2022-06-041-0/+6
| | | | | | | * lib/regex-quote.c (ere_special): Don’t use \} in EREs, as POSIX says the interpretation is undefined. * tests/test-regex-quote.c (test_bre, test_ere): Add tests for }.
* dfa: do not warn about \] and \}Paul Eggert2022-06-041-0/+7
| | | | | | * lib/dfa.c (lex): Do not warn about \] and \}, since they’re surely universally supported even though POSIX says their interpretation is undefined.
* regex-quote: \] -> ] in EREs and BREsPaul Eggert2022-06-031-0/+12
| | | | | | | | | | | | | * build-aux/bootstrap: * build-aux/bootstrap.conf (gettext_external): * check-AC_LIBOBJ: * lib/regex-quote.c (bre_special, ere_special): * gnulib-tool (func_modules_transitive_closure) (func_emit_autoconf_snippet, func_import, func_create_testdir): * tests/test-regex-quote.c (test_bre, test_ere): * top/maint.mk (longopt_re, gpg_key_ID): Don’t use \] in BREs and EREs, as POSIX says the interpretation is undefined.
* filevercmp: don’t treat entire filename as suffixPaul Eggert2022-06-031-0/+10
| | | | | | | | | Problem reported by Artém S. Tashkinóv in: https://lists.gnu.org/r/bug-gnulib/2022-06/msg00012.html * lib/filevercmp.c (file_prefixlen): When stripping (\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes, do not strip the entire file name. * tests/test-filevercmp.c (examples): Adjust to match new behavior.
* setlocale: Update after Turkey changed its name.Bruno Haible2022-06-031-0/+5
| | | | * lib/setlocale.c: Update comments.
* GNU Emacs Operator node deleted from regex.texiKarl Berry2022-05-251-0/+6
|
* dfa: new options DFA_STAR_WARN, DFA_PLUS_WARNPaul Eggert2022-05-241-0/+7
| | | | | | This lets ‘grep -E '(*a|+b)'’ warn about the * and the +. * lib/dfa.h (DFA_STAR_WARN, DFA_PLUS_WARN): New flags. * lib/dfa.c (lex): Support them.
* dfa: '\n' is not governed by RE_LIMITED_OPSPaul Eggert2022-05-231-0/+4
| | | | | * lib/dfa.c (lex): Pay no attention to RE_LIMITED_OPS when deciding how to parse '\n', since regcomp.c doesn’t.
* dfa: new option DFA_STRAY_BACKSLASH_WARNPaul Eggert2022-05-231-0/+9
| | | | | | | | | | This is for grep, which wants to warn about stray backslashes that lead to unspecified behavior. For example, "grep -oi '\a'" surprisingly is not equivalent to "grep -oi 'a'", so the stray backslash should be warned about. * lib/dfa.c: Include wctype.h, for iswprint and iswspace. (lex): Add support for DFA_STRAY_BACKSLASH_WARN. * lib/dfa.h (DFA_STRAY_BACKSLASH_WARN): New constant.
* dfa: new option DFA_CONFUSING_BRACKETS_ERRORPaul Eggert2022-05-231-0/+10
| | | | | | | | | This is for grep, which wants [:alpha:] to be an error at the top level. * lib/dfa.c (struct regex_syntax): New member dfaopts, replacing anchor. All uses changed. (parse_bracket_exp): Error, not warn, if DFA_CONFUSING_BRACKETS_ERROR. * lib/dfa.h (DFA_CONFUSING_BRACKETS_ERROR): New constant.
* strstr-simple: pacify GCC 12.1Paul Eggert2022-05-211-0/+6
| | | | | * lib/str-two-way.h (two_way_long_needle): Pacify GCC 12.1 -Wsuggest-attribute=pure (x86-64, -O2).
* dfa: steer cleer of POSIX-reserved symbolsPaul Eggert2022-05-201-0/+7
| | | | | | * lib/dfa.c (str_eq): Rename from streq. All uses changed. (c_isdigit): Rename from isasciidigit. The function worked in EBCDIC so it wasn’t ASCII-specific anyway. All uses changed.
* parse-datetime: support 'J' military time zonePaul Eggert2022-05-171-0/+11
| | | | | | | | | | Requested by Brian Inglis in: https://savannah.gnu.org/support/?110644 * lib/parse-datetime.y (parser_control): New member J_zones_seen. (item): New item 'J'. (military_table): Add 'J'. (parse_datetime_body): Set and use J_zones_seen. * tests/test-parse-datetime.c (main): Test "J".