]> Savannah Git Hosting - gnulib.git/log
gnulib.git
20 months agounlocked-io: fix getc_unlocked typo
Paul Eggert [Tue, 22 Aug 2023 05:08:46 +0000 (22:08 -0700)]
unlocked-io: fix getc_unlocked typo

* lib/unlocked-io.h (getc): Fix misspelling of ‘getc_unlocked’.

20 months agoalignasof, stdalign: Fix a compilation error in C++ mode on FreeBSD 12.
Bruno Haible [Mon, 21 Aug 2023 15:23:41 +0000 (17:23 +0200)]
alignasof, stdalign: Fix a compilation error in C++ mode on FreeBSD 12.

* m4/stdalign.m4 (gl_ALIGNASOF): In C++ mode, prefer __builtin_offsetof
over offsetof when possible, since __builtin_offsetof works also when
<stddef.h> has not been fully included yet.

20 months agowcsstr: Relicense under LGPLv2+.
Bruno Haible [Mon, 21 Aug 2023 13:59:34 +0000 (15:59 +0200)]
wcsstr: Relicense under LGPLv2+.

* modules/wcsstr (License): Change to LGPLv2+.

20 months agowcsstr-simple: Relicense under LGPLv2+.
Bruno Haible [Mon, 21 Aug 2023 13:58:16 +0000 (15:58 +0200)]
wcsstr-simple: Relicense under LGPLv2+.

* modules/wcsstr-simple (License): Change to LGPLv2+.
* lib/wcsstr.c: Update license notice.
* lib/wcsstr-impl.h: Update license notice. The code added here on
2023-03-27 was under LGPLv2+.

20 months agowmemcmp: Relicense under LGPLv2+.
Bruno Haible [Mon, 21 Aug 2023 13:50:35 +0000 (15:50 +0200)]
wmemcmp: Relicense under LGPLv2+.

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

20 months agowcschr: Relicense under LGPLv2+.
Bruno Haible [Mon, 21 Aug 2023 13:46:02 +0000 (15:46 +0200)]
wcschr: Relicense under LGPLv2+.

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

20 months agoisnanl: Relicense under LGPLv2+.
Bruno Haible [Mon, 21 Aug 2023 13:08:54 +0000 (15:08 +0200)]
isnanl: Relicense under LGPLv2+.

* modules/isnanl (License): Change to LGPLv2+.

20 months agoldexp: Fix compilation error in C++ mode.
Bruno Haible [Sun, 20 Aug 2023 13:01:25 +0000 (15:01 +0200)]
ldexp: Fix compilation error in C++ mode.

* lib/math.in.h (ldexp): Use _GL_CXXALIASWARN1, not _GL_CXXALIASWARN.

20 months agoldexp: Work around OpenBSD/mips64 bug.
Bruno Haible [Sun, 20 Aug 2023 00:43:01 +0000 (02:43 +0200)]
ldexp: Work around OpenBSD/mips64 bug.

* lib/math.in.h (ldexp): New declaration.
* lib/ldexp.c: New file, based on lib/ldexpl.c.
* lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include
it.
* m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP.
(gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP.
* m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and
gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider
it when setting LDEXP_LIBM.
(gl_FUNC_LDEXP_WORKS): New macro.
* modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP.
* modules/ldexp (Files): Add lib/ldexp.c.
(Depends-on): Add math, isnand.
(configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR.
(Makefile.am): Conditionally compile ldexp.c.
* modules/ldexpl (Files): Add lib/ldexp.c.
* doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.

20 months agoldexpl: Relicense under LGPLv2+.
Bruno Haible [Sun, 20 Aug 2023 01:10:00 +0000 (03:10 +0200)]
ldexpl: Relicense under LGPLv2+.

* modules/ldexpl (License): Change to LGPLv2+.
* lib/ldexpl.c: Update license notice.

20 months agoisnand: Relicense under LGPLv2+.
Bruno Haible [Sun, 20 Aug 2023 00:19:04 +0000 (02:19 +0200)]
isnand: Relicense under LGPLv2+.

* modules/isnand (License): Change to LGPLv2+.

20 months agoldexpl: Avoid possible -Wshadow warning.
Bruno Haible [Sat, 19 Aug 2023 23:44:26 +0000 (01:44 +0200)]
ldexpl: Avoid possible -Wshadow warning.

* lib/ldexpl.c (exp): Locally rename to 'exponent'.

20 months agoldexpl: Fix signed integer overflow.
Bruno Haible [Sat, 19 Aug 2023 23:41:56 +0000 (01:41 +0200)]
ldexpl: Fix signed integer overflow.

* lib/ldexpl.c (ldexpl): Use an 'unsigned int' variable to represent the
absolute value of exp without overflow.

20 months agologbl: Work around endless loop on OpenBSD 7.3/mips64.
Bruno Haible [Sat, 19 Aug 2023 22:45:05 +0000 (00:45 +0200)]
logbl: Work around endless loop on OpenBSD 7.3/mips64.

* m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Terminate the test program if it
takes longer than 5 seconds.
* doc/posix-functions/logbl.texi: Mention the OpenBSD bug.

20 months agothrd: Work around thrd_join bug on AIX 7.3.1.
Bruno Haible [Fri, 18 Aug 2023 20:38:04 +0000 (22:38 +0200)]
thrd: Work around thrd_join bug on AIX 7.3.1.

* m4/threads_h.m4 (gl_THREADS_H): Test against AIX 7 thrd_join bug. Set
BROKEN_THRD_JOIN.
(gl_THREADS_H_DEFAULTS): Initialize BROKEN_THRD_JOIN.
* m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set REPLACE_THRD_* to 1 also if
BROKEN_THRD_JOIN is 1. Define BROKEN_THRD_START_T_OR_JOIN instead of
BROKEN_THRD_START_T.
* modules/threads-h (Makefile.am): Substitute BROKEN_THRD_JOIN.
* lib/threads.in.h (rpl_thrd_t, thrd_t): Define also if BROKEN_THRD_JOIN
is 1.
* lib/thrd.c: Test BROKEN_THRD_START_T_OR_JOIN instead of
BROKEN_THRD_START_T.
* doc/posix-functions/thrd_join.texi: Update.
* doc/posix-functions/thrd_exit.texi: Likewise.

20 months agothrd: Refactor.
Bruno Haible [Fri, 18 Aug 2023 19:14:40 +0000 (21:14 +0200)]
thrd: Refactor.

* m4/thrd.m4 (gl_FUNC_THRD_JOIN): Define BROKEN_THRD_JOIN_NULL, not
BROKEN_THRD_JOIN. Rename gl_cv_func_thrd_join_works to
gl_cv_func_thrd_join_null_works.
* lib/thrd.c: Test BROKEN_THRD_JOIN_NULL instead of BROKEN_THRD_JOIN.

20 months agothrd: On AIX 7.1 and 7.2, override also thrd_exit.
Bruno Haible [Fri, 18 Aug 2023 18:52:08 +0000 (20:52 +0200)]
thrd: On AIX 7.1 and 7.2, override also thrd_exit.

* lib/threads.in.h (thrd_exit): Consider REPLACE_THRD_EXIT.
* lib/thrd.c (rpl_thrd_exit): New function.
* m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_THRD_EXIT.
* m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set also REPLACE_THRD_EXIT and adjust
LIBSTDTHREAD.
* modules/threads-h (Makefile.am): Substitute REPLACE_THRD_EXIT.
* doc/posix-functions/thrd_exit.texi: Mention the AIX thrd_join problem
also here.

20 months agoaligned_alloc: Fix test failure on AIX 7.3 with ibm-clang.
Bruno Haible [Fri, 18 Aug 2023 16:54:28 +0000 (18:54 +0200)]
aligned_alloc: Fix test failure on AIX 7.3 with ibm-clang.

* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use 'volatile', to
disable optimization of ibm-clang -O2.
* doc/posix-functions/aligned_alloc.texi: Update version info.

20 months agosys_socket: Fix compilation errors in C++ mode on AIX 7.3 with gcc.
Bruno Haible [Fri, 18 Aug 2023 15:25:26 +0000 (17:25 +0200)]
sys_socket: Fix compilation errors in C++ mode on AIX 7.3 with gcc.

* lib/sys_socket.in.h (accept, getpeername, getsockname, recvfrom):
Disable _GL_CXXALIASWARN invocation on non-glibc systems.

20 months agostddef: Don't unnecessarily override max_align_t on AIX 7.3 with gcc.
Bruno Haible [Fri, 18 Aug 2023 11:46:15 +0000 (13:46 +0200)]
stddef: Don't unnecessarily override max_align_t on AIX 7.3 with gcc.

* lib/stddef.in.h (max_align_t, GNULIB_defined_max_align_t): Don't
define or override if HAVE_MAX_ALIGN_T is 1.

20 months agombrtoc32-regular: Make it work as expected on glibc 2.12.
Bruno Haible [Wed, 16 Aug 2023 21:44:57 +0000 (23:44 +0200)]
mbrtoc32-regular: Make it work as expected on glibc 2.12.

* lib/mbrtoc32.c (mbrtoc32): If necessary, clear the mbstate_t after
mbrtowc() returned.

20 months agofnmatch: Override fnmatch from glibc versions < 2.22.
Bruno Haible [Wed, 16 Aug 2023 19:47:26 +0000 (21:47 +0200)]
fnmatch: Override fnmatch from glibc versions < 2.22.

* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Force REPLACE_FNMATCH=1 in
glibc versions < 2.22.

20 months agotests: Avoid some test failures on Slackware 13.37.
Bruno Haible [Wed, 16 Aug 2023 19:42:46 +0000 (21:42 +0200)]
tests: Avoid some test failures on Slackware 13.37.

Make last commit actually work.

20 months agotests: Avoid some test failures on Slackware 13.37.
Bruno Haible [Wed, 16 Aug 2023 15:45:26 +0000 (17:45 +0200)]
tests: Avoid some test failures on Slackware 13.37.

* tests/test-c32isalnum.c (main): Disable GB18030 tests on
glibc 2.13..2.15.
* tests/test-c32isalpha.c (main): Likewise.
* tests/test-c32isblank.c (main): Likewise.
* tests/test-c32iscntrl.c (main): Likewise.
* tests/test-c32isdigit.c (main): Likewise.
* tests/test-c32isgraph.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isprint.c (main): Likewise.
* tests/test-c32ispunct.c (main): Likewise.
* tests/test-c32isspace.c (main): Likewise.
* tests/test-c32isupper.c (main): Likewise.
* tests/test-c32isxdigit.c (main): Likewise.
* tests/test-c32rtomb.c (main): Likewise.
* tests/test-c32snrtombs.c (main): Likewise.
* tests/test-c32srtombs.c (main): Likewise.
* tests/test-c32stombs.c (main): Likewise.
* tests/test-c32tolower.c (main): Likewise.
* tests/test-c32toupper.c (main): Likewise.
* tests/test-mbrtoc16.c (main): Likewise.
* tests/test-mbrtoc32.c (main): Likewise.
* tests/test-mbsnrtoc32s.c (main): Likewise.
* tests/test-mbsrtoc32s.c (main): Likewise.
* tests/test-mbstoc32s.c (main): Likewise.

20 months agostdint: Fix configure test result with gcc 4.7 or 4.8.
Bruno Haible [Mon, 14 Aug 2023 00:51:01 +0000 (02:51 +0200)]
stdint: Fix configure test result with gcc 4.7 or 4.8.

* m4/stdint.m4 (gl_STDINT_H): Don't assume that _Generic works with
GCC versions < 4.9 with -std=gnu11.

20 months agoFix some test module descriptions.
Bruno Haible [Mon, 14 Aug 2023 00:02:31 +0000 (02:02 +0200)]
Fix some test module descriptions.

* modules/dprintf-gnu-tests (Files): Add tests/macros.h.
* modules/fclose-tests (Files): Likewise.
* modules/getcwd-tests (Files): Likewise.
* modules/lock-tests (Files): Likewise.
* modules/nullptr-c++-tests (Files): Likewise.
* modules/posix_spawn-tests (Files): Likewise.
* modules/posix_spawnp-tests (Files): Likewise.
* modules/sh-quote-tests (Files): Likewise.
* modules/unigbrk/u16-grapheme-breaks-tests (Files): Likewise.
* modules/unigbrk/u16-grapheme-next-tests (Files): Likewise.
* modules/unigbrk/u16-grapheme-prev-tests (Files): Likewise.
* modules/unigbrk/u32-grapheme-breaks-tests (Files): Likewise.
* modules/unigbrk/u32-grapheme-next-tests (Files): Likewise.
* modules/unigbrk/u32-grapheme-prev-tests (Files): Likewise.
* modules/unigbrk/u8-grapheme-breaks-tests (Files): Likewise.
* modules/unigbrk/u8-grapheme-next-tests (Files): Likewise.
* modules/unigbrk/u8-grapheme-prev-tests (Files): Likewise.
* modules/unigbrk/uc-grapheme-breaks-tests (Files): Likewise.

20 months agoalignasof, stdalign: Avoid some -Wundef warnings from config.h.
Bruno Haible [Thu, 3 Aug 2023 16:09:29 +0000 (18:09 +0200)]
alignasof, stdalign: Avoid some -Wundef warnings from config.h.

Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00012.html>.

* m4/stdalign.m4 (gl_ALIGNASOF): Test whether __cplusplus is defined
before evaluating it. Assume HAVE_STDALIGN_H, _GL_STDALIGN_NEEDS_STDDEF
are never defined to 0.

20 months agoautoupdate
Karl Berry [Wed, 2 Aug 2023 14:01:58 +0000 (07:01 -0700)]
autoupdate

20 months agoreadutmp: Fix test failure on OpenBSD.
Bruno Haible [Mon, 31 Jul 2023 20:12:51 +0000 (22:12 +0200)]
readutmp: Fix test failure on OpenBSD.

* lib/readutmp.c (desirable_utmp_entry): On OpenBSD, eliminate entirely
empty entries.

20 months agoreadutmp: Improve comments. Fix module description.
Bruno Haible [Sun, 30 Jul 2023 13:08:59 +0000 (15:08 +0200)]
readutmp: Improve comments. Fix module description.

* lib/readutmp.h (extract_trimmed_name): Add specification comment.
(read_utmp): Move specification comment from lib/readutmp.c to here.
Mention also UTMP_FILE and READ_UTMP_USER_PROCESS.
* lib/readutmp.c (extract_trimmed_name): Fix comment.
* modules/readutmp (Include): Only include the .h file if
HAVE_UTMPX_H || HAVE_UTMP_H.

20 months agoreadutmp: work around glibc utmpx bug
Paul Eggert [Sun, 30 Jul 2023 00:06:42 +0000 (17:06 -0700)]
readutmp: work around glibc utmpx bug

When compiled with _TIME_BITS=64, glibc <utmpx.h> does not work,
because the files use 32-bit time_t and the code passes this to
the user unmodified, but <utmpx.h> defines a struct with 64-bit
time_t.  Work around this compatibility bug.  Problem reported
by Jakub Wilk via Sven Joachim <https://bugs.gnu.org/64937>.
* lib/readutmp.c (copy_utmp_entry): New function.
(read_utmp): Use it.

20 months agotime-h: Obey GNULIB_POSIXCHECK, not GNULIB_PORTCHECK.
Bruno Haible [Sat, 29 Jul 2023 16:07:45 +0000 (18:07 +0200)]
time-h: Obey GNULIB_POSIXCHECK, not GNULIB_PORTCHECK.

* lib/time.in.h (timespec_get, timespec_getres, time, nanosleep, tzset,
mktime, localtime_r, gmtime_r, localtime, strptime, ctime, strftime,
timegm): Add _GL_WARN_ON_USE invocation.
(asctime, ctime): Don't assume that these functions are declared, since
POSIX obsoletes them.
* m4/time_h.m4 (gl_TIME_H): Test for the declarations of asctime, ctime,
gmtime_r, localtime, localtime_r, mktime, nanosleep, strftime, strptime,
time, timegm, timespec_get, timespec_getres, tzset.
(gl_TIME_H_DEFAULTS): Initialize REPLACE_CTIME, REPLACE_LOCALTIME_R,
REPLACE_MKTIME, REPLACE_NANOSLEEP, REPLACE_STRFTIME, REPLACE_TIMEGM,
REPLACE_TIMESPEC_GET, REPLACE_TZSET with 0 instead of GNULIB_PORTCHECK.
* m4/ctime.m4 (gl_FUNC_CTIME): Don't re-initialize REPLACE_CTIME.
* m4/time_r.m4 (gl_TIME_R): Don't re-initialize REPLACE_LOCALTIME_R.
* m4/mktime.m4 (gl_FUNC_MKTIME): Don't re-initialize REPLACE_MKTIME.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Don't re-initialize
REPLACE_NANOSLEEP.
* m4/strftime-fixes.m4 (gl_FUNC_STRFTIME): Don't re-initialize
REPLACE_STRFTIME.
* m4/timegm.m4 (gl_FUNC_TIMEGM): Don't re-initialize REPLACE_TIMEGM.
* m4/tzset.m4 (gl_FUNC_TZSET: Don't re-initialize REPLACE_TZSET.

21 months agoposixcheck: Fix dependencies.
Bruno Haible [Fri, 28 Jul 2023 13:18:34 +0000 (15:18 +0200)]
posixcheck: Fix dependencies.

* modules/posixcheck (Depends-on): Add malloc-h, pthread-h, sched,
sys_random, threads-h, uchar, utmp.

21 months agouchar: Include the necessary snippets.
Bruno Haible [Fri, 28 Jul 2023 13:15:26 +0000 (15:15 +0200)]
uchar: Include the necessary snippets.

* lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and
_GL_WARN_ON_USE.
* modules/uchar (Depends-on): Add snippet/arg-nonnull,
snippet/warn-on-use.
(Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H
snippets.

21 months agofnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
Bruno Haible [Sun, 23 Jul 2023 13:26:28 +0000 (15:26 +0200)]
fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.

* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Add three more test cases to
the test program. Reorganize its return values.

21 months agoautoupdate
Karl Berry [Fri, 21 Jul 2023 14:43:18 +0000 (07:43 -0700)]
autoupdate

21 months agoerror-h: Fix dependencies.
Bruno Haible [Thu, 20 Jul 2023 14:33:31 +0000 (16:33 +0200)]
error-h: Fix dependencies.

Reported by <cbh34680@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00111.html>.

* modules/error-h (Depends-on): Add include_next.

21 months agofts: fix compilation errors with fts_cross_check()
Pádraig Brady [Thu, 20 Jul 2023 14:08:27 +0000 (15:08 +0100)]
fts: fix compilation errors with fts_cross_check()

* lib/fts.c: Fix printf format chars.
* lib/fts_.h: Provide a declaration for users.

21 months agoc32swidth: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:43:50 +0000 (22:43 +0200)]
c32swidth: Fix file list.

* modules/c32swidth (Files): Add locale-ja.m4, locale-zh.m4, codeset.m4.

21 months agowcsnrtombs: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:25:30 +0000 (22:25 +0200)]
wcsnrtombs: Fix file list.

* modules/wcsnrtombs (Files): Add locale-fr.m4.

21 months agombsnrtowcs: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:24:27 +0000 (22:24 +0200)]
mbsnrtowcs: Fix file list.

* modules/mbsnrtowcs (Files): Add locale-fr.m4, codeset.m4.

21 months agombrtoc16: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:23:23 +0000 (22:23 +0200)]
mbrtoc16: Fix file list.

* modules/mbrtoc16 (Files): Add locale-zh.m4.

21 months agombrlen: Fix file list.
Bruno Haible [Wed, 19 Jul 2023 20:21:47 +0000 (22:21 +0200)]
mbrlen: Fix file list.

* modules/mbrlen (Files): Add locale-fr.m4, locale-ja.m4, locale-zh.m4,
codeset.m4.

21 months agombstok_r: Simplify dependencies.
Bruno Haible [Tue, 18 Jul 2023 09:43:00 +0000 (11:43 +0200)]
mbstok_r: Simplify dependencies.

* lib/mbstok_r.c: Include <stdlib.h> instead of mbuiter.h.
* modules/mbstok_r (Depends-on): Remove mbuiter.

21 months agoannounce-gen: Allow using local git user.name.
Simon Josefsson [Mon, 17 Jul 2023 20:07:57 +0000 (22:07 +0200)]
announce-gen: Allow using local git user.name.

* build-aux/announce-gen (readable_interval): Remove --global
parameter to 'git config' call.

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 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 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.

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

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

22 months agoautoupdate
Paul Eggert [Tue, 20 Jun 2023 21:50:35 +0000 (14:50 -0700)]
autoupdate

22 months agodoc: INSTALL uses UTF-8 now
Paul Eggert [Tue, 20 Jun 2023 21:46:29 +0000 (14:46 -0700)]
doc: INSTALL uses UTF-8 now

* doc/Makefile (INSTALL.ISO, INSTALL.UTF-8):
Adjust to the fact that INSTALL now uses UTF-8.
INSTALL.UTF-8 is now obsolescent since it is identical.
(INSTALL.ISO): Transliterate all non-ASCII characters,
not just single quotes.
* doc/INSTALL.ISO: Regenerate.

22 months agoautoupdate
Karl Berry [Tue, 20 Jun 2023 14:40:24 +0000 (07:40 -0700)]
autoupdate

22 months agolargefile: port to GNU/Linux alpha and s390x
Paul Eggert [Mon, 19 Jun 2023 21:08:06 +0000 (14:08 -0700)]
largefile: port to GNU/Linux alpha and s390x

This patch syncs from Autoconf master.
Problem reported by Matoro <https://bugs.gnu.org/64123>.
* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_CODE):
New overridable macro FTYPE, to test types other than off_t.
(_AC_SYS_LARGEFILE_TEST_CODE): Test ino_t for
-D_FILE_OFFSETBITS=64 too, if no flags are needed for off_t.
Needed for GNU/Linux on alpha and s390x.

22 months agodoc: Corrections to the "Strings and Characters" chapter.
Bruno Haible [Mon, 19 Jun 2023 17:23:51 +0000 (19:23 +0200)]
doc: Corrections to the "Strings and Characters" chapter.

Suggested by Paul Eggert.

* doc/strings.texi: Corrections: GB18030 is rarely used nowadays.
<ctype.h> functions can be useful for specific data.

22 months agodoc: Use "spaced en dash" style instead of "spaced em dash" style.
Bruno Haible [Mon, 19 Jun 2023 17:00:58 +0000 (19:00 +0200)]
doc: Use "spaced en dash" style instead of "spaced em dash" style.

Suggested by Paul Eggert.

* doc/gnulib.texi: At sentence level, use "spaced en dash" style instead
of "spaced em dash" style.
* doc/gnulib-intro.texi: Likewise.
* doc/multithread.texi: Likewise.
* doc/strings.texi: Likewise.

22 months agosetenv: Simplify m4 requires.
Bruno Haible [Mon, 19 Jun 2023 14:42:09 +0000 (16:42 +0200)]
setenv: Simplify m4 requires.

* m4/setenv.m4 (gl_PREREQ_SETENV): Don't require AC_FUNC_ALLOCA.

22 months agoconfigmake: Bypass the unusable 'echo' command of some shells.
Bruno Haible [Sun, 18 Jun 2023 20:37:32 +0000 (22:37 +0200)]
configmake: Bypass the unusable 'echo' command of some shells.

Reported by Brian Inglis <Brian.Inglis@Shaw.ca> in
<https://lists.gnu.org/archive/html/bug-gettext/2023-06/msg00054.html>.

* m4/build-to-host.m4 (gl_BUILD_TO_HOST): Use 'printf' instead of
'echo', because the "dash" shell has a SystemV compatible 'echo'
command. Also, be sure to remove trailing CRs.

22 months agoupdate-copyright tests: fix to match behavior
Paul Eggert [Sun, 18 Jun 2023 17:49:10 +0000 (10:49 -0700)]
update-copyright tests: fix to match behavior

* tests/test-update-copyright.sh: Change tests to match new behavior.

22 months agoupdate-copyright tests: Add tests for man pages.
Bruno Haible [Sun, 18 Jun 2023 11:41:46 +0000 (13:41 +0200)]
update-copyright tests: Add tests for man pages.

* tests/test-update-copyright.sh: Add 4 tests that use man page syntax.

22 months agogettext: Clarify the purpose of this module.
Bruno Haible [Sun, 18 Jun 2023 11:09:39 +0000 (13:09 +0200)]
gettext: Clarify the purpose of this module.

Suggested by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00089.html>.

* modules/gettext (Description): Clarify the purpose.
(Makefile.am): Remove outdated comment. "gettextize --intl" is no longer
possible since 2019.

22 months agoUpdate \(en in copyright notices
Paul Eggert [Sun, 18 Jun 2023 07:27:52 +0000 (00:27 -0700)]
Update \(en in copyright notices

* build-aux/update-copyright (ndash_re): New var, matching \(en too.
(stmt_remainder_re, stmt): Use it.
(stmt): Match year in constructs like "\(en2023".
(ndash): Now \(en in man pages.

22 months agogettext: Update to gettext 0.22.
Bruno Haible [Sat, 17 Jun 2023 14:10:39 +0000 (16:10 +0200)]
gettext: Update to gettext 0.22.

* modules/gettext (Files): Add m4/build-to-host.m4.
(configure.ac): Request infrastructure compatible with gettext 0.22.
* m4/gettext.m4: Update from gettext 0.22.
* m4/po.m4: Likewise.

22 months ago* lib/limits.in.h: Fix comment typo.
Paul Eggert [Thu, 15 Jun 2023 19:22:33 +0000 (12:22 -0700)]
* lib/limits.in.h: Fix comment typo.