]> Savannah Git Hosting - gnulib.git/log
gnulib.git
21 months agombstoc32s: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:37 +0000 (07:30 +0200)]
mbstoc32s: Optimize clearing an mbstate_t.

* lib/mbstoc32s.c (mbstoc32s): Use mbszero.
* lib/uchar.in.h (mbstoc32s): Likewise.
* modules/mbstoc32s (Depends-on): Add mbszero.

21 months agombstowcs: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:35 +0000 (07:30 +0200)]
mbstowcs: Optimize clearing an mbstate_t.

* lib/mbstowcs.c (mbstowcs): Use mbszero.
* modules/mbstowcs (Depends-on): Add mbszero.

21 months agoc32tob: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:33 +0000 (07:30 +0200)]
c32tob: Optimize clearing an mbstate_t.

* lib/c32tob.c (c32tob): Use mbszero.
* modules/c32tob (Depends-on): Add mbszero.

21 months agowctomb: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:30 +0000 (07:30 +0200)]
wctomb: Optimize clearing an mbstate_t.

* lib/wctomb-impl.h (wctomb): Use mbszero.
* modules/wctomb (Depends-on): Add mbszero.

21 months agobtoc32: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:27 +0000 (07:30 +0200)]
btoc32: Optimize clearing an mbstate_t.

* lib/btoc32.c: Include <wchar.h>.
(btoc32): Use mbszero.
* modules/btoc32 (Depends-on): Add mbszero.

21 months agobtowc: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:25 +0000 (07:30 +0200)]
btowc: Optimize clearing an mbstate_t.

* lib/btowc.c (btowc): Use mbszero.
* modules/btowc (Depends-on): Add mbszero.

21 months agombrtoc32: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:22 +0000 (07:30 +0200)]
mbrtoc32: Optimize clearing an mbstate_t.

* lib/mbrtoc32.c (mbrtoc32): Use mbszero.
* modules/mbrtoc32 (Depends-on): Add mbsinit, mbszero.

21 months agombtowc: Optimize clearing an mbstate_t.
Bruno Haible [Sun, 16 Jul 2023 05:30:20 +0000 (07:30 +0200)]
mbtowc: Optimize clearing an mbstate_t.

* lib/mbtowc-impl.h (mbtowc): Use mbszero.
* modules/mbtowc (Depends-on): Add mbszero.

21 months agombszero: New module.
Bruno Haible [Sun, 16 Jul 2023 05:30:15 +0000 (07:30 +0200)]
mbszero: New module.

* lib/wchar.in.h: Include <string.h>.
(_GL_MBSTATE_INIT_SIZE, _GL_MBSTATE_ZERO_SIZE): New macros.
(mbszero): New declaration.
* lib/mbrtoc16.c: Update comments.
* lib/mbszero.c: New file.
* m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_MBSZERO.
* modules/wchar (Depends-on): Add extern-inline.
(Makefile.am): Substitute GNULIB_MBSZERO.
* modules/mbszero: New file.

21 months agombsinit: Fix module description.
Bruno Haible [Sat, 15 Jul 2023 20:47:26 +0000 (22:47 +0200)]
mbsinit: Fix module description.

* modules/mbsinit (Files): Add m4/mbrtowc.m4.

21 months agoc32_apply_type_test: Fix compilation error with GCC < 9.
Bruno Haible [Sat, 15 Jul 2023 07:47:06 +0000 (09:47 +0200)]
c32_apply_type_test: Fix compilation error with GCC < 9.

* lib/uchar.in.h (c32_apply_type_test) [_GL_WCHAR_T_IS_UCS4]: Remove
_GL_ARG_NONNULL attribute.

21 months agombchar: Optimize is_basic.
Bruno Haible [Thu, 13 Jul 2023 21:23:41 +0000 (23:23 +0200)]
mbchar: Optimize is_basic.

* lib/mbchar.h (is_basic_table): Remove declaration.
(is_basic) [IS_BASIC_ASCII]: Define through a simple range test.
* lib/mbchar.c (is_basic_table): Remove array.

21 months agolocalcharset: Clean up locale encodings used by glibc.
Bruno Haible [Thu, 13 Jul 2023 20:59:48 +0000 (22:59 +0200)]
localcharset: Clean up locale encodings used by glibc.

* lib/localcharset.h: Remove VISCII from the list, since never supported
in glibc/localedata/SUPPORTED. JOHAB is not supported by glibc any more
since 2000-09-25. TCVN5712-1 is not supported by glibc any more since
2012-05-21.

21 months agodoc: Mention c32_get_mapping, c32_apply_mapping.
Bruno Haible [Thu, 13 Jul 2023 11:42:08 +0000 (13:42 +0200)]
doc: Mention c32_get_mapping, c32_apply_mapping.

* doc/posix-functions/wctrans.texi: Mention c32_get_mapping.
* doc/posix-functions/towctrans.texi: Mention c32_apply_mapping.
* doc/strings.texi (Comparison of character APIs): Mention both.

21 months agoc32_apply_mapping: Add tests.
Bruno Haible [Thu, 13 Jul 2023 11:37:01 +0000 (13:37 +0200)]
c32_apply_mapping: Add tests.

* tests/test-c32_apply_mapping.c: New file.
* modules/c32_apply_mapping-tests: New file.

21 months agoc32_apply_mapping: New module.
Bruno Haible [Thu, 13 Jul 2023 09:30:54 +0000 (11:30 +0200)]
c32_apply_mapping: New module.

* lib/uchar.in.h (c32_apply_mapping): New declaration.
* lib/c32_apply_mapping.c: New file.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_APPLY_MAPPING.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_MAPPING.
* modules/c32_apply_mapping: New file.

21 months agoc32_get_mapping: Add tests.
Bruno Haible [Thu, 13 Jul 2023 09:19:04 +0000 (11:19 +0200)]
c32_get_mapping: Add tests.

* tests/test-c32_get_mapping.c: New file.
* modules/c32_get_mapping-tests: New file.

21 months agoc32_get_mapping: New module.
Bruno Haible [Thu, 13 Jul 2023 09:15:04 +0000 (11:15 +0200)]
c32_get_mapping: New module.

* lib/uchar.in.h (c32_mapping_t): New type.
(c32_get_mapping): New declaration.
* lib/c32_get_mapping.c: New file, based on lib/wctrans-impl.h.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_GET_MAPPING.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_MAPPING.
* modules/c32_get_mapping: New file.

21 months agotowctrans: Relax license.
Bruno Haible [Thu, 13 Jul 2023 09:01:22 +0000 (11:01 +0200)]
towctrans: Relax license.

* modules/towctrans (License): Change to LGPLv2+.
* lib/towctrans.c: Update license notice.
* lib/towctrans-impl.h: Likewise.

21 months agowctrans: Relax license.
Bruno Haible [Thu, 13 Jul 2023 08:58:56 +0000 (10:58 +0200)]
wctrans: Relax license.

* modules/wctrans (License): Change to LGPLv2+.
* lib/wctrans.c: Update license notice.
* lib/wctrans-impl.h: Likewise.

21 months agodoc: Mention c32_get_type_test, c32_apply_type_test.
Bruno Haible [Wed, 12 Jul 2023 22:58:13 +0000 (00:58 +0200)]
doc: Mention c32_get_type_test, c32_apply_type_test.

* doc/posix-functions/wctype.texi: Mention c32_get_type_test.
* doc/posix-functions/iswctype.texi: Mention c32_apply_type_test.
* doc/strings.texi (Comparison of character APIs): Mention both.

21 months agoc32_apply_type_test: Add tests.
Bruno Haible [Wed, 12 Jul 2023 22:52:19 +0000 (00:52 +0200)]
c32_apply_type_test: Add tests.

* tests/test-c32_apply_type_test.c: New file.
* modules/c32_apply_type_test-tests: New file.

21 months agoc32_apply_type_test: New module.
Bruno Haible [Wed, 12 Jul 2023 22:50:29 +0000 (00:50 +0200)]
c32_apply_type_test: New module.

* lib/uchar.in.h (c32_apply_type_test): New declaration.
* lib/c32_apply_type_test.c: New file.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_APPLY_TYPE_TEST.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_TYPE_TEST.
* modules/c32_apply_type_test: New file.

21 months agoc32_get_type_test: Add tests.
Bruno Haible [Wed, 12 Jul 2023 22:11:20 +0000 (00:11 +0200)]
c32_get_type_test: Add tests.

* tests/test-c32_get_type_test.c: New file.
* modules/c32_get_type_test-tests: New file.

21 months agoc32_get_type_test: New module.
Bruno Haible [Wed, 12 Jul 2023 20:44:52 +0000 (22:44 +0200)]
c32_get_type_test: New module.

* lib/uchar.in.h (c32_type_test_t): New type.
(c32_get_type_test): New declaration.
* lib/c32_get_type_test.c: New file, based on lib/wctype-impl.h.
* m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
GNULIB_C32_GET_TYPE_TEST.
* modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_TYPE_TEST.
* modules/c32_get_type_test: New file.

21 months agoiswctype: Relax license.
Bruno Haible [Wed, 12 Jul 2023 20:25:52 +0000 (22:25 +0200)]
iswctype: Relax license.

* modules/iswctype (License): Change to LGPLv2+.
* lib/iswctype.c: Update license notice.
* lib/iswctype-impl.h: Likewise.

21 months agowctype: Relax license.
Bruno Haible [Wed, 12 Jul 2023 20:25:14 +0000 (22:25 +0200)]
wctype: Relax license.

* modules/wctype (License): Change to LGPLv2+.
* lib/wctype.c: Update license notice.
* lib/wctype-impl.h: Likewise.

21 months agombiter, mbuiter: Small optimization.
Bruno Haible [Wed, 12 Jul 2023 15:33:14 +0000 (17:33 +0200)]
mbiter, mbuiter: Small optimization.

* lib/mbiter.h: Optimize away the in_shift field when the module
'mbrtoc32-regular' is in use.
* lib/mbuiter.h: Likewise.

21 months agogendocs: support chapter- and section-level split
Gavin Smith [Wed, 12 Jul 2023 14:00:40 +0000 (16:00 +0200)]
gendocs: support chapter- and section-level split

* doc/gendocs_template: Add lines to mark parts of file to output
only when splitting HTML by node.
Remove obsolete comment about ranges of years in copyright notice
(as per Karl).
* build-aux/gendocs.sh
[!texi2html]: Strip out parts of the template depending on --split.
[texi2html] Include all of the template as before.

21 months agombsrtoc32s, mbsnrtoc32s: Small optimization.
Bruno Haible [Tue, 11 Jul 2023 22:58:51 +0000 (00:58 +0200)]
mbsrtoc32s, mbsnrtoc32s: Small optimization.

* lib/mbsrtoc32s.c (USES_C32): Set to 0 when the module
'mbrtoc32-regular' is in use.
* lib/mbsnrtoc32s.c (USES_C32): Likewise.

21 months agombswidth: Add a benchmark.
Bruno Haible [Tue, 11 Jul 2023 19:55:47 +0000 (21:55 +0200)]
mbswidth: Add a benchmark.

* tests/bench-mbswidth.c: New file, based on tests/bench-mbiter.c.
* modules/mbswidth-bench-tests: New file.

21 months agombuiter: Add a benchmark.
Bruno Haible [Tue, 11 Jul 2023 19:54:54 +0000 (21:54 +0200)]
mbuiter: Add a benchmark.

* tests/bench-mbuiter.c: New file, based on tests/bench-mbiter.c.
* modules/mbuiter-bench-tests: New file.

21 months agombiter: Add a benchmark.
Bruno Haible [Tue, 11 Jul 2023 19:54:01 +0000 (21:54 +0200)]
mbiter: Add a benchmark.

* tests/bench-mbiter.c: New file.
* tests/bench-multibyte.h: New file.
* modules/mbiter-bench-tests: New file.

21 months agotests: Create new file bench.h.
Bruno Haible [Tue, 11 Jul 2023 19:43:27 +0000 (21:43 +0200)]
tests: Create new file bench.h.

* tests/bench.h: New file, extracted from tests/bench-digest.h.
* tests/bench-digest.h: Include it.
* modules/crypto/md5-buffer-tests (Files): Add tests/bench.h.
* modules/crypto/sha1-buffer-tests (Files): Likewise.
* modules/crypto/sha256-buffer-tests (Files): Likewise.
* modules/crypto/sha512-buffer-tests (Files): Likewise.

21 months agoOptimize away some mbsinit calls.
Bruno Haible [Tue, 11 Jul 2023 19:30:44 +0000 (21:30 +0200)]
Optimize away some mbsinit calls.

* lib/mbiter.h (mbiter_multi_next): When the module 'mbrtoc32-regular'
is in use, don't invoke mbsinit and don't compare the mbrtoc32 result
against (size_t)(-3).
* lib/mbuiter.h (mbuiter_multi_next): Likewise.
* lib/mbfile.h (mbfile_multi_getc): Likewise.
* lib/mbswidth.c (mbsnwidth): Likewise.
* lib/mbmemcasecoll.c (apply_c32tolower): Likewise.
* lib/quotearg.c (quotearg_buffer_restyled): Likewise.

21 months agoFix build errors on Linux/hppa.
Bruno Haible [Tue, 11 Jul 2023 08:08:18 +0000 (10:08 +0200)]
Fix build errors on Linux/hppa.

* modules/math (Makefile.am): Split long pipe command into several
smaller commands.
* modules/pthread-h (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/unictype/base (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.

21 months agoquotearg: update Solaris-related comments
Paul Eggert [Tue, 11 Jul 2023 17:46:04 +0000 (10:46 -0700)]
quotearg: update Solaris-related comments

* doc/solaris-versions: Modernize.
* lib/quotearg.c: Update comments.

21 months agoMore than one initial mbstate_t
Paul Eggert [Tue, 11 Jul 2023 14:54:01 +0000 (07:54 -0700)]
More than one initial mbstate_t

In commentary, say "an initial state" rather than
"the initial state" for mbstate_t, as it is possible
and indeed common for there to be more than one
initial state.  POSIX routinely says "an initial state".

21 months agodfa: Overcome wchar_t limitations.
Bruno Haible [Mon, 10 Jul 2023 22:52:23 +0000 (00:52 +0200)]
dfa: Overcome wchar_t limitations.

* lib/localeinfo.h: Include <uchar.h>. Add special definitions for GAWK.
(case_folded_counterparts): Change array element type to char32_t.
* lib/localeinfo.c: Include <uchar.h>. Add special definitions for GAWK.
(is_using_utf8, init_localeinfo): Use mbrtoc32 instead of mbrtowc.
(lonesome_lower): Change element type to 'unsigned short'.
(case_folded_counterparts): Change array element type to char32_t. Use
c32toupper instead of towupper. Use c32tolower instead of towlower.
* lib/dfa.c: Include <uchar.h>. Add special definitions for GAWK.
(struct mb_char_classes): Change element type of 'chars' to char32_t.
(mbs_to_wchar): Use mbrtoc32 instead of mbrtowc.
(setbit_wc): Change type of first argument to char32_t. Use c32tob
instead of wctob.
(parse_bracket_exp): Update.
(lex): Use c32isprint instead of iswprint. Use c32isspace instead of
iswspace. Use c32rtomb instead of a %lc directive.
(addtok_wc): Use c32rtomb instead of wcrtomb.
(atom): Update.
* modules/dfa (Depends-on): Remove wctype-h. Add uchar,
mbrtoc32-regular, c32rtomb, c32tob, c32tolower, c32toupper, c32isprint,
c32isspace.
(Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/dfa-tests (Makefile.am): Link test-dfa-match-aux with
$(LIBUNISTRING) $(LIBC32CONV).
* NEWS: Mention the change.

21 months agombrtoc32-regular: Add tests.
Bruno Haible [Mon, 10 Jul 2023 22:06:14 +0000 (00:06 +0200)]
mbrtoc32-regular: Add tests.

* tests/test-mbrtoc32-regular.c: New file.
* modules/mbrtoc32-regular-tests: New file.

21 months agombrtoc32-regular: New module.
Bruno Haible [Mon, 10 Jul 2023 22:03:34 +0000 (00:03 +0200)]
mbrtoc32-regular: New module.

* modules/mbrtoc32-regular: New file.
* lib/mbrtoc32.c (mbrtoc32): If the module 'mbrtoc32-regular' is present
and the system's mbrtoc32 returned a char32_t, clear the mbstate_t.
* doc/posix-functions/mbrtoc32.texi: Mention the new module.

21 months agoRevert "dfa: Overcome wchar_t limitations."
Bruno Haible [Mon, 10 Jul 2023 21:17:12 +0000 (23:17 +0200)]
Revert "dfa: Overcome wchar_t limitations."

21 months agoApply the last change to all locale-*.m4 files.
Bruno Haible [Mon, 10 Jul 2023 21:11:25 +0000 (23:11 +0200)]
Apply the last change to all locale-*.m4 files.

* m4/locale-ar.m4 (gt_LOCALE_AR): Reject locale name that might cause
trouble with sh or make.
* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.

21 months agodfa: Overcome wchar_t limitations.
Bruno Haible [Fri, 7 Jul 2023 10:04:14 +0000 (12:04 +0200)]
dfa: Overcome wchar_t limitations.

* lib/localeinfo.h: Include <uchar.h>. Add special definitions for GAWK.
(case_folded_counterparts): Change array element type to char32_t.
* lib/localeinfo.c: Include <uchar.h>. Add special definitions for GAWK.
(is_using_utf8, init_localeinfo): Use mbrtoc32 instead of mbrtowc.
(lonesome_lower): Change element type to 'unsigned short'.
(case_folded_counterparts): Change array element type to char32_t. Use
c32toupper instead of towupper. Use c32tolower instead of towlower.
* lib/dfa.c: Include <uchar.h>. Add special definitions for GAWK.
(struct mb_char_classes): Change element type of 'chars' to char32_t.
(mbs_to_wchar): Use mbrtoc32 instead of mbrtowc.
(setbit_wc): Change type of first argument to char32_t. Use c32tob
instead of wctob.
(parse_bracket_exp): Update.
(lex): Use c32isprint instead of iswprint. Use c32isspace instead of
iswspace. Use c32rtomb instead of a %lc directive.
(addtok_wc): Use c32rtomb instead of wcrtomb.
(atom): Update.
* modules/dfa (Depends-on): Remove wctype-h. Add uchar, mbrtoc32,
c32rtomb, c32tob, c32tolower, c32toupper, c32isprint, c32isspace.
(Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/dfa-tests (Makefile.am): Link test-dfa-match-aux with
$(LIBUNISTRING) $(LIBC32CONV).
* NEWS: Mention the change.

21 months agoc32width: protect against bad configure args
Paul Eggert [Sun, 9 Jul 2023 18:23:58 +0000 (11:23 -0700)]
c32width: protect against bad configure args

Avoid ‘test’ misuse with ‘./configure gt_cv_locale_fr=""’.
Possible problem of this sort reported by Angelo Graziosi in:
https://lists.gnu.org/r/emacs-devel/2023-07/msg00329.html
* m4/locale-fr.m4 (gt_LOCALE_FR_UTF8, gt_LOCALE_FR_UTF8):
* m4/locale-ja.m4 (gt_LOCALE_JA):
* m4/locale-zh.m4 (gt_LOCALE_ZH_CN):
Reject locale names that might cause trouble with sh or make.

22 months agowcscmp: Work around a glibc bug.
Bruno Haible [Thu, 6 Jul 2023 22:53:00 +0000 (00:53 +0200)]
wcscmp: Work around a glibc bug.

Reported by مصعب الزعبي (Mosab Al-Zoubi) <moceap@hotmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00029.html>.

* m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test against a glibc/arm* bug.
* doc/posix-functions/wcscmp.texi: Mention the glibc/arm* bug.

22 months agombiter, mbfile, mbmemcasecoll: Improve handling of mbrtoc32 result.
Bruno Haible [Tue, 4 Jul 2023 19:04:00 +0000 (21:04 +0200)]
mbiter, mbfile, mbmemcasecoll: Improve handling of mbrtoc32 result.

* lib/mbiter.h (mbi_avail): If cur.ptr has reached the limit but
in_shift is true, call mbiter_multi_next.
(mbiter_multi_next): Set in_shift to false after an incomplete multibyte
character.
* lib/mbfile.h (mbfile_multi_getc): Pass the input bytes incrementally
into mbrtoc32. When mbf->state is not in the initial state, call
mbrtoc32 again.
* lib/mbmemcasecoll.c (apply_c32tolower): When the state is not in the
initial state, call mbrtoc32 again.

22 months agombiter, mbuiter, mbfile: Improve state handling after invalid input.
Bruno Haible [Tue, 4 Jul 2023 19:03:01 +0000 (21:03 +0200)]
mbiter, mbuiter, mbfile: Improve state handling after invalid input.

* lib/mbiter.h (mbiter_multi_next): After an invalid multibyte sequence
was encountered, clear the state.
* lib/mbuiter.h (mbuiter_multi_next): Likewise.
* lib/mbfile.h (mbfile_multi_getc): Likewise.

22 months agoautoupdate
Karl Berry [Tue, 4 Jul 2023 14:19:04 +0000 (07:19 -0700)]
autoupdate

22 months agombchar: Optimize all chars from the POSIX "portable character set".
Bruno Haible [Tue, 4 Jul 2023 13:31:09 +0000 (15:31 +0200)]
mbchar: Optimize all chars from the POSIX "portable character set".

* lib/mbchar.h (is_basic): Include all the characters from the POSIX
"portable character set".
* lib/mbchar.c (is_basic_table): Likewise.
* lib/mbiter.h (mbiter_multi_next): Update comment.
* lib/mbuiter.h (mbuiter_multi_next): Likewise.
* lib/mbfile.h (mbfile_multi_getc): Likewise.

22 months agombchar: treat @, $, ` as basic
Paul Eggert [Mon, 3 Jul 2023 17:54:36 +0000 (10:54 -0700)]
mbchar: treat @, $, ` as basic

The C standard says that @, $, ` must have a single-byte
representation so they count as basic as far as multibyte
character processing goes.
* lib/mbchar.c (is_basic_table):
* lib/mbchar.h (is_basic):
* lib/mbswidth.c (mbsnwidth):
Treat @, $, ` as basic too.

22 months agombrtoc32: Document another glibc bug.
Bruno Haible [Mon, 3 Jul 2023 21:41:32 +0000 (23:41 +0200)]
mbrtoc32: Document another glibc bug.

* doc/posix-functions/mbrtoc32.texi: Reference the glibc bug in
BIG5-HKSCS locales.

22 months agombrtoc32: document (size_t) -3 issue
Paul Eggert [Mon, 3 Jul 2023 17:24:05 +0000 (10:24 -0700)]
mbrtoc32: document (size_t) -3 issue

* doc/posix-functions/mbrtoc32.texi (mbrtoc32):
Say (size_t) -3 might not be worth bothering about.

22 months agoautoupdate
Karl Berry [Mon, 3 Jul 2023 14:20:20 +0000 (07:20 -0700)]
autoupdate

22 months agombsrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
Bruno Haible [Sun, 2 Jul 2023 14:46:11 +0000 (16:46 +0200)]
mbsrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.

* lib/mbsrtoc32s.c (USES_C32): New macro.
* lib/mbsrtowcs.c (USES_C32): New macro.
* lib/mbsrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
(size_t)(-3), don't increment the pointer.

22 months agombsnrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
Bruno Haible [Sun, 2 Jul 2023 14:45:44 +0000 (16:45 +0200)]
mbsnrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.

* lib/mbsnrtoc32s.c (USES_C32): New macro.
* lib/mbsnrtowcs.c (USES_C32): New macro.
* lib/mbsnrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
(size_t)(-3), don't increment the pointer.

22 months agombmemcasecoll: Overcome wchar_t limitations.
Bruno Haible [Sun, 2 Jul 2023 13:44:19 +0000 (15:44 +0200)]
mbmemcasecoll: Overcome wchar_t limitations.

* lib/mbmemcasecoll.c: Include <uchar.h> instead of <wctype.h>.
(apply_c32tolower): Renamed from apply_towlower. Use mbrtoc32 instead of
mbrtowc. Use c32tolower instead of towlower. Use c32rtomb instead of
wcrtomb.
* modules/mbmemcasecoll (Depends-on): Remove mbrtowc, wcrtomb. Add
uchar, mbrtoc32, c32rtomb, c32tolower.
(Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbmemcasecoll-tests (Makefile.am): Link test-mbmemcasecoll
with $(LIBUNISTRING) $(LIBC32CONV).

22 months agombswidth: Overcome wchar_t limitations.
Bruno Haible [Sun, 2 Jul 2023 11:27:57 +0000 (13:27 +0200)]
mbswidth: Overcome wchar_t limitations.

* lib/mbswidth.c: Include <uchar.h> instead of <wctype.h>.
(mbsnwidth): Use mbrtoc32 instead of mbrtowc. Use c32width instead of
wcwidth. Use c32iscntrl instead of iswcntrl.
* modules/mbswidth (Depends-on): Remove wctype-h, mbrtowc, wcwidth. Add
uchar, mbrtoc32, c32width, c32iscntrl.
(Link): Add $(LIBC32CONV).

22 months agomake regen
Paul Eggert [Sat, 1 Jul 2023 18:18:12 +0000 (11:18 -0700)]
make regen

22 months agoAlso fix top/bootstrap long lines
Paul Eggert [Sat, 1 Jul 2023 18:17:55 +0000 (11:17 -0700)]
Also fix top/bootstrap long lines

22 months agomake regen
Paul Eggert [Sat, 1 Jul 2023 18:06:30 +0000 (11:06 -0700)]
make regen

22 months agoFix long bootstrap lines
Paul Eggert [Sat, 1 Jul 2023 18:00:16 +0000 (11:00 -0700)]
Fix long bootstrap lines

* top/bootstrap-funclib.sh: Reformat to fit into 80 columns,
for coreutils ‘make syntax-check’.

22 months agodoc: Update regarding stable branches.
Bruno Haible [Sat, 1 Jul 2023 10:12:39 +0000 (12:12 +0200)]
doc: Update regarding stable branches.

* doc/gnulib-readme.texi (Stable Branches): Mention new branch
stable-202307. Mention that stable-202207 is no longer updated.

22 months agomaint.mk: Modernize stddef.h checks for C23
Paul Eggert [Sat, 1 Jul 2023 08:38:07 +0000 (01:38 -0700)]
maint.mk: Modernize stddef.h checks for C23

* top/maint.mk (_stddef_syms_re): Modernize for C23.

22 months agoquotearg: Overcome wchar_t limitations.
Bruno Haible [Fri, 30 Jun 2023 20:54:12 +0000 (22:54 +0200)]
quotearg: Overcome wchar_t limitations.

* lib/quotearg.c: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
(quotearg_buffer_restyled): Use mbrtoc32, c32isprint instead of mbrtowc,
iswprint.
* modules/quotearg (Files): Remove m4/mbstate_t.m4, m4/mbrtowc.m4
(redundant).
(Depends-on): Add uchar, mbrtoc32, c32isprint. Remove wchar, wctype-h,
mbrtowc.
(Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/quotearg-tests (Makefile.am): Link test-quotearg with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/quotearg-simple (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/quotearg-simple-tests (Makefile.am): Link test-quotearg-simple
with $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/acl (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/acl-tests (Makefile.am): Link test-set-mode-acl and
test-copy-acl with $(LIBUNISTRING) $(LIBC32CONV).
* modules/copy-file (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/copy-file-tests (Makefile.am): Link test-copy-file with
$(LIBUNISTRING) $(LIBC32CONV).
--
* modules/argmatch (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/argmatch-tests (Makefile.am): Link test-argmatch with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/backup-rename (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/backupfile (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/human (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/sh-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/sh-quote-tests (Makefile.am): Link test-sh-quote with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/system-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/system-quote-tests (Makefile.am): Link test-system-quote-main
with $(LIBUNISTRING) $(LIBC32CONV).
* modules/csharpcomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/csharpexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/javacomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/javaexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/string-desc-quotearg (Link): New section.
* modules/string-desc-quotearg-tests (Makefile.am): Link
test-string-desc-quotearg with $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/xmemcoll (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/closeout (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/readtokens-tests (Makefile.am): Link test-readtokens with
$(LIBUNISTRING) $(LIBC32CONV).
--
* modules/closein (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/closein-tests (Makefile.am): Link test-closein with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/yesno-tests (Makefile.am): Link test-yesno with
$(LIBUNISTRING) $(LIBC32CONV).

22 months agoAccommodate a difference between mbrtowc and mbrtoc32.
Bruno Haible [Fri, 30 Jun 2023 20:48:12 +0000 (22:48 +0200)]
Accommodate a difference between mbrtowc and mbrtoc32.

* lib/mbiter.h (mbiter_multi_next): Handle the mbrtoc32 return value
(size_t)(-3).
* lib/mbuiter.h (mbuiter_multi_next): Likewise.
* lib/mbfile.h (mbfile_multi_getc): Likewise.

22 months agodoc: Reference some reported bugs (in comments).
Bruno Haible [Fri, 30 Jun 2023 14:24:00 +0000 (16:24 +0200)]
doc: Reference some reported bugs (in comments).

* doc/posix-functions/mbrlen.texi: Add references to bug reports.
* doc/posix-functions/mbrtoc16.texi: Likewise.
* doc/posix-functions/mbrtoc32.texi: Likewise.
* doc/posix-functions/mbrtowc.texi: Likewise.
* doc/posix-functions/mbsnrtowcs.texi: Likewise.
* doc/posix-functions/mbsrtowcs.texi: Likewise.
* doc/posix-functions/mbstowcs.texi: Likewise.

22 months agoassert-tests: pacify gcc -Wunused-function
Paul Eggert [Fri, 30 Jun 2023 06:43:11 +0000 (23:43 -0700)]
assert-tests: pacify gcc -Wunused-function

* tests/test-assert.c (main): Call f, so that the test
works even if NDEBUG is defined.

22 months agostddef-tests: pacify gcc -Wshadow
Paul Eggert [Thu, 29 Jun 2023 22:24:32 +0000 (15:24 -0700)]
stddef-tests: pacify gcc -Wshadow

* tests/test-stddef.c (mat): Rename from ‘x’.

22 months agonullptr-tests: pacify gcc -Wmissing-declarations
Paul Eggert [Thu, 29 Jun 2023 22:23:55 +0000 (15:23 -0700)]
nullptr-tests: pacify gcc -Wmissing-declarations

* tests/test-nullptr.c (varargs_callee): Now static.

22 months agolibtextstyle-optional: Update to gettext 0.22.
Bruno Haible [Thu, 29 Jun 2023 17:02:43 +0000 (19:02 +0200)]
libtextstyle-optional: Update to gettext 0.22.

* lib/textstyle.in.h: Declare all functions that were added in
textstyle.h from gettext-0.22.

22 months agolibtextstyle-optional: Update to gettext 0.21.
Bruno Haible [Thu, 29 Jun 2023 15:31:55 +0000 (17:31 +0200)]
libtextstyle-optional: Update to gettext 0.21.

* lib/textstyle.in.h: Declare all functions that exist in textstyle.h
from gettext-0.21, independently of iconv.

22 months agofix space-tabs in top/maint.mk
Paul Eggert [Thu, 29 Jun 2023 01:49:31 +0000 (18:49 -0700)]
fix space-tabs in top/maint.mk

* top/maint.mk: Omit space before tab.

22 months agodoc: Mention c8rtomb and mbrtoc8 from ISO C 23.
Bruno Haible [Wed, 28 Jun 2023 17:27:26 +0000 (19:27 +0200)]
doc: Mention c8rtomb and mbrtoc8 from ISO C 23.

* doc/posix-functions/c8rtomb.texi: New file.
* doc/posix-functions/mbrtoc8.texi: New file.
* doc/gnulib.texi (Function Substitutes): Include them.

22 months agombrtoc16: Add tests.
Bruno Haible [Wed, 28 Jun 2023 16:36:02 +0000 (18:36 +0200)]
mbrtoc16: Add tests.

* tests/test-mbrtoc16.c: New file, based on tests/test-mbrtoc32.c.
* tests/test-mbrtoc16-1.sh: New file, based on tests/test-mbrtoc32-1.sh.
* tests/test-mbrtoc16-2.sh: New file, based on tests/test-mbrtoc32-2.sh.
* tests/test-mbrtoc16-3.sh: New file, based on tests/test-mbrtoc32-3.sh.
* tests/test-mbrtoc16-4.sh: New file, based on tests/test-mbrtoc32-4.sh.
* tests/test-mbrtoc16-5.sh: New file, based on tests/test-mbrtoc32-5.sh.
* tests/test-mbrtoc16-w32.c: New file, based on
tests/test-mbrtoc32-w32.c.
* tests/test-mbrtoc16-w32-1.sh: New file, based on
tests/test-mbrtoc32-w32-1.sh.
* tests/test-mbrtoc16-w32-2.sh: New file, based on
tests/test-mbrtoc32-w32-2.sh.
* tests/test-mbrtoc16-w32-3.sh: New file, based on
tests/test-mbrtoc32-w32-3.sh.
* tests/test-mbrtoc16-w32-4.sh: New file, based on
tests/test-mbrtoc32-w32-4.sh.
* tests/test-mbrtoc16-w32-5.sh: New file, based on
tests/test-mbrtoc32-w32-5.sh.
* tests/test-mbrtoc16-w32-6.sh: New file, based on
tests/test-mbrtoc32-w32-6.sh.
* tests/test-mbrtoc16-w32-7.sh: New file, based on
tests/test-mbrtoc32-w32-7.sh.
* modules/mbrtoc16-tests: New file, based on modules/mbrtoc32-tests.

22 months agombrtoc16: New module.
Bruno Haible [Wed, 28 Jun 2023 16:28:23 +0000 (18:28 +0200)]
mbrtoc16: New module.

* lib/uchar.in.h (mbrtoc16): New declaration.
* lib/mbrtoc16.c: New file.
* m4/mbrtoc16.m4: New file, based on m4/mbrtoc32.m4.
* modules/mbrtoc16: New file.
* m4/uchar_h.m4 (gl_UCHAR_H): Test whether mbrtoc16 is declared.
(gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBRTOC16.
(gl_UCHAR_H_DEFAULTS): Initialize HAVE_MBRTOC16, REPLACE_MBRTOC16.
* modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC16,
HAVE_MBRTOC16, REPLACE_MBRTOC16.
* doc/posix-functions/mbrtoc16.texi: Mention the mbrtoc16 module and the
mbsinit related limitation.
* doc/posix-functions/mbsinit.texi: Mention the mbrtoc16 related
limitation.

22 months agoc32*: Update comment.
Bruno Haible [Wed, 28 Jun 2023 13:27:18 +0000 (15:27 +0200)]
c32*: Update comment.

* lib/c32is-impl.h (FUNC): Add comment regarding Android.
* lib/c32to-impl.h (FUNC): Likewise.
* lib/c32width.c (c32width): Likewise.

22 months agombrtoc32: Doc tweak.
Bruno Haible [Wed, 28 Jun 2023 10:35:21 +0000 (12:35 +0200)]
mbrtoc32: Doc tweak.

* doc/posix-functions/mbrtoc32.texi: Mention that mingw and Android have
the empty input bug.
* m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
guess.

22 months agombrtowc: Doc tweak.
Bruno Haible [Wed, 28 Jun 2023 13:01:33 +0000 (15:01 +0200)]
mbrtowc: Doc tweak.

* doc/posix-functions/mbrtowc.texi: Mention that MSVC has the empty
input bug and the return value bug. Mention that Android has the empty
input bug.
* m4/mbrtowc.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
guess.

22 months agombrtowc, mbrtoc32: Simplify autoconf macros.
Bruno Haible [Tue, 27 Jun 2023 19:19:28 +0000 (21:19 +0200)]
mbrtowc, mbrtoc32: Simplify autoconf macros.

* m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Put
cross-compilation guess at the usual place.
* m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE):
Likewise.

22 months agoc32*: Optionally enforce ISO C 23 semantics of char32_t.
Bruno Haible [Tue, 27 Jun 2023 09:28:26 +0000 (11:28 +0200)]
c32*: Optionally enforce ISO C 23 semantics of char32_t.

* lib/lc-charset-unicode.h: New file.
* lib/lc-charset-unicode.c: New file.
* modules/uchar-c23: New file.
* lib/uchar.in.h (char32_t): Add comment.
* lib/mbrtoc32.c: Include lc-charset-unicode.h.
(mbrtoc32): If char32_t is Unicode and wchar_t is not, invoke
locale_encoding_to_unicode.
* lib/btoc32.c: Include lc-charset-unicode.h.
(btoc32): If char32_t is Unicode and wchar_t is not, invoke
locale_encoding_to_unicode.
* lib/c32rtomb.c: Include lc-charset-unicode.h.
(c32rtomb): If char32_t is Unicode and wchar_t is not, invoke
unicode_to_locale_encoding.
* lib/c32tob.c: Include lc-charset-unicode.h.
(c32tob): If char32_t is Unicode and wchar_t is not, invoke
unicode_to_locale_encoding.
* lib/mbsnrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't
use mbsnrtowcs.
* lib/mbsrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use
mbsrtowcs.
* lib/c32snrtombs.c: If char32_t is Unicode and wchar_t is not, don't
use wcsnrtombs.
* lib/c32srtombs.c: If char32_t is Unicode and wchar_t is not, don't use
wcsrtombs.
* lib/c32is-impl.h: Include lc-charset-unicode.h.
(FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
* lib/c32to-impl.h: Include lc-charset-unicode.h.
(FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
* lib/c32width.c: Include lc-charset-unicode.h.
(c32width): If char32_t is Unicode and wchar_t is not, use uc_width.
* tests/test-mbrtoc32.c: Include <wchar.h>.
(main): Skip GB18030 tests on NetBSD and Solaris. If
GL_CHAR32_T_IS_UNICODE, expect Unicode encoding for the char32_t values.
* tests/test-mbrtoc32-w32.c: Include <wchar.h>.
(test_one_locale): Simplify.
* tests/test-c32rtomb.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32rtomb.sh: Update.
* tests/test-mbsnrtoc32s.c: Include <wchar.h>.
(main): Skip GB18030 tests on NetBSD and Solaris.
* tests/test-mbsrtoc32s.c: Include <wchar.h>.
(main): Skip GB18030 tests on NetBSD and Solaris.
* tests/test-mbstoc32s.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32snrtombs.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32srtombs.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32stombs.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isalnum.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isalnum.sh: Update.
* tests/test-c32isalpha.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32isalpha.sh: Update.
* tests/test-c32isblank.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isblank.sh: Update.
* tests/test-c32iscntrl.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32iscntrl.sh: Update.
* tests/test-c32isdigit.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isdigit.sh: Update.
* tests/test-c32isgraph.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32isgraph.sh: Update.
* tests/test-c32islower.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32islower.sh: Update.
* tests/test-c32isprint.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32isprint.sh: Update.
* tests/test-c32ispunct.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32ispunct.sh: Update.
* tests/test-c32isspace.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isspace.sh: Update.
* tests/test-c32isupper.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isupper.sh: Update.
* tests/test-c32isxdigit.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isxdigit.sh: Update.
* tests/test-c32tolower.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32tolower.sh: Update.
* tests/test-c32toupper.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32toupper.sh: Update.
* modules/mbrtoc32 (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbrtoc32-tests (Makefile.am): Link test-mbrtoc32 with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/btoc32 (Link): New section.
* modules/btoc32-tests (Makefile.am): Link test-btoc32 with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32rtomb (Link): New section.
* modules/c32rtomb-tests (Makefile.am): Link test-c32rtomb with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32tob (Link): New section.
* modules/mbsnrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbsnrtoc32s-tests (Makefile.am): Link test-mbsnrtoc32s with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/mbsrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbsrtoc32s-tests (Makefile.am): Link test-mbsrtoc32s with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/mbstoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbstoc32s-tests (Makefile.am): Link test-mbstoc32s with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32snrtombs (Link): New section.
* modules/c32snrtombs-tests (Makefile.am): Link test-c32snrtombs with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32srtombs (Link): New section.
* modules/c32srtombs-tests (Makefile.am): Link test-c32srtombs with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32stombs (Link): New section.
* modules/c32stombs-tests (Makefile.am): Link test-c32stombs with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32isalnum (Link): Add $(LIBC32CONV).
* modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
$(LIBC32CONV).
* modules/c32isalpha (Link): Add $(LIBC32CONV).
* modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
$(LIBC32CONV).
* modules/c32isblank (Link): Add $(LIBC32CONV).
* modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
$(LIBC32CONV).
* modules/c32iscntrl (Link): Add $(LIBC32CONV).
* modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
$(LIBC32CONV).
* modules/c32isdigit (Link): Add $(LIBC32CONV).
* modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
$(LIBC32CONV).
* modules/c32isgraph (Link): Add $(LIBC32CONV).
* modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
$(LIBC32CONV).
* modules/c32islower (Link): Add $(LIBC32CONV).
* modules/c32islower-tests (Makefile.am): Link test-c32islower with
$(LIBC32CONV).
* modules/c32isprint (Link): Add $(LIBC32CONV).
* modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
$(LIBC32CONV).
* modules/c32ispunct (Link): Add $(LIBC32CONV).
* modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
$(LIBC32CONV).
* modules/c32isspace (Link): Add $(LIBC32CONV).
* modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
$(LIBC32CONV).
* modules/c32isupper (Link): Add $(LIBC32CONV).
* modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
$(LIBC32CONV).
* modules/c32isxdigit (Link): Add $(LIBC32CONV).
* modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
$(LIBC32CONV).
* modules/c32tolower (Link): Add $(LIBC32CONV).
* modules/c32tolower-tests (Makefile.am): Link test-c32tolower with
$(LIBC32CONV).
* modules/c32toupper (Link): Add $(LIBC32CONV).
* modules/c32toupper-tests (Makefile.am): Link test-c32toupper with
$(LIBC32CONV).
* modules/c32width (Link): Add $(LIBC32CONV).
* modules/c32width-tests (Makefile.am): Link test-c32width with
$(LIBC32CONV).
* modules/c32swidth (Link): Add $(LIBC32CONV).
* modules/c32swidth-tests (Makefile.am): Link test-c32swidth with
$(LIBC32CONV).
* modules/mbchar (Link): Add $(LIBC32CONV).
* modules/mbiter (Link): Add $(LIBC32CONV).
* modules/mbuiter (Link): Add $(LIBC32CONV).
* modules/mbfile (Link): Add $(LIBC32CONV).
* modules/mbmemcasecmp (Link): Add $(LIBC32CONV).
* modules/mbmemcasecmp-tests (Makefile.am): Link test-mbmemcasecmp with
$(LIBC32CONV).
* modules/mbscasecmp (Link): Add $(LIBC32CONV).
* modules/mbscasecmp-tests (Makefile.am): Link test-mbscasecmp with
$(LIBC32CONV).
* modules/mbscasestr (Link): Add $(LIBC32CONV).
* modules/mbscasestr-tests (Makefile.am): Link test-mbscasestr1,
test-mbscasestr2, test-mbscasestr3, test-mbscasestr4 with $(LIBC32CONV).
* modules/mbschr (Link): Add $(LIBC32CONV).
* modules/mbschr-tests (Makefile.am): Link test-mbschr with
$(LIBC32CONV).
* modules/mbscspn (Link): Add $(LIBC32CONV).
* modules/mbscspn-tests (Makefile.am): Link test-mbscspn with
$(LIBC32CONV).
* modules/mbslen (Link): Add $(LIBC32CONV).
* modules/mbsncasecmp (Link): Add $(LIBC32CONV).
* modules/mbsncasecmp-tests (Makefile.am): Link test-mbsncasecmp with
$(LIBC32CONV).
* modules/mbsnlen (Link): Add $(LIBC32CONV).
* modules/mbspbrk (Link): Add $(LIBC32CONV).
* modules/mbspbrk-tests (Makefile.am): Link test-mbspbrk with
$(LIBC32CONV).
* modules/mbspcasecmp (Link): Add $(LIBC32CONV).
* modules/mbspcasecmp-tests (Makefile.am): Link test-mbspcasecmp with
$(LIBC32CONV).
* modules/mbsrchr (Link): Add $(LIBC32CONV).
* modules/mbsrchr-tests (Makefile.am): Link test-mbsrchr with
$(LIBC32CONV).
* modules/mbssep (Link): Add $(LIBC32CONV).
* modules/mbsspn (Link): Add $(LIBC32CONV).
* modules/mbsspn-tests (Makefile.am): Link test-mbsspn with
$(LIBC32CONV).
* modules/mbsstr (Link): Add $(LIBC32CONV).
* modules/mbsstr-tests (Makefile.am): Link test-mbsstr1, test-mbsstr2,
test-mbsstr3 with $(LIBC32CONV).
* modules/mbstok_r (Link): Add $(LIBC32CONV).
* modules/propername (Link): Add $(LIBC32CONV).
* modules/regex-quote (Link): Add $(LIBC32CONV).
* modules/regex-quote-tests (Makefile.am): Link test-regex-quote with
$(LIBC32CONV).
* modules/trim (Link): Add $(LIBC32CONV).
* modules/trim-tests (Makefile.am): Link test-trim with $(LIBC32CONV).
* modules/exclude (Link): Add $(LIBC32CONV).
* modules/exclude-tests (Makefile.am): Link test-exclude with
$(LIBC32CONV).
* doc/posix-headers/uchar.texi: Mention the uchar-c23 module.
* doc/posix-functions/mbrtoc32.texi: Likewise.
* doc/strings.texi (The char32_t type): Likewise.

22 months agostriconveh: Fix module description.
Bruno Haible [Tue, 27 Jun 2023 11:25:33 +0000 (13:25 +0200)]
striconveh: Fix module description.

* modules/striconveh (Link): Add $(LIBUNISTRING).
* modules/striconveha (Link): New section.
* modules/xstriconveh (Link): New section.

22 months agostrncat: Update doc regarding Solaris 11.4.
Bruno Haible [Sun, 25 Jun 2023 18:42:59 +0000 (20:42 +0200)]
strncat: Update doc regarding Solaris 11.4.

* doc/posix-functions/strncat.texi: Mention that the bug still exists on
Solaris 11.4.
* m4/strncat.m4 (gl_FUNC_STRNCAT): Update comments.

22 months agothread: Avoid compiler warnings on Solaris.
Bruno Haible [Sun, 25 Jun 2023 18:18:41 +0000 (20:18 +0200)]
thread: Avoid compiler warnings on Solaris.

* lib/glthread/thread.h: Include <stdint.h>.
(gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via
intptr_t.
* modules/thread (Depends-on): Add stdint.

22 months agostrerrorname_np: Add support for Solaris 11.4/sparc.
Bruno Haible [Sun, 25 Jun 2023 17:11:26 +0000 (19:11 +0200)]
strerrorname_np: Add support for Solaris 11.4/sparc.

* lib/strerrorname_np.c (strerrorname_np): Consider ECKSUM, EFRAGS.
Allow ENOANO to be overloaded to another value.
* tests/test-strerrorname_np.c (main): Likewise.

22 months agodoc: correct doubled "on on"
Jim Meyering [Sun, 25 Jun 2023 16:58:55 +0000 (09:58 -0700)]
doc: correct doubled "on on"

* doc/glibc-functions/initstate_r.texi: As above.
* doc/posix-functions/initstate.texi: As above.

22 months agosigdescr_np tests: Avoid test failure on glibc/sparc.
Bruno Haible [Sun, 25 Jun 2023 16:40:19 +0000 (18:40 +0200)]
sigdescr_np tests: Avoid test failure on glibc/sparc.

* tests/test-sigdescr_np.c (main): Accept the glibc result for SIGEMT.
* doc/glibc-functions/sigdescr_np.texi: Mention two glibc deficiencies.

22 months agostrerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
Bruno Haible [Sun, 25 Jun 2023 16:19:06 +0000 (18:19 +0200)]
strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.

* m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
strerrorname_np (EDEADLOCK).
* doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36
still needs a workaround.

22 months agodoc: Mention glibc initstate, initstate_r bug.
Bruno Haible [Sun, 25 Jun 2023 15:58:57 +0000 (17:58 +0200)]
doc: Mention glibc initstate, initstate_r bug.

* doc/posix-functions/initstate.texi: Mention glibc bug.
* doc/glibc-functions/initstate_r.texi: Likewise.
* tests/test-random_r.c: Add a comment.

22 months agodoc: Update doc regarding 'setstate'.
Bruno Haible [Sun, 25 Jun 2023 14:06:52 +0000 (16:06 +0200)]
doc: Update doc regarding 'setstate'.

* doc/posix-functions/setstate.texi: Mention also Solaris 11.4.

22 months agodoc: Update doc regarding <ieee754.h>.
Bruno Haible [Sun, 25 Jun 2023 13:54:56 +0000 (15:54 +0200)]
doc: Update doc regarding <ieee754.h>.

* doc/glibc-headers/ieee754.texi: Mention that it's not present on
glibc/sparc64 in 32-bit mode.

22 months agoexclude: Complete last change.
Bruno Haible [Sun, 25 Jun 2023 08:29:47 +0000 (10:29 +0200)]
exclude: Complete last change.

* lib/exclude.c: Include <uchar.h> instead of <wctype.h>.

22 months agomake -C doc INSTALL.ISO INSTALL.UTF-8
Paul Eggert [Sat, 24 Jun 2023 22:24:43 +0000 (15:24 -0700)]
make -C doc INSTALL.ISO INSTALL.UTF-8

22 months ago* build-aux/gitlog-to-changelog: don’t quote `like this'
Paul Eggert [Sat, 24 Jun 2023 22:00:37 +0000 (15:00 -0700)]
* build-aux/gitlog-to-changelog: don’t quote `like this'

22 months agoautoupdate; cd doc; make INSTALL
Paul Eggert [Sat, 24 Jun 2023 21:47:08 +0000 (14:47 -0700)]
autoupdate; cd doc; make INSTALL

22 months agombchar, mbiter, mbuiter: Overcome wchar_t limitations.
Bruno Haible [Sat, 24 Jun 2023 15:40:12 +0000 (17:40 +0200)]
mbchar, mbiter, mbuiter: Overcome wchar_t limitations.

* lib/mbchar.h: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
(struct mbchar): Use char32_t instead of wchar_t.
(mb_casecmp, mb_caseequal): Use c32tolower instead of towlower.
(mb_isalnum): Use c32isalnum instead of iswalnum.
(mb_isalpha): Use c32isalpha instead of iswalpha.
(mb_isblank): Use c32isblank instead of iswblank.
(mb_iscntrl): Use c32iscntrl instead of iswcntrl.
(mb_isdigit): Use c32isdigit instead of iswdigit.
(mb_isgraph): Use c32isgraph instead of iswgraph.
(mb_islower): Use c32islower instead of iswlower.
(mb_isprint): Use c32isprint instead of iswprint.
(mb_ispunct): Use c32ispunct instead of iswpunct.
(mb_isspace): Use c32isspace instead of iswspace.
(mb_isupper): Use c32isupper instead of iswupper.
(mb_isxdigit): Use c32isxdigit instead of iswxdigit.
(mb_width_aux): Use c32width, c32iscntrl instead of wcwidth, iswcntrl.
* lib/mbiter.h: Include <uchar.h> instead of <wchar.h>.
(mbiter_multi_next): Use mbrtoc32 instead of mbrtowc.
* lib/mbuiter.h: Include <uchar.h> instead of <wchar.h>.
(mbuiter_multi_next): Use mbrtoc32 instead of mbrtowc.
* lib/mbfile.h (mbfile_multi_getc): Use mbrtoc32 instead of mbrtowc.
* lib/mbscasestr.c (knuth_morris_pratt_multibyte, mbscasestr): Use
c32tolower instead of towlower.
* lib/exclude.c (string_hasher_ci): Use char32_t, c32tolower instead of
wchar_t, towlower.
* modules/mbchar (Depends-on): Add uchar, c32isalnum, c32isalpha,
c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
c32ispunct, c32isspace, c32isupper, c32isxdigit, c32tolower, c32width.
Remove wchar, wctype-h, iswblank, iswdigit, iswxdigit, wcwidth.
* modules/mbiter (Depends-on): Add mbrtoc32, uchar. Remove mbrtowc,
wchar.
* modules/mbuiter (Depends-on): Likewise.
* modules/mbscasestr (Depends-on): Add c32tolower.
* modules/exclude (Depends-on): Add c32tolower.
* doc/strings.texi (C strings): Fix typo.

22 months agoautoupdate
Karl Berry [Sat, 24 Jun 2023 16:24:50 +0000 (09:24 -0700)]
autoupdate

22 months agodoc: Use makeinfo option to check menu structure.
Bruno Haible [Thu, 22 Jun 2023 16:30:08 +0000 (18:30 +0200)]
doc: Use makeinfo option to check menu structure.

Trick revealed by Patrice Dumas <pertusus@free.fr> in
<https://lists.gnu.org/archive/html/bug-texinfo/2023-06/msg00015.html>.

* doc/Makefile (MAKEINFO): Enforce checking of menu structure.

22 months agodoc: Correct info menu structure.
Bruno Haible [Thu, 22 Jun 2023 13:00:03 +0000 (15:00 +0200)]
doc: Correct info menu structure.

Reported by Elijah Zarezky <elijah@zarezky.spb.ru> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00105.html>.

* doc/strings.texi (Strings): Add missing @menu item.

22 months agodoc: make -C doc INSTALL.ISO INSTALL.UTF8
Paul Eggert [Tue, 20 Jun 2023 21:51:10 +0000 (14:51 -0700)]
doc: make -C doc INSTALL.ISO INSTALL.UTF8