Commit Graph
114 Commits
Author SHA1 Message Date
Paul Eggert 598c3d0b95 sed: omit some multithreading cruft
sed is single-threaded, so does not need multithreading support.
* bootstrap.conf (avoided_gnulib_modules): Avoid lock, not lock-tests.
(bootstrap_post_import_hook): Copy lib/glthread/lock.h by hand,
as we now avoid ‘lock’.
* configure.ac (GNULIB_EXCLUDE_SINGLE_THREAD)
(GNULIB_LOCALENAME_SINGLE_THREAD)
(GNULIB_MBRTOWC_SINGLE_THREAD, GNULIB_REGEX_SINGLE_THREAD)
(GNULIB_WCHAR_SINGLE_LOCALE, GNULIB_MBRTOC32_REGULAR):
New macros.
* lib/.gitignore, m4/.gitignore: Adjust accordingly.

sed: also avoid ‘lock’ module

* bootstrap.conf
2026-08-17 01:17:23 -07:00
Paul Eggert 2b155a6c8b sed: support multibyte delimiters
* basicdefs.h: Do not include wchar.h, wctype.h.
(ISASCII, ISBLANK, ISSPACE): Remove.  All uses replaced
by c32isblank, c32isspace.
* bootstrap.conf (gnulib_modules): Add c32isblank, c32isprint,
c32isspace, c32rtomb, c32toower, c32toupper, mcel.  Remove btowc,
localcharset, mbrlen, mbrtowc, mbsinit, wcrtomb, wctob, wctype-h.
* configure.ac: Do not check for headers locale.h, errno.h,
wchar.h, wctype.h, mcheck.h.
Do not check for isascii.  Remove ac_cv_func_wcscoll hack.
(XFAIL_TESTS): Remove check for whether to run UTF-8 Cyrillic
tests, as I hope the other changes in this patch should fix
problems in that area.
* lib/.gitignore, m4/.gitignore: Adjust
* sed/compile.c (struct prog_info.prev): New member.
Adjust all users of this struct to update and use it when needed.
(INCHAR_EOF): New constant.
(inchar): Return a char32_t value for each wide character, a
negative byte value for encoding errors, and INCHAR_EOF for end of
input.  All callers changed.
(savchar): Now takes no arguments.  All callers changed.
(in_nonblank): Use char32_t tests rather than ctype.h tests.
(add_prev_to_buffer): New function.
(add_then_next, match_slash, read_text):
Use add_prev_to_buffer instead of add1_buffer when the idea is to
copy a character from input to output, as the character might be
multibyte and add1_buffer does only single-byte.
(match_slash): Support multibyte delimiters.  Test for matchers
individually rather than via strchr, to make it clearer that we
are not testing for '\0'.
* sed/compile.c (add_then_next, snarf_char_class):
* sed/debug.c (debug_print_mb):
* sed/execute.c (line_init, line_reset, line_copy, line_append)
(line_exchange):
Remove now-unnecessary arg.  All callers changed.
* sed/compile.c (compile_program, normalize_text):
* sed/debug.c (debug_print_regex_pattern):
* sed/execute.c (str_append_modified, do_list, translate_mb)
(debug_print_line):
Use mcel_scan/c32rtomb1 not mbrtowc1/mbrlen1/wcrtomb,
as mcel_scan should work better on MS-Windows.
* sed/debug.c (debug_print_char): Replace args c and clen
with an mcel_t arg g.  All callers changed.
(debug_print_mb): Adjust to new meaning of int “characters”.
* sed/execute.c (struct line.mbstate): Remove.  All uses removed.
(str_append): Omit no-longer-needed code put in just to update a
no-longer-needed mbstate_t.
(str_append_modified): Don’t worry about c32rtomb1 returning
(size_t) -1, as it now returns idx_t and anyway that cannot happen.
* sed/mbcs.c: Don’t include string.h, localcharset.h.
(is_mb_char, is_utf8): Remove.  All uses removed.
* sed/sed.h: Include mcel.h.
(mbrtowc1, mbrlen1): Remove.  All callers changed to use mcel_scan.
(c32rtomb1): New function.
(IS_MB_CHAR): Remove; no longer used.
* sed/utils.c (add1_buffer): Now returns void, since no caller
used the return value.  2nd arg is now char, not int.
Remove special case for EOF.  All callers changed.
* testsuite/mb-bad-delim.sh, testsuite/mb-y-translate.sh:
Multibyte delimiters are no longer prohibited, so adjust test
cases accordingly.  Put newlines at end of text files,
as required by POSIX.
2026-08-17 01:17:23 -07:00
Paul Eggert fe0a844c0a sed: ISDIGIT → c_isdigit
ISDIGIT is locale-dependent, and in theory could misfire if
any locale has a single-byte digit that is not '0'..'9'.
Fix this by using c_isdigit, which should be a bit faster anyway.
* basicdefs.h (ISDIGIT): Remove.  All uses replaced by c_isdigit.
* bootstrap.conf (gnulib_modules): Add c-ctype.
* lib/.gitignore: Update.
* sed/compile.c: Include c-ctype.h.
2026-08-17 01:17:23 -07:00
Paul Eggert d43a870aa2 sed: simplify reading commands from file
This refactoring should help make future changes easier.
* bootstrap.conf (gnulib_modules): Add read-file.
* configure.ac (HAVE_FOPEN_RT): Remove; no longer used.
* lib/.gitignore: Adjust for read-file files.
* sed/compile.c: Include errno.h, read-file.h.
(struct prog_info.file): Remove.  All uses removed.
(inchar, savchar, compile_program): Just read from the string.
Assume ! (NULL < NULL) && (NULL - NULL) == 0,
as per Gnulib guidelines.  This should speed things up here.
(compile_file): Read the file into a string, and process the string.
2026-08-17 01:17:23 -07:00
Paul Eggert 0e9c603e82 sed: prefer mbrlen to mbrtowc+NULL
* bootstrap.conf (gnulib_modules): Add mbrlen.
* lib/.gitignore, m4/.gitignore: Adjust
* sed/mbcs.c (is_mb_char), sed/sed.h (mbrlen1):
Prefer mbrlen to mbrtowc with NULL, as it can be a bit faster.
2026-08-17 01:17:23 -07:00
Paul Eggert ff5921491a build: update gnulib submodule to latest
In addition to the usual ‘git submodule foreach git pull origin master’,
this also makes the following changes to adjust to current Gnulib:
* bootstrap: Sync from gnulib.
* lib/.gitignore, m4/.gitignore: Update to match current Gnulib.
* sed/utils.c: Include min-eloop-threshold.h, not eloop-threshold.h.
(follow_symlink): Use MIN_ELOOP_THRESHOLD, not __eloop_threshold ().
2026-08-11 08:55:15 -07:00
Paul Eggert 82c7f52c04 maint: update .gitignore files for current Gnulib
Also, sort entries, and remove duplicates (e.g., already
specified in parent .gitignore).
2026-05-25 10:02:46 -07:00
Jim Meyering dda43e9c75 gnulib: update to latest
* lib/.gitignore: Autoupdate to reflect additions.
* m4/.gitignore: Likewise.
2026-05-06 17:43:15 -07:00
Jim Meyering fe548a4297 build: update gnulib to latest
* gnulib: Update to latest.
* lib/.gitignore: Add stdcountof.in.h.
2026-04-19 20:55:40 -07:00
Jim Meyering 5eadb1976b maint: touch-ups to avoid triggering syntax-check
* doc/sed.texi (BRE syntax): Split a long line.
* lib/.gitignore: Add /stdcountof.h
2026-04-11 13:17:39 -07:00
Jim Meyering cd0302744f build: update gnulib to latest; and bootstrap 2026-03-08 11:54:10 -07:00
Jim Meyering 03ec9a1080 maint: update copyright dates 2026-01-02 17:33:20 -08:00
Jim Meyering f124c83561 build: update gnulib to latest 2025-10-01 03:17:14 -07:00
Jim Meyering 026c55f63c avoid new "make syntax-check" failures
* po/POTFILES.in: Add lib/getopt.c.
* lib/.gitignore: Add getopt-related names for recent change, and sort.
2025-03-09 09:18:44 -07:00
Collin Funk 587cfe1716 build: fix compile errors on platforms without getopt.h
* bootstrap.conf (gnulib_modules): Add getopt-gnu.
* lib/.gitignore: Update from gnulib-tool --import.
* m4/.gitignore: Likewise.
* NEWS: Mention the fix.
2025-03-03 09:06:51 -08:00
Jim Meyering d3456f4482 maint: update all copyright dates via "make update-copyright" 2025-01-03 09:56:57 -08:00
Jim Meyering 1b8470a7ea build: update gnulib to latest; update bootstrap 2024-11-17 17:42:42 -08:00
Jim Meyering e37e61cb55 build: update gnulib to latest and update bootstrap and .gitignore files 2024-07-04 14:30:46 -07:00
Jim Meyering 781bfba0bb build: update gnulib to latest; also update bootstrap and init.sh 2024-01-05 09:15:38 -08:00
Jim Meyering 2037812a6d maint: update copyright dates 2024-01-05 08:44:01 -08:00
Paul Eggert fd9898dc4b maint: omit unnecessary Gnulib modules
* 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.
2023-01-30 09:58:54 -08:00
Paul Eggert 8a13de6943 maint: update .gitignore files 2023-01-30 09:58:54 -08:00
Jim Meyering 4d231bb07d build: update gnulib to latest
* lib/.gitignore, m4/.gitignore: Also reflect regenerated .gitignore files.
2023-01-29 17:18:21 -08:00
Jim Meyering d81710cc8d maint: update copyright dates 2023-01-01 17:19:34 -08:00
Paul Eggert a9b1b679b6 sed: improve integer overflow checking
Fix some some longstanding but unlikely integer overflows.
Internally, 'sed' now more often prefers signed integer arithmetic,
which can be checked automatically via 'gcc -fsanitize=undefined'.
* basicdefs.h (countT): Remove.  All uses replaced
with a more-specific signed type, e.g., idx_t.
Similarly, change uses of types like size_t to
signed types like idx_t when appropriate.
(REALLOC): Remove; no longer used.  We now use xpalloc
because that detects integer overflow in size calculations.
Also, we no longer use XCALLOC since the code never relies
on the storage being zero, and leaving it uninitialized is
more likely to catch errors when debugging implementations
are used.  We use XNMALLOC instead, or xpalloc.
* bootstrap.conf (gnulib_modules): Add stdckdint, strtoimax.
* lib/.gitignore, m4/.gitignore: Update for new Gnulib modules.
* sed/compile.c: Include stdckdint.h.
(VECTOR_ALLOC_INCREMENT): Remove; no longer used.
(in_integer): Return maximal value if integer overflow.
All callers changed to expect this.
(next_cmd_entry): Use xpalloc instead of reallocating by hand,
which might suffer integer overflow.
(normalize_text): Don’t rely on system-defined conversion
of out-of-range size_t to int.
(next_cmd_entry): Arg is now pointer, not pointer-to-pointer.
All uses changed.
* sed/debug.c (debug_print_function): Don’t attempt to
fwrite a null pointer with a zero size.
* sed/execute.c: Include <stdckdint.h>, "minmax.h".
(resize_line): LEN arg is now increment, not total length,
to avoid overflow when calculating total length.
All uses changed.  Do not assume lb->alloc * 2 cannot overflow.
(resize_line, line_copy): Use xpalloc instead of doing realloc by
hand, which might suffer integer overflow.
(str_append_modified): Do not add n to to->length until
after it's known this cannot overflow.
(read_file_line): Don’t assume ssize_t fits in long.
(get_backup_file_name): Don’t assume string length fits in int.
Do not assume PTR-1+1 works; behavior is undefined if PTR
is at buffer start.  Check for integer overflow in buffer
size calculation.
(read_pattern_space): Check for line number overflow.
(match_address_p): Check for address overflow.
(debug_print_line): Omit unnecessary test for in->active being null.
(execute_program): Check for Q overflow.
* sed/regexp.c: Include <stdckdint.h>.
(match_regex): Don’t assume TYPE_MAXIMUM (regoff_t) == INT_MAX.
* sed/sed.c: Include inttypes.h, for strtoimax.
(main): Use strtoimax, not atoi.
* sed/utils.c (init_buffer): Use xmalloc and xpalloc
instead of guessing sizes ourselves, and unnecessarily
initializing.
(resize_buffer): Remove; all callers changed to use xpalloc.
(free_buffer): Don’t call free (NULL), since we already
test whether the pointer is null.
2022-12-19 12:35:32 -08:00
Paul Eggert b82f32d708 maint: update .gitignore 2022-12-17 20:57:23 -08:00
Jim Meyering 4f4a002ffd maint: tell git to ignore new generated files in lib/
* lib/.gitignore: Add /assert.h and /stdckdint.h
2022-10-16 22:16:10 -07:00
Paul Eggert cc351c8251 Update, simplify, and sort .gitignore files 2022-07-02 17:06:39 -05:00
Jim Meyering 0c8d88bc61 maint: make update-copyright 2022-01-01 15:00:18 -08:00
Jim Meyering 3f469c20da build: update gnulib to latest
* gnulib: update to latest
* .gitignore files: Reflect gnulib changes.
* bootstrap: update from gnulib
2021-07-10 14:46:53 -07:00
Assaf Gordon 71de42fd34 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* bootstrap.conf (gnulib_modules): Remove getopt module, depracated in
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0abc38bd2a1398f0
* po/POTFILES.in: Remove getopt.c
* sed/utils.h (panic): Rename _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD following gnulib's change:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=387d654cabd7bc15
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2021-01-05 17:02:10 -07:00
Jim Meyering 623f5cd2f9 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2020-01-01 11:38:46 -08:00
Assaf Gordon 07df2c2e61 maint: update copyright dates for 2019
* all files: Run "make update-copyright".
2019-01-01 14:46:27 -07:00
Assaf Gordon 159675c030 maint: update .gitignore
Following gnulib recent update.
* lib/.gitignore, m4/.gitignore: Update file list.
2018-12-05 21:07:57 -07:00
Jim Meyering c0375163a4 maint: ignore more artifacts
* .gitignore: Also ignore sed-*.tar.xz.sig files.
* lib/.gitignore: Ignore more gnulib-provided sources.
2018-03-22 16:12:26 -07:00
Assaf Gordon a2daab7fb1 maint: change http to https in license headers
* all files: Change http to https for all licenses URL.
2018-02-13 16:02:12 -07:00
Assaf Gordon 4d4c0d5ad0 maint: update gnulib and copyright dates for 2018
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2018-01-02 13:56:16 -07:00
Jim Meyering 1ceaa652a5 maint: update gnulib and copyright dates for 2017
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2017-01-01 03:17:39 -08:00
Jim Meyering 9ce9ee19f8 gnulib: update to latest and adapt to modified dfa API
* sed/regexp.c (compile_regex_1): Do away with use of DFA_CASE_FOLD.
This gnulib update pulls in a dfa module in which that symbol no
longer exists.  Instead, it uses RE_ICASE in syntax bits.
* m4/.gitignore: Add files created by running bootstrap.
* lib/.gitignore: Likewise.
2016-12-18 11:13:06 -08:00
Jim Meyering ba7cd21262 build: avoid "make distcheck" failure due to leftover .Po files
The following definitions caused trouble for no gain.  They caused
some .o file names to have a long additional prefix and even
resulted in some .Po files not being removed by "make distclean"
when building with recent automake.  The only reason to use these
definitions was -- long ago -- to require different compiler options
for files in lib/ than elsewhere.  That is no longer necessary.
* lib/local.mk (lib_libsed_a_CPPFLAGS): Remove definition.
(lib_libsed_a_CFLAGS, lib_libsed_a_LIBADD): Likewise.
(lib_libsed_a_DEPENDENCIES): Likewise.
2016-11-27 09:15:52 -08:00
Norihiro Tanaka 7c5b3bed65 sed: fix multi-line regex matching with -z
Sed incorrectly matches the anchor '^' to a newline character
(ASCII 10) despite using NUL line terminators (-z).
See https://bugs.gnu.org/24615 .

Previous (incorrect) behavior:

    $ printf "a\0b\0" | sed -z 'N;s/^/X/mg;' | od -An -a
       X   a nul   b nul

With this fix:

    $ printf "a\0b\0" | sed -z 'N;s/^/X/mg;' | od -An -a
       X   a nul   X   b nul

Current regex engine can not handle NUL multiline anchors.
Implement such search manually (by breaking the pattern into separate
NUL-terminated lines) and searching each one individually.

* NEWS: Mention it.
* sed/regexp.c (compile_regex_1): Don't use newline_anchor of regex, if
the buffer delimiter is not newline character.
(match_regex): Do above case line-by-line.
* testsuite/zero-anchor.good, testsuite/zero-anchor.inp,
  testsuite/zero-anchor.sed: New test.
* testsuite/local.mk: Add the test.
* testsuite/Makefile.tests: Add the test.
* bootstrap.conf: Add memrchr.
* lib/.gitignore, m4/.gitignore: Ignore memrchr files.
2016-11-04 21:03:46 -04:00
Jim Meyering b2d8e03acb gnulib: update to latest 2016-10-02 14:16:31 -07:00
Jim Meyering ba26be8954 dfa: reflect move of dfa code to new gnulib module
* bootstrap.conf (gnulib_modules): Add dfa.
* sed/dfa.c: Remove file.
* sed/dfa.h: Likewise.
* sed/local.mk (sed_sed_SOURCES): Remove dfa.c.
(NOINST_HEADERS): Remove dfa.h.
* sed/regexp.c (compile_regex_1): Use new dfasyntax API.
* sed/sed.c (localeinfo): New global.
(main): Call init_localeinfo to initialize it.
* sed/sed.h: Include localeinfo.h and declare the new global.
* lib/.gitignore: Ignore new gnulib-imported files.
* m4/.gitignore: Likewise.
* po/POTFILES.in: s,sed/dfa.c,lib/dfa.c,
2016-09-11 20:53:03 -07:00
Jim Meyering 55b3353648 maint: fix distclean-vs-excess-.Po files more cleanly
* doc/local.mk (distclean-local): Remove rule.  Moved to ...
* Makefile.am (distclean-local): ...here, and add a command to
remove all .deps directories.  It could have stayed in that .mk
file, but since with this change, it is no longer specific to doc/,
the top level makes more sense.
* lib/local.mk (MOSTLYCLEANFILES): Remove this.  Covered by the above.
Reported by Assaf Gordon in
https://lists.gnu.org/archive/html/sed-devel/2016-08/msg00019.html
2016-08-27 23:03:37 -07:00
Jim Meyering 5b44cd088a build: fix sed.1 dependency; work with latest automake
* doc/local.mk (doc/sed.1): Depend not on sed.c, but on the binary
that help2man must run.  Also depend on .version, to be sure we
pick up a version change.  Also, be careful not to write directly
to $@: instead write to $@-t, and make read-only to mark as generated,
and then, only if all is well, rename atomically to $@.
Also, prefix commands with $(AM_V_GEN) and $(AM_V_at) and ensure
that doc/ exists via $(MKDIR_P).
(distclean-local): New target. Use this instead of ...
(dist-hook-man-page): ... this. Remove rule.
(SEDBIN): Remove unnecessary $(top_builddir)/ prefix.
(doc/sed.texi, doc/s-texi): Remove some uses of $(top_builddir).
Replace others with $(srcdir).
* Makefile (dist-hook): remove dependency on dist-hook-man-page.
* lib/local.mk (MOSTLYCLEANFILES): Arrange for lib/.deps/*.Po
to be removed as part of "make distclean", so that make distcheck
no longer fails when using latest automake.
2016-08-14 22:36:15 -07:00
Assaf Gordon bc182c966e maint: update .gitignore after bootstrap
Added by running ./bootstrap on a clean sed repository.

* build-aux/.gitignore: Add config.rpath.
* lib/.gitignore: Add additional gnulib C files.
* m4/.gitignore: Add additional gnulib m4 files.
* po/.gitignore: Add additional PO-related files.
2016-07-26 22:13:37 -04:00
Assaf Gordon 3b29bece3e build: switch to non-recursive makefile
* .gitignore: Ignore '.dirstamp' files
* bootstrap.conf: Add 'non-recursive-gnulib-prefix-hack' gnulib module.
  Add missing 'stdalign' module.
  (bootstrap_post_import_hook): Use module to adjust gnulib.mk file.
* configure.ac: Add 'subdir-objects' automake option, don't generate
  makefiles in subdirectories. Adjust path of XFAIL tests.
* Makefile.am: Include 'local.mk' files, adjust for non-recursive make.
* doc/Makefile.am: Rename to ...
* doc/local.mk: Adjust paths. Rename SED to
  SEDBIN variable, to avoid overriding the default system-wide SED value
  which is automatically set by autotools.
* lib/Makefile.am: Rename to ...
* lib/local.mk: Adjust paths.
* lib/.gitignore: Ignore 'stdalign.h' from gnulib module.
* sed/Makefile.am: Rename to ...
* sed/local.mk: Adjust paths.
* testsuite/Makefile.am: Rename to ...
* testsuite/local.mk: Adjust paths.
* testsuite/init.cfg: Move to ...
* init.cfg: ... here. Moved to avoid changing the path in init.sh, and to
  keep the same directory structure as coreutils.
  (require_en_utf8_locale_): Adjust path for get-mb-cur-max executable.
  (require_ja_shiftjis_locale_,require_valid_ja_shiftjis_locale_): Adjust
  path for test-mbrtowc executable.
* m4/.gitignore: Add gnulib's non-recusive-make module.
* testsuite/runtest: Adjust paths of Makefile.tests and dir variables,
  Skip utility program 'get-mb-cur-max' which is not a standalone test.
* testsuite/Makefile.tests: Adjust path of sed exeutable.
* testsuite/eval.sed, testsuite/eval.good: Adjust path of sed executable.
* testsuite/cmd-R.sh,
  testsuite/cmd-l.sh,
  testsuite/colon-with-no-label.sh,
  testsuite/comment-n.sh,
  testsuite/compile-errors.sh,
  testsuite/compile-tests.sh,
  testsuite/convert-number.sh,
  testsuite/execute-tests.sh,
  testsuite/follow-symlinks-stdin.sh,
  testsuite/follow-symlinks.sh,
  testsuite/help-version.sh,
  testsuite/in-place-hyphen.sh,
  testsuite/in-place-suffix-backup.sh,
  testsuite/invalid-mb-seq-UMR.sh,
  testsuite/mb-bad-delim.sh,
  testsuite/mb-charclass-non-utf8.sh,
  testsuite/mb-match-slash.sh,
  testsuite/mb-y-translate.sh,
  testsuite/normalize-text.sh,
  testsuite/nulldata.sh,
  testsuite/panic-tests.sh,
  testsuite/posix-char-class.sh,
  testsuite/posix-mode-N.sh,
  testsuite/posix-mode-addr.sh,
  testsuite/posix-mode-bad-ref.sh,
  testsuite/posix-mode-s.sh,
  testsuite/range-overlap.sh,
  testsuite/recursive-escape-c.sh,
  testsuite/regex-errors.sh,
  testsuite/stdin-prog.sh,
  testsuite/subst-mb-incomplete.sh,
  testsuite/subst-options.sh,
  testsuite/subst-replacement.sh,
  testsuite/temp-file-cleanup.sh,
  testsuite/unbuffered.sh: Adjust paths of init.sh, sed executable.
2016-07-24 22:22:53 -04:00
Assaf Gordon 77a7c6a731 tests: skip tests upon buggy mbrtowc implementations
Sed tests purposefully use invalid non-utf8 multibyte sequences to
test sed's handling of invalid input/program.
Some implementations wrongly accept invalid sequences, causing false
alarms. Add a test program to detect such buggy implementations and skip
the tests if needed.
See discussion in:
http://lists.gnu.org/archive/html/sed-devel/2016-07/msg00005.html
http://lists.gnu.org/archive/html/sed-devel/2016-07/msg00000.html
http://lists.gnu.org/archive/html/sed-devel/2016-06/msg00031.html
http://lists.gnu.org/archive/html/sed-devel/2016-06/msg00014.html

* bootstrap.conf: Add gnulib's closeout module.
* m4/.gitignore, lib/.gitignore, po/POTFILES.in: Adjust after adding
closeout module.
* testsuite/Makefile.am (check_PROGRAMS): Add new program.
* testsuite/test-mbrtowc.c: New program.
* testsuite/init.cfg (require_valid_ja_eucjp_locale_)
(require_valid_ja_shiftjis_locale_): New functions. Call test-mbrtowc
with known invalid multibyte sequences to ensure implementation is not
buggy and rejects them; Skip test otherwise.
* testsuite/invalid-mb-seq-UMR.sh: Use require_valid_ja_eucjp_locale_.
* testsuite/mb-charclass-non-utf8.sh: Use require_valid_ja_shiftjis_locale_.
2016-07-06 20:29:07 -04:00
Jim Meyering 57f405ad56 maint: update copyright year, bootstrap, init.sh
Run "make update-copyright" and then...

* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
2016-01-01 15:02:20 -08:00
Jim Meyering 082b25cc3e maint: update copyright year ranges to include 2015; update gnulib 2015-01-01 19:18:17 -08:00