]> Savannah Git Hosting - gnulib.git/log
gnulib.git
17 months agopthread_mutex_timedlock: Fix link errors on FreeBSD 5.2.1/i386.
Bruno Haible [Sun, 15 Oct 2023 19:57:26 +0000 (21:57 +0200)]
pthread_mutex_timedlock: Fix link errors on FreeBSD 5.2.1/i386.

* m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Test
not only whether pthread_mutex_timedlock is declared, but also whether
it is actually defined.

17 months agothreadlib: Fix link errors on FreeBSD 5.2.1/i386.
Bruno Haible [Sun, 15 Oct 2023 19:55:28 +0000 (21:55 +0200)]
threadlib: Fix link errors on FreeBSD 5.2.1/i386.

* m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be
found in -lpthread, try -lthr.

17 months agolock: Make Autoconf macro more robust.
Bruno Haible [Sun, 15 Oct 2023 17:10:29 +0000 (19:10 +0200)]
lock: Make Autoconf macro more robust.

* m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
Require gl_THREADLIB, not gl_THREADLIB_EARLY. Needed to get the value of
LIBMULTITHREAD.

17 months agovma-iter: Fix compilation error on FreeBSD 5.2.1.
Bruno Haible [Sun, 15 Oct 2023 06:38:43 +0000 (08:38 +0200)]
vma-iter: Fix compilation error on FreeBSD 5.2.1.

* lib/vma-iter.c [FreeBSD]: Include <sys/param.h>.

17 months agoisnanf, isnand: Fix conflict with Solaris <ieeefp.h>.
Bruno Haible [Fri, 13 Oct 2023 10:05:29 +0000 (12:05 +0200)]
isnanf, isnand: Fix conflict with Solaris <ieeefp.h>.

* lib/math.in.h (isnanf, isnand): On Solaris and IRIX, declare this
function, instead of defining it as a macro.

17 months agoisfinite: Work around a bug with 'long double' in glibc 2.5/ia64.
Bruno Haible [Sun, 8 Oct 2023 07:59:03 +0000 (09:59 +0200)]
isfinite: Work around a bug with 'long double' in glibc 2.5/ia64.

* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require
gl_LONG_DOUBLE_EXPONENT_LOCATION. Test also another NaN value.
* modules/isfinite (Files): Add m4/exponentl.m4.
* doc/posix-functions/isfinite.texi: Mention also a 'long double'
problem on ia64.

17 months ago*printf-posix: Work around bug with %#.0x on Mac OS X 10.6.
Bruno Haible [Tue, 3 Oct 2023 21:27:30 +0000 (23:27 +0200)]
*printf-posix: Work around bug with %#.0x on Mac OS X 10.6.

* lib/vasnprintf.c (VASNPRINTF): Enable NEED_PRINTF_UNBOUNDED_PRECISION-
guarded code also for NEED_PRINTF_FLAG_ALT_PRECISION_ZERO. Set
prec_ourselves to 1 if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO, precision is
0, and the directive is 'x' or 'X'. If prec_ourselves, remove the "0"
output if required.
* m4/printf.m4 (gl_PRINTF_FLAG_ALT_PRECISION_ZERO): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ALT_PRECISION_ZERO): New
macro.
(gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Invoke it.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Require
gl_PRINTF_FLAG_ALT_PRECISION_ZERO and test its result.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
Likewise.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
* m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
* doc/glibc-functions/asprintf.texi: Mention the %#.0x bug.
* doc/glibc-functions/obstack_printf.texi: Likewise.
* doc/glibc-functions/obstack_vprintf.texi: Likewise.
* doc/glibc-functions/vasprintf.texi: Likewise.
* doc/posix-functions/dprintf.texi: Likewise.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/fwprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/swprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vfwprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
* doc/posix-functions/vswprintf.texi: Likewise.
* doc/posix-functions/vwprintf.texi: Likewise.
* doc/posix-functions/wprintf.texi: Likewise.

17 months agoupdate-copyright tests: Fix test failure (regression 2023-06-18).
Bruno Haible [Tue, 3 Oct 2023 12:44:21 +0000 (14:44 +0200)]
update-copyright tests: Fix test failure (regression 2023-06-18).

* build-aux/update-copyright: Add "use re 'eval';" declaration.

17 months agostring-c++-tests, uchar-c++-tests: Fix link errors on Mac OS X.
Bruno Haible [Tue, 3 Oct 2023 08:51:06 +0000 (10:51 +0200)]
string-c++-tests, uchar-c++-tests: Fix link errors on Mac OS X.

* modules/string-c++-tests (Makefile.am): Link test-string-c++ with
$(LIBC32CONV).
* modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
$(LIBC32CONV).

19 months agolocalename, gettext: Avoid crash on macOS 14.
Bruno Haible [Mon, 2 Oct 2023 22:28:31 +0000 (00:28 +0200)]
localename, gettext: Avoid crash on macOS 14.

Reported by Shupeng Xue <dspxue@gmail.com> at
<https://lists.gnu.org/archive/html/bug-gettext/2023-10/msg00001.html>.

Cf <https://github.com/aria2/aria2/issues/2083#issuecomment-1694662007>.

* m4/intlmacosx.m4 (gt_INTL_MACOSX): Link with the CoreServices
framework in addition to the CoreFoundation framework.

19 months agolocalcharset: Avoid internal compiler error with -Wextra on macOS 10.5.
Bruno Haible [Mon, 2 Oct 2023 22:10:08 +0000 (00:10 +0200)]
localcharset: Avoid internal compiler error with -Wextra on macOS 10.5.

* lib/localcharset.c (locale_charset): Use an empty compound statement
instead of a null statement.

19 months agoautoupdate
Karl Berry [Thu, 21 Sep 2023 14:07:09 +0000 (07:07 -0700)]
autoupdate

19 months agoautoupdate
Karl Berry [Tue, 19 Sep 2023 16:11:24 +0000 (09:11 -0700)]
autoupdate

19 months agoacl-permissions: Fix compilation error on Solaris 11 (regr. 2023-09-04).
Bruno Haible [Fri, 15 Sep 2023 23:09:31 +0000 (01:09 +0200)]
acl-permissions: Fix compilation error on Solaris 11 (regr. 2023-09-04).

* lib/set-permissions.c: Include minmax.h.
* modules/acl-permissions (Depends-on): Add minmax.

19 months agognu-web-doc-update: fix updating of manual directory
Pádraig Brady [Mon, 11 Sep 2023 18:31:53 +0000 (19:31 +0100)]
gnu-web-doc-update: fix updating of manual directory

* build-aux/gnu-web-doc-update: Correctly change to the 'manual' directory,
since $tmp is a relative path.  This avoids removing files
outside of the 'manual' directory.  Broken since commit e979787d.

19 months agoDon't use 'throw ()' in C++ 11 or newer.
Bruno Haible [Thu, 7 Sep 2023 20:22:43 +0000 (22:22 +0200)]
Don't use 'throw ()' in C++ 11 or newer.

* lib/stddef.in.h (_GL_ATTRIBUTE_NOTHROW):  Provide fallback definition.
(abort): Declare with _GL_ATTRIBUTE_NOTHROW instead of throw().
* lib/malloc.in.h (rpl_free, free): Likewise.
* lib/stdlib.in.h (free): Likewise.
* lib/string.in.h (rpl_free, free, memchr, memrchr, rawmemchr,
strchrnul, strpbrk, strstr, strcasestr): Likewise.
* lib/wchar.in.h (rpl_free, free): Likewise.
* lib/getopt-cdefs.in.h (__THROW): Define to noexcept(true) for C++ 11
or newer.
* lib/md5.h (__THROW): Likewise.

19 months agouchar: Fix references to overridden functions with GNULIB_NAMESPACE.
Bruno Haible [Thu, 7 Sep 2023 12:39:12 +0000 (14:39 +0200)]
uchar: Fix references to overridden functions with GNULIB_NAMESPACE.

* lib/uchar.in.h (btoc32, c32isalnum, c32isalpha, c32isblank,
c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct,
c32isspace, c32isupper, c32isxdigit, c32tolower, c32toupper, c32width,
c32snrtombs, c32srtombs, c32swidth, c32tob, mbsnrtoc32s, mbsrtoc32s):
Use GNULIB_NAMESPACE:: prefix to refer to the gnulib overridden
function.
* modules/uchar (Depends-on): Add wctype-h.
(Makefile.am): Substitute GNULIB_BTOWC, GNULIB_ISWDIGIT,
GNULIB_ISWXDIGIT, GNULIB_WCWIDTH, GNULIB_WCSNRTOMBS, GNULIB_WCSRTOMBS,
GNULIB_WCSWIDTH, GNULIB_WCTOB, GNULIB_MBSNRTOWCS, GNULIB_MBSRTOWCS.

19 months agotests: Fix some clang -Wimplicit-fallthrough warnings.
Bruno Haible [Thu, 7 Sep 2023 14:13:22 +0000 (16:13 +0200)]
tests: Fix some clang -Wimplicit-fallthrough warnings.

* tests/test-execute-main.c (main): Add 'break' statement.
* tests/test-sys_file.c (main): Likewise.

19 months agounictype/category-none: Fix clang -Wpedantic warning.
Bruno Haible [Thu, 7 Sep 2023 14:05:33 +0000 (16:05 +0200)]
unictype/category-none: Fix clang -Wpedantic warning.

* lib/unictype/categ_none.c (_UC_CATEGORY_NONE): Use ISO C designated
initializer syntax to initialize the intended field of the union.

19 months agoc-*snprintf: Fix some clang -Wmissing-prototypes warnings.
Bruno Haible [Thu, 7 Sep 2023 14:21:25 +0000 (16:21 +0200)]
c-*snprintf: Fix some clang -Wmissing-prototypes warnings.

* lib/c-snprintf.c: Include c-snprintf.h instead of <stdio.h>.
* lib/c-vsnprintf.c: Include c-vsnprintf.h instead of <stdio.h>.
* lib/c-vasnprintf.c: Include c-vasnprintf.h.

19 months agoargp: Fix clang -Wextra-semi-stmt warning.
Bruno Haible [Thu, 7 Sep 2023 00:25:30 +0000 (02:25 +0200)]
argp: Fix clang -Wextra-semi-stmt warning.

* lib/argp-help.c (SKIPWS): Remove trailing semicolon.

19 months agounigbrk/u8-grapheme-{next,prev} tests: Fix gcc -Wformat warnings.
Bruno Haible [Tue, 5 Sep 2023 15:32:28 +0000 (17:32 +0200)]
unigbrk/u8-grapheme-{next,prev} tests: Fix gcc -Wformat warnings.

* tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next): Use
%tu, not %zu, to print a pointer difference.
* tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
Likewise.
* tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
Likewise.
* tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
Likewise.
* tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
Likewise.
* tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
Likewise.

19 months agotests: Ensure stderr output is displayed before abort().
Bruno Haible [Tue, 5 Sep 2023 13:55:24 +0000 (15:55 +0200)]
tests: Ensure stderr output is displayed before abort().

* tests/atomic-int-gnulib.h (init_atomic_int): Call fflush(stderr)
before abort().
* tests/atomic-int-isoc.h (init_atomic_int): Likewise.
* tests/atomic-int-posix.h (init_atomic_int): Likewise.
* tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
Likewise.
* tests/unigbrk/test-u16-grapheme-breaks.c (test_u16_grapheme_breaks):
Likewise.
* tests/unigbrk/test-u32-grapheme-breaks.c (test_u32_grapheme_breaks):
Likewise.
* tests/unigbrk/test-uc-grapheme-breaks.c (test_uc_grapheme_breaks):
Likewise.
* tests/unigbrk/test-ulc-grapheme-breaks.c (main): Likewise.
* tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next):
Likewise.
* tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
Likewise.
* tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
Likewise.
* tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
Likewise.
* tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
Likewise.
* tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
Likewise.

19 months agothreads-h: Modernize configure test.
Bruno Haible [Tue, 5 Sep 2023 11:00:38 +0000 (13:00 +0200)]
threads-h: Modernize configure test.

* m4/threads_h.m4 (gl_THREADS_H): In the test program, put the
'_Thread_local' storage class specifier before the type.

19 months agounistr/u{8,16,32}-strtok tests: Fix -Wanalyzer-allocation-size warnings.
Bruno Haible [Tue, 5 Sep 2023 01:06:30 +0000 (03:06 +0200)]
unistr/u{8,16,32}-strtok tests: Fix -Wanalyzer-allocation-size warnings.

* tests/unistr/test-u-strtok.h (test_u_strtok): Correct values of
input_len and delim_len.

19 months agosigpipe tests: Fix -Wanalyzer-unsafe-call-within-signal-handler warning.
Bruno Haible [Mon, 4 Sep 2023 22:58:37 +0000 (00:58 +0200)]
sigpipe tests: Fix -Wanalyzer-unsafe-call-within-signal-handler warning.

* tests/test-sigpipe.c (handler): Invoke _exit, not exit.
* tests/test-raise.c (handler): Update comments after 2020-11-25 change.

19 months agoargp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning.
Bruno Haible [Mon, 4 Sep 2023 22:22:30 +0000 (00:22 +0200)]
argp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning.

* lib/argp-help.c (hol_find_entry): Access hol->entries only after
having verified that hol->num_entries > 0.

19 months agounigbrk/uc-grapheme-breaks tests: Fix gcc -Wunused-function warning.
Bruno Haible [Mon, 4 Sep 2023 21:38:34 +0000 (23:38 +0200)]
unigbrk/uc-grapheme-breaks tests: Fix gcc -Wunused-function warning.

* tests/unigbrk/test-uc-grapheme-breaks.c
(graphemebreakproperty_to_string): Mark as possibly unused.

19 months agobitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings.
Bruno Haible [Mon, 4 Sep 2023 21:32:22 +0000 (23:32 +0200)]
bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings.

* tests/test-bitset.c (check_zero): Mark 'i' as possibly unused.
* tests/test-nonblocking-reader.h (full_read): Mark 'spent_time' as
possibly unused.

19 months agoUse statement-expressions without warnings, even in strict ISO C mode.
Bruno Haible [Mon, 4 Sep 2023 19:54:09 +0000 (21:54 +0200)]
Use statement-expressions without warnings, even in strict ISO C mode.

Suggested by Eric Blake <eblake@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00025.html>.

* lib/error.in.h (__gl_error_call): Use the variant with obvious control
flow also with clang. Use '__extension__' to avoid -Wpedantic warnings.
* lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Define as
macros even when __STRICT_ANSI__ is defined. But use '__extension__' to
avoid -Wpedantic warnings.
* lib/setenv.c (KNOWN_VALUE): Use '__extension__' to avoid -Wpedantic
warnings.
* lib/xalloc-oversized.h (xalloc_oversized): Use optimized variant even
when __STRICT_ANSI__ is defined. But use '__extension__' to avoid
-Wpedantic warnings.

19 months agoFix some g++ warnings "has a different exception specifier".
Bruno Haible [Mon, 4 Sep 2023 17:22:21 +0000 (19:22 +0200)]
Fix some g++ warnings "has a different exception specifier".

* m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_ATTRIBUTE_NOTHROW
effective in C++ mode.
* lib/attribute.h (ATTRIBUTE_NOTHROW): Add a comment.
* lib/malloc.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
(memalign): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
* lib/stdio.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
(fdopen): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
* lib/stdlib.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
(aligned_alloc, calloc, canonicalize_file_name, malloc, realloc): Invoke
_GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
* lib/string.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
(strdup, strndup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
* lib/sys_stat.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback
definition.
(getumask): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
* lib/wchar.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
(wcsdup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.

19 months agopipe-filter-gi, pipe-filter-ii tests: Fix some gcc -Wshadow warnings.
Bruno Haible [Mon, 4 Sep 2023 15:24:35 +0000 (17:24 +0200)]
pipe-filter-gi, pipe-filter-ii tests: Fix some gcc -Wshadow warnings.

* tests/test-pipe-filter-gi1.c (main): Rename local variable 'argv' to
'tr_argv'.
* tests/test-pipe-filter-ii1.c (main): Likewise.

19 months agoargv-iter tests: Avoid gcc -Wanalyzer-out-of-bounds warning.
Bruno Haible [Mon, 4 Sep 2023 15:07:33 +0000 (17:07 +0200)]
argv-iter tests: Avoid gcc -Wanalyzer-out-of-bounds warning.

* tests/test-argv-iter.c (main): Simplify logic.

19 months agocrypto/{gc-rijndael,rijndael} tests: Fix some gcc -Wshadow warnings.
Bruno Haible [Mon, 4 Sep 2023 14:48:41 +0000 (16:48 +0200)]
crypto/{gc-rijndael,rijndael} tests: Fix some gcc -Wshadow warnings.

* tests/test-gc-rijndael.c (main): Rename local variable 'i' to 'round'.
* tests/test-rijndael.c (main): Likewise.

19 months agothreads-h tests: Fix gcc -Wold-style-declaration warning.
Bruno Haible [Mon, 4 Sep 2023 14:39:07 +0000 (16:39 +0200)]
threads-h tests: Fix gcc -Wold-style-declaration warning.

* tests/test-thread_local.c (value0, value1, value2, value3): Put the
'thread_local' storage class specifier before the type.

19 months agoieee754-h tests: Fix some gcc -Wmissing-field-initializers warnings.
Bruno Haible [Mon, 4 Sep 2023 14:23:39 +0000 (16:23 +0200)]
ieee754-h tests: Fix some gcc -Wmissing-field-initializers warnings.

* tests/test-ieee754-h.c (float_tests): Use float literals.
(double_tests): Use double literals. Initialize frac_lo.

19 months agostring-buffer tests: Fix a gcc -Wformat warning.
Bruno Haible [Mon, 4 Sep 2023 14:02:36 +0000 (16:02 +0200)]
string-buffer tests: Fix a gcc -Wformat warning.

* tests/test-string-buffer.c: Include <wchar.h>. Don't assume that
wint_t has the same size as 'int'.

19 months agocrypto/* tests: Fix some gcc -Wdiscarded-qualifiers warnings.
Bruno Haible [Mon, 4 Sep 2023 13:46:39 +0000 (15:46 +0200)]
crypto/* tests: Fix some gcc -Wdiscarded-qualifiers warnings.

* tests/test-gc-hmac-md5.c (main): Change type of variables with a
string literal initializer to 'const char *'.
* tests/test-gc-hmac-sha1.c (main): Likewise.
* tests/test-gc-hmac-sha256.c (main): Likewise.
* tests/test-gc-hmac-sha512.c (main): Likewise.
* tests/test-gc-md2.c (main): Likewise.
* tests/test-gc-md5.c (main): Likewise.
* tests/test-gc-sha1.c (main): Likewise.
* tests/test-gc-sha256.c (main): Likewise.
* tests/test-gc-sha512.c (main): Likewise.
* tests/test-hmac-md5.c (main): Likewise.
* tests/test-hmac-sha1.c (main): Likewise.
* tests/test-hmac-sha256.c (main): Likewise.
* tests/test-hmac-sha512.c (main): Likewise.

19 months agofile-has-acl: Avoid gcc warning.
Bruno Haible [Mon, 4 Sep 2023 13:20:59 +0000 (15:20 +0200)]
file-has-acl: Avoid gcc warning.

* lib/acl-internal.h (MIN): Remove definition.

19 months agoalignalloc: Fix license header.
Bruno Haible [Sat, 2 Sep 2023 12:56:31 +0000 (14:56 +0200)]
alignalloc: Fix license header.

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

* lib/alignalloc.h: Make license header consistent with module
description.
* lib/alignalloc.c: Likewise.

19 months agowchar-single: fix module broken since 2021
Paul Eggert [Wed, 30 Aug 2023 17:15:09 +0000 (10:15 -0700)]
wchar-single: fix module broken since 2021

Adjust to 2021-03-07 change “Rename GNULIB_WCHAR_SINGLE to
GNULIB_WCHAR_SINGLE_LOCALE”.  Apparently nobody noticed that
the module was broken.  Perhaps we should obsolete the module?
* modules/wchar-single (GNULIB_WCHAR_SINGLE_LOCALE): Define.

20 months agoc32width tests: Avoid failure on FreeBSD 12.
Bruno Haible [Sat, 26 Aug 2023 23:53:57 +0000 (01:53 +0200)]
c32width tests: Avoid failure on FreeBSD 12.

* tests/test-c32width.c (main): Skip two tests on FreeBSD < 13.

20 months agocrypto/{sha*,md5,sm3}-buffer: Ignore too old OpenSSL versions.
Bruno Haible [Sat, 26 Aug 2023 20:45:17 +0000 (22:45 +0200)]
crypto/{sha*,md5,sm3}-buffer: Ignore too old OpenSSL versions.

* lib/sha1.h: If <openssl/macros.h> would give a compile-time error,
undefine HAVE_OPENSSL_SHA1.
* lib/sha256.h: If <openssl/macros.h> would give a compile-time error,
undefine HAVE_OPENSSL_SHA256.
* lib/sha512.h: If <openssl/macros.h> would give a compile-time error,
undefine HAVE_OPENSSL_SHA512.
* lib/md5.h: If <openssl/macros.h> would give a compile-time error,
undefine HAVE_OPENSSL_MD5.
* lib/sm3.h: If <openssl/macros.h> would give a compile-time error,
undefine HAVE_OPENSSL_SM3.

20 months agouchar: Make #include_next work right.
Bruno Haible [Sat, 26 Aug 2023 18:33:39 +0000 (20:33 +0200)]
uchar: Make #include_next work right.

* lib/uchar.in.h: Use a split double-inclusion guard.

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.