]> Savannah Git Hosting - gnulib.git/log
gnulib.git
5 months agognulib-tool.py: Fix logic of --remove-import option.
Bruno Haible [Wed, 13 Nov 2024 01:36:11 +0000 (02:36 +0100)]
gnulib-tool.py: Fix logic of --remove-import option.

Reported by Gavin Smith <gavinsmith0123@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00101.html>.

* pygnulib/GLImport.py (GLImport.__init__): Compute the modules to keep
correctly.

5 months agofts: Fix dependencies.
Bruno Haible [Mon, 11 Nov 2024 19:03:31 +0000 (20:03 +0100)]
fts: Fix dependencies.

* modules/fts (Depends-on): Add fcntl-safer.

5 months agomalloca: pacify CHERI clang
Paul Eggert [Mon, 11 Nov 2024 18:59:16 +0000 (10:59 -0800)]
malloca: pacify CHERI clang

* lib/malloca.c (freea) [__CHERI_PURE_CAPABILITY__]:
Add a cast as the code otherwise doesn’t conform to C.

5 months agoacl-permissions: Define the inline functions in this module.
Bruno Haible [Mon, 11 Nov 2024 08:53:23 +0000 (09:53 +0100)]
acl-permissions: Define the inline functions in this module.

* lib/acl-internal.c (ACL_INTERNAL_INLINE): Define here.
* lib/qset-acl.c (ACL_INTERNAL_INLINE): Don't define here.

5 months agogetpagesize: Fix use of 'extern inline' (regression 2012-11-20).
Bruno Haible [Mon, 11 Nov 2024 08:33:11 +0000 (09:33 +0100)]
getpagesize: Fix use of 'extern inline' (regression 2012-11-20).

* lib/unistd.in.h (_GL_GETPAGESIZE_INLINE): New macro.
(getpagesize): Use it.
* lib/getpagesize.c (_GL_GETPAGESIZE_INLINE): Define.
* modules/getpagesize (configure.ac): Compile getpagesize.c also when
getpagesize is missing.

5 months agorelocatable-prog-wrapper: Fix compilation error on NetBSD 7.
Bruno Haible [Sun, 10 Nov 2024 23:56:15 +0000 (00:56 +0100)]
relocatable-prog-wrapper: Fix compilation error on NetBSD 7.

Reported by Ionut Cosmin Mihai <ionut.cosmin.mihai@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnu-libiconv/2024-11/msg00000.html>.

* lib/relocwrapper.c: Fix dependency tree.
* modules/relocatable-prog-wrapper (Files): Add lib/stat-time.h,
lib/stat-time.c.
* build-aux/install-reloc (func_create_wrapper): Compile also
stat-time.c.

5 months agoassert-h: Allow mixed use of gcc/g++ also on Haiku 2022.
Bruno Haible [Thu, 31 Oct 2024 03:34:29 +0000 (04:34 +0100)]
assert-h: Allow mixed use of gcc/g++ also on Haiku 2022.

* m4/assert_h.m4 (gl_ASSERT_H): Don't assume that in C mode, <assert.h>
defines static_assert.

5 months agoassert-h, stdbool: Allow mixed use of gcc/g++ and clang/clang++ again.
Bruno Haible [Tue, 29 Oct 2024 12:48:36 +0000 (13:48 +0100)]
assert-h, stdbool: Allow mixed use of gcc/g++ and clang/clang++ again.

* m4/assert_h.m4 (gl_ASSERT_H): Improve indentation. With GCC and clang,
don't use the value of HAVE_C_STATIC_ASSERT.
* m4/c-bool.m4 (gl_C_BOOL): With GCC and clang, don't use the value of
HAVE_C_BOOL.

5 months agoposix_memalign-tests: fix message typo
Paul Eggert [Sat, 26 Oct 2024 17:07:53 +0000 (10:07 -0700)]
posix_memalign-tests: fix message typo

* tests/test-posix_memalign.c (main): Fix diagnostic typo.

5 months agoregex: Avoid dialog while running configure test on Haiku/x86_64.
Bruno Haible [Sat, 26 Oct 2024 19:10:30 +0000 (21:10 +0200)]
regex: Avoid dialog while running configure test on Haiku/x86_64.

Reported by Alexandru Popa <alpopa@gmail.com> in
<https://sourceforge.net/p/clisp/mailman/message/58831511/>.

* m4/regex.m4 (gl_REGEX): Disable dialog upon abort on Haiku.

5 months agoregex: Make configure test more maintainable.
Bruno Haible [Sat, 26 Oct 2024 18:58:05 +0000 (20:58 +0200)]
regex: Make configure test more maintainable.

* m4/regex.m4 (gl_REGEX): Include <malloc.h> before testing for
M_CHECK_ACTION.

5 months agopipe-filter-gi: Correct documentation.
Bruno Haible [Sat, 26 Oct 2024 17:42:10 +0000 (19:42 +0200)]
pipe-filter-gi: Correct documentation.

Reported by Miro Palmu <email@miropalmu.cc> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-10/msg00199.html>.

* lib/pipe-filter.h (pipe_filter_gi_create): Don't say that this
function may return NULL.

6 months agopthread-h tests: Fix a compilation error on MacOS X 10.4.
Bruno Haible [Wed, 16 Oct 2024 10:46:26 +0000 (12:46 +0200)]
pthread-h tests: Fix a compilation error on MacOS X 10.4.

Reported by Sevan Janiyan <venture37@geeklan.co.uk> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00183.html>.

* tests/test-pthread.c: Omit the PTHREAD_RWLOCK_INITIALIZER test if
module 'pthread-rwlock' is not in use.

6 months agocsharpcomp-script: Handle directories with spaces correctly.
Bruno Haible [Thu, 10 Oct 2024 17:39:36 +0000 (19:39 +0200)]
csharpcomp-script: Handle directories with spaces correctly.

Reported by Michele Locati <michele@locati.it>.

* build-aux/csharpcomp.sh.in (command_for_print, command_for_eval,
options_csc_for_print, options_csc_for_eval, sources_csc_for_print,
sources_csc_for_eval): New variables.
(sed_protect_1, sed_protect_2a, sed_protect_2b, sed_protect_2c,
sed_protect_3a, sed_protect_3b): New variables, copied from
build-aux/x-to-1.in.
(func_add_word_to_command): New function, copied from
build-aux/x-to-1.in.
(func_add_word_to_options_csc, func_add_word_to_sources_csc): New
functions.
(options_csc, sources_csc): Remove variables. Use
func_add_word_to_options_csc, func_add_word_to_sources_csc instead of
augmenting them.
Use options_csc_for_print, options_csc_for_eval, sources_csc_for_print,
sources_csc_for_eval when invoking csc.
* build-aux/csharpexec.sh.in (sed_quote_subst): Remove unused variable.

6 months agocsharpcomp: Avoid error on Windows.
Bruno Haible [Wed, 9 Oct 2024 15:22:59 +0000 (17:22 +0200)]
csharpcomp: Avoid error on Windows.

Reported by Michele Locati <michele@locati.it>.

* build-aux/csharpcomp.sh.in: Don't produce -reference options for DLLs
whose name starts with a lowercase letter or contains '.Native.'.
* lib/csharpcomp.c (name_is_dll): Filter our file names that start with
a lowercase letter or contain '.Native.'.

6 months agocsharpcomp: Add support for dotnet.
Bruno Haible [Wed, 9 Oct 2024 01:20:00 +0000 (03:20 +0200)]
csharpcomp: Add support for dotnet.

* lib/csharpcomp.c: Include <dirent.h>, concat-filename.h, xvasprintf.h.
(name_is_dll): New function, from lib/csharpexec.c.
(compile_csharp_using_dotnet): New function.
(compile_csharp_class): Invoke compile_csharp_using_dotnet.
* modules/csharpcomp (Depends-on): Add xconcat-filename, scandir,
alphasort, xvasprintf.

6 months agocsharpcomp-script: Add support for dotnet.
Bruno Haible [Wed, 9 Oct 2024 01:14:26 +0000 (03:14 +0200)]
csharpcomp-script: Add support for dotnet.

* m4/csharpcomp.m4 (gt_CSHARPCOMP): Support 'dotnet' as implementation.
Set HAVE_DOTNET_SDK, HAVE_DOTNET_CSC.
* build-aux/csharpcomp.sh.in: Add implementations for the cases
$HAVE_DOTNET_SDK = 1 and $HAVE_DOTNET_CSC = 1.

6 months agocsharpexec: Add support for dotnet.
Bruno Haible [Wed, 9 Oct 2024 01:14:04 +0000 (03:14 +0200)]
csharpexec: Add support for dotnet.

* lib/csharpexec.c: Include <dirent.h>, <errno.h>, <sys/stat.h>,
dirname.h, concat-filename.h, canonicalize.h, spawn-pipe.h,
wait-process.h, xalloc.h, copy-file.h, clean-temp-simple.h,
clean-temp.h.
(name_is_dll, execute_csharp_using_dotnet): New functions.
(execute_csharp_program): Invoke execute_csharp_using_dotnet.
* modules/csharpexec (Depends-on): Add stat, dirname, xconcat-filename,
canonicalize, spawn-pipe, wait-process, scandir, alphasort, copy-file,
clean-temp-simple, clean-temp.

6 months agocsharpexec-script: Add support for dotnet.
Bruno Haible [Wed, 9 Oct 2024 01:12:42 +0000 (03:12 +0200)]
csharpexec-script: Add support for dotnet.

* m4/csharpexec.m4 (gt_CSHARPEXEC): Support 'dotnet' as implementation.
Set HAVE_DOTNET.
* build-aux/csharpexec.sh.in (func_tmpdir): New function, copied from
build-aux/csharpcomp.sh.in.
Add implementation for the case $HAVE_DOTNET = 1.

6 months agocsharpexec-script, csharpcomp-script: Prepare support for dotnet.
Bruno Haible [Wed, 9 Oct 2024 01:11:32 +0000 (03:11 +0200)]
csharpexec-script, csharpcomp-script: Prepare support for dotnet.

* m4/csharp.m4 (gt_CSHARP_CHOICE): Recognize 'dotnet' as value of
--enable-csharp.

6 months agocsharpcomp: Behave like csharpcomp-script.
Bruno Haible [Wed, 9 Oct 2024 01:09:15 +0000 (03:09 +0200)]
csharpcomp: Behave like csharpcomp-script.

* lib/csharpcomp.c (compile_csharp_using_sscli): Pass the option
'-nologo' to csc.

6 months agocsharpcomp: Improve Cygwin support.
Bruno Haible [Mon, 7 Oct 2024 18:25:06 +0000 (20:25 +0200)]
csharpcomp: Improve Cygwin support.

* lib/csharpcomp.c: Include cygpath.h.
(compile_csharp_using_sscli): Convert the file names passed to 'csc' to
native Windows syntax.
* modules/csharpcomp (Depends-on): Add cygpath.

6 months agocsharpcomp-script: Improve Cygwin support.
Bruno Haible [Mon, 7 Oct 2024 18:20:14 +0000 (20:20 +0200)]
csharpcomp-script: Improve Cygwin support.

* build-aux/csharpcomp.sh.in: Convert the file names passed to 'csc' to
native Windows syntax.

6 months agocsharpexec: Improve Cygwin support.
Bruno Haible [Mon, 7 Oct 2024 18:15:44 +0000 (20:15 +0200)]
csharpexec: Improve Cygwin support.

* lib/csharpexec.c: Include cygpath.h.
(execute_csharp_using_sscli): Convert the first 'clix' argument to
native Windows syntax.
* modules/csharpexec (Depends-on): Add cygpath.

6 months agocsharpexec-script: Improve Cygwin support.
Bruno Haible [Mon, 7 Oct 2024 18:14:04 +0000 (20:14 +0200)]
csharpexec-script: Improve Cygwin support.

* build-aux/csharpexec.sh.in: Convert the first 'clix' argument to
native Windows syntax.

6 months agocygpath: New module.
Bruno Haible [Mon, 7 Oct 2024 18:10:16 +0000 (20:10 +0200)]
cygpath: New module.

* lib/cygpath.h: New file.
* lib/cygpath.c: New file, based on lib/javaversion.c.
* modules/cygpath: New file.

6 months agojavacomp, javaversion: Fix resource leak.
Bruno Haible [Sun, 6 Oct 2024 23:14:20 +0000 (01:14 +0200)]
javacomp, javaversion: Fix resource leak.

* lib/javacomp.c (execute_and_read_line): When fdopen fails, terminate
the program.
* lib/javaversion.c (execute_and_read_line): Likewise. When we can't
read a single line, call fclose and wait_subprocess, to free resources.

6 months agoiconv_open: Fix undefined behaviour.
Bruno Haible [Sat, 5 Oct 2024 00:45:49 +0000 (02:45 +0200)]
iconv_open: Fix undefined behaviour.

Reported by Tim Sweet <tsweet64@protonmail.com>
at <https://savannah.gnu.org/bugs/?66289>.

* lib/iconv.c (utf32be_mbtowc, utf32le_mbtowc): Cast 'unsigned char'
values to ucs4_t before shifting them to the left.

7 months agogetopt-posix: Fix compilation error in C++ mode (regression 2024-09-21).
Bruno Haible [Mon, 23 Sep 2024 15:52:43 +0000 (17:52 +0200)]
getopt-posix: Fix compilation error in C++ mode (regression 2024-09-21).

* lib/getopt-pfx-core.h: On AIX, HP-UX, Solaris, QNX, include <stdio.h>
first.

7 months agogetopt-posix, crypto/md5-buffer: Fix __GNUC_PREREQ re clang.
Bruno Haible [Sat, 21 Sep 2024 21:10:34 +0000 (23:10 +0200)]
getopt-posix, crypto/md5-buffer: Fix __GNUC_PREREQ re clang.

* lib/getopt-cdefs.in.h (__GNUC_PREREQ): Copy definition from
lib/libc-config.h.
* lib/md5.h (__GNUC_PREREQ): Likewise.

7 months agogetopt-posix: Improve definition of __GNUC_PREREQ.
Henrik Lindström [Sat, 21 Sep 2024 20:46:24 +0000 (22:46 +0200)]
getopt-posix: Improve definition of __GNUC_PREREQ.

* lib/getopt-cdefs.in.h (__GNUC_PREREQ): Test __GNUC_MINOR__, not
__GNUC_VERSION__.

Copyright-paperwork-exempt: Yes

7 months agosigsegv-tests: port to GCC 14
Paul Eggert [Sat, 21 Sep 2024 02:24:39 +0000 (19:24 -0700)]
sigsegv-tests: port to GCC 14

GCC 14 on x86-64 with -O2 apparently outsmarts our test for null
pointer dereference, and this is something the C standard allows.
Fix the test by putting ‘volatile’ at the right place.
* tests/test-sigsegv-catch-stackoverflow2.c (null_pointer):
Make it a volatile pointer, not a pointer to volatile.
Also, rename from null_pointer_to_volatile_int; use changed.

7 months agojit/cache tests: Fix crash with clang's UBSAN + ASAN.
Bruno Haible [Fri, 20 Sep 2024 15:17:36 +0000 (17:17 +0200)]
jit/cache tests: Fix crash with clang's UBSAN + ASAN.

* tests/jit/test-cache.c (clang_ubsan_workaround): New variable.
(CODE, SET_CODE): Use it.
(main): Initialize it.
* m4/libdl.m4: New file.
* modules/jit/cache-tests (Files): Add it.
(configure.ac): Invoke gl_LIBDL.
(Makefile.am): Link test-cache with $(LIBDL).

7 months agowait-process: Use waitpid() of LIBCx on OS/2 kLIBC if available.
KO Myung-Hun [Thu, 19 Sep 2024 13:45:04 +0000 (22:45 +0900)]
wait-process: Use waitpid() of LIBCx on OS/2 kLIBC if available.

* lib/wait-process.c (klibc_waitpid) [kLIBC]: New function.
(waitpid) [kLIBC]: Define it to klibc_waitpid.

7 months agoautoupdate
Karl Berry [Thu, 19 Sep 2024 21:28:57 +0000 (14:28 -0700)]
autoupdate

7 months agospawn-pipe: Simplify.
Bruno Haible [Thu, 19 Sep 2024 14:32:43 +0000 (16:32 +0200)]
spawn-pipe: Simplify.

* m4/spawn-pipe.m4 (gl_SPAWN_PIPE): Don't define HAVE_LIBCX_SPAWN2_H as
an AC_SUBSTed variable. Don't test for it on platforms other than OS/2.

7 months agospawn-pipe: Support a directory argument of create_pipe() on OS/2 kLIBC.
KO Myung-Hun [Thu, 19 Sep 2024 13:58:01 +0000 (22:58 +0900)]
spawn-pipe: Support a directory argument of create_pipe() on OS/2 kLIBC.

* lib/os2-spawn.h (spawnpvech): New declaration.
* lib/os2-spawn.c (spawnpvech): New function.
* lib/spawn-pipe.c (create_pipe) [kLIBC]: Reimplement with spawnpvech().
* m4/spawn-pipe.m4 (gl_SPAWN_PIPE) [HAVE_LIBCX_SPAWN2_H]: Check if
libcx/spawn2.h is available.

7 months agostdlib: Fix compilation error with Sun C++.
Bruno Haible [Tue, 17 Sep 2024 01:56:55 +0000 (03:56 +0200)]
stdlib: Fix compilation error with Sun C++.

* lib/stdlib.in.h: Don't obey the special invocation convention when
Sun C++ is used.

7 months agofaccessat: Correct errno value on AIX.
Bruno Haible [Mon, 16 Sep 2024 22:52:28 +0000 (00:52 +0200)]
faccessat: Correct errno value on AIX.

* lib/faccessat.c (rpl_faccessat): Do the trailing-slash workaround also
if the original faccessat invocation failed.

7 months agombrtoc16: Fix undefined behaviour.
Bruno Haible [Tue, 10 Sep 2024 11:56:03 +0000 (13:56 +0200)]
mbrtoc16: Fix undefined behaviour.

* lib/mbrtoc16.c (SET_EXTRA_STATE): Cast to 'unsigned int' before
shifting the bits to the positions 31..16.

7 months agostring-desc: Fix undefined behaviour.
Bruno Haible [Tue, 10 Sep 2024 00:07:57 +0000 (02:07 +0200)]
string-desc: Fix undefined behaviour.

* lib/string-desc-contains.c (string_desc_contains): Handle the case of
an empty haystack before invoking 'memmem'.

7 months agoFix COPYING.EXCEPTION license notices
Paul Eggert [Fri, 6 Sep 2024 01:31:29 +0000 (18:31 -0700)]
Fix COPYING.EXCEPTION license notices

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-08/msg00227.html
* m4/std-gnu11.m4: Fix license notice to use COPYING.EXCEPTION
correctly.

7 months agoResolve conflicts for functions introduced in Android API level 35.
Bruno Haible [Wed, 4 Sep 2024 17:38:52 +0000 (19:38 +0200)]
Resolve conflicts for functions introduced in Android API level 35.

Reported by Po Lu <luangruo@yahoo.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00024.html>.

* lib/time.in.h (timezone_t, tzalloc, tzfree): Don't require _GNU_SOURCE
to be defined. Define depending on HAVE_TZALLOC, not HAVE_TIMEZONE_T.
(localtime_rz, mktime_z): Likewise. Override if REPLACE_LOCALTIME_RZ or
REPLACE_MKTIME_Z is 1, respectively.
* lib/time_rz.c: If NEED_TIMEZONE_NULL_SUPPORT, define only localtime_rz
and mktime_z and only as wrappers around the system function.
* m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize HAVE_TZALLOC,
REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z.
* m4/time_rz.m4 (gl_TIME_RZ): Conditionally set HAVE_TZALLOC,
REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Conditionally define
NEED_TIMEZONE_NULL_SUPPORT.
* modules/time-h (Makefile.am): Substitute HAVE_TZALLOC,
REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z.
* modules/time_rz (Depends-on, configure.ac): Consider HAVE_TZALLOC,
REPLACE_LOCALTIME_RZ, REPLACE_MKTIME_Z. Ignore HAVE_TIMEZONE_T.

7 months agoResolve conflicts for functions introduced in Android API level 35.
Bruno Haible [Wed, 4 Sep 2024 08:34:04 +0000 (10:34 +0200)]
Resolve conflicts for functions introduced in Android API level 35.

* m4/strerrorname_np.m4 (gl_CHECK_STRERRORNAME_NP): Test for
strerrorname_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.

7 months agounlockpt tests: Avoid test failure on Haiku.
Bruno Haible [Tue, 3 Sep 2024 11:32:40 +0000 (13:32 +0200)]
unlockpt tests: Avoid test failure on Haiku.

* tests/test-unlockpt.c (main): Skip the test on Haiku.
* doc/posix-functions/unlockpt.texi: Update platforms list.

7 months agoutime, futimens tests: Avoid test failure on Haiku.
Bruno Haible [Mon, 2 Sep 2024 07:27:04 +0000 (09:27 +0200)]
utime, futimens tests: Avoid test failure on Haiku.

* tests/test-utimens-common.h (checkable_atime): On Haiku, return false.

7 months agostrtold: Work around a Haiku bug.
Bruno Haible [Sun, 1 Sep 2024 21:25:42 +0000 (23:25 +0200)]
strtold: Work around a Haiku bug.

* lib/strtod.c (HAVE_UNDERLYING_STRTOD): Set to 0 for 'long double'
parsing on Haiku.
* doc/posix-functions/strtold.texi: Mention the bug.

7 months agomath: Remove workaround for an older Haiku bug.
Bruno Haible [Sun, 1 Sep 2024 16:09:28 +0000 (18:09 +0200)]
math: Remove workaround for an older Haiku bug.

* lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Don't override on Haiku.

7 months agoFix mbscasestr test failure on native Windows with MSVC.
Bruno Haible [Sun, 1 Sep 2024 11:09:59 +0000 (13:09 +0200)]
Fix mbscasestr test failure on native Windows with MSVC.

* lib/c32to-impl.h (FUNC): On native Windows, ignore the system's
towlower/towupper function entirely.
* tests/test-c32tolower.c (main): On native Windows, reenable test that
previously failed.
* tests/test-c32toupper.c (main): Likewise. Disable two other tests on
native Windows.
* doc/posix-functions/towlower.texi: Mention bug in the native Windows
UTF-8 locale.
* doc/posix-functions/towupper.texi: Likewise.

7 months agotests: Avoid some test failures on Android.
Bruno Haible [Sat, 31 Aug 2024 22:13:49 +0000 (00:13 +0200)]
tests: Avoid some test failures on Android.

* tests/test-c32isalpha.c (main): Disable tests that fail on Android.
* tests/test-c32iscntrl.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-c32toupper.c (main): Likewise.

7 months agotests: Avoid some test failures on OpenBSD 7.5.
Bruno Haible [Sat, 31 Aug 2024 22:13:39 +0000 (00:13 +0200)]
tests: Avoid some test failures on OpenBSD 7.5.

* tests/test-c32isalpha.c (main): Disable tests that fail on
OpenBSD 7.5.
* tests/test-c32iscntrl.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-c32toupper.c (main): Likewise.

7 months agoiswxdigit: Work around OpenBSD, Android, Haiku bug.
Bruno Haible [Sat, 31 Aug 2024 22:12:54 +0000 (00:12 +0200)]
iswxdigit: Work around OpenBSD, Android, Haiku bug.

* m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Require gt_LOCALE_EN_UTF8 instead
of gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8 instead of LOCALE_FR_UTF8.
Update cross-compilation guess.
* modules/iswxdigit (Files): Add m4/locale-en.m4. Remove m4/locale-fr.m4.

7 months agoiswdigit: Work around OpenBSD, Android, Haiku bug.
Bruno Haible [Sat, 31 Aug 2024 22:11:12 +0000 (00:11 +0200)]
iswdigit: Work around OpenBSD, Android, Haiku bug.

* m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Require gt_LOCALE_EN_UTF8 instead
of gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8 instead of LOCALE_FR_UTF8.
Update cross-compilation guess.
* modules/iswdigit (Files): Add m4/locale-en.m4.

7 months agoPrepare for stronger LC_CTYPE tests on OpenBSD, Android, Haiku.
Bruno Haible [Sat, 31 Aug 2024 17:22:37 +0000 (19:22 +0200)]
Prepare for stronger LC_CTYPE tests on OpenBSD, Android, Haiku.

* m4/locale-en.m4: New file, based on m4/locale-fr.m4.
* m4/locale-ar.m4 (gt_LOCALE_AR): Update comments.
* m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
* m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
* m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.

7 months agotrim, unicodeio tests: Fix module description.
Bruno Haible [Sat, 31 Aug 2024 16:23:33 +0000 (18:23 +0200)]
trim, unicodeio tests: Fix module description.

* modules/trim-tests (configure.ac): Invoke the respective gt_LOCALE_*
macros.
* modules/unicodeio-tests (Makefile.am): Augment TESTS_ENVIRONMENT.

7 months agombrtoc32: Fix a cross-compilation guess.
Bruno Haible [Sat, 31 Aug 2024 11:57:39 +0000 (13:57 +0200)]
mbrtoc32: Fix a cross-compilation guess.

* m4/mbrtoc32.m4 (gl_MBRTOC32_UTF8_LOCALE): Guess no on Cygwin.

7 months agomkfifoat: Work around a Haiku bug.
Bruno Haible [Fri, 30 Aug 2024 23:28:32 +0000 (01:28 +0200)]
mkfifoat: Work around a Haiku bug.

* lib/mknodat.c (rpl_mknodat): On Haiku, handle S_IFIFO explicitly.
* doc/posix-functions/mknodat.texi: Mention the S_IFIFO flag bug.

7 months agoposix_openpt tests: Fix test failure on Haiku.
Bruno Haible [Fri, 30 Aug 2024 21:48:44 +0000 (23:48 +0200)]
posix_openpt tests: Fix test failure on Haiku.

* tests/test-posix_openpt.c (main): On Haiku, create a child process and
call setsid().

7 months agosigsegv: Clarify license of the *.m4 files.
Bruno Haible [Fri, 30 Aug 2024 11:41:14 +0000 (13:41 +0200)]
sigsegv: Clarify license of the *.m4 files.

* m4/sigaltstack.m4: In the license notice, clarify which version of the
GPL is meant.
* m4/stack-direction.m4: Likewise.

7 months agognulib-tool: Fix description of --lgpl option (missed on 2021-06-04).
Bruno Haible [Thu, 29 Aug 2024 15:49:33 +0000 (17:49 +0200)]
gnulib-tool: Fix description of --lgpl option (missed on 2021-06-04).

* gnulib-tool (func_usage): Remove "Also modify license template"
sentence.
* pygnulib/GLInfo.py (GLInfo.usage): Likewise.

7 months agoobstack-printf-gnu: Fix mistake (reported by check-AC_LIBOBJ).
Bruno Haible [Thu, 29 Aug 2024 14:07:24 +0000 (16:07 +0200)]
obstack-printf-gnu: Fix mistake (reported by check-AC_LIBOBJ).

* modules/obstack-printf-gnu (Files): Add lib/obstack_printf.c.

7 months agoavoid GCC -Wmaybe-uninitialized false positives with LTO
Pádraig Brady [Wed, 28 Aug 2024 11:10:43 +0000 (12:10 +0100)]
avoid GCC -Wmaybe-uninitialized false positives with LTO

Avoids false warnings with GCC 14.2.1 with -flto

* lib/canonicalize.c: Initialize END_IDX.
* lib/getndelim2.c: Initialize C.

7 months agothreads-h: Don't override the C++ keyword 'thread_local'.
Bruno Haible [Wed, 28 Aug 2024 15:03:39 +0000 (17:03 +0200)]
threads-h: Don't override the C++ keyword 'thread_local'.

* lib/threads.in.h (thread_local): Don't define as a macro in C++ 11
or newer.

7 months agomcel: Fix compilation error with MSVC.
Bruno Haible [Tue, 27 Aug 2024 22:34:53 +0000 (00:34 +0200)]
mcel: Fix compilation error with MSVC.

* modules/builtin-expect (Description): Improve.
* m4/builtin-expect.m4: Improve comment.
* modules/mcel (Depends-on): Add builtin-expect.

7 months agosimple-atomic: Fix a clang warning on native Windows.
Bruno Haible [Tue, 27 Aug 2024 21:01:33 +0000 (23:01 +0200)]
simple-atomic: Fix a clang warning on native Windows.

* lib/simple-atomic.c (atomic_compare_and_swap_ptr): Add a cast.

7 months agowrite-any-file: Don't reference an undefined function on native Windows.
Bruno Haible [Tue, 27 Aug 2024 20:50:05 +0000 (22:50 +0200)]
write-any-file: Don't reference an undefined function on native Windows.

* m4/write-any-file.m4 (gl_WRITE_ANY_FILE): Remove test for <priv.h>,
obsolete since 2009-05-03. Test for geteuid.
* lib/write-any-file.c (geteuid): Define a fallback.

7 months agomkdir-p: Don't reference an undefined function on native Windows.
Bruno Haible [Tue, 27 Aug 2024 20:28:36 +0000 (22:28 +0200)]
mkdir-p: Don't reference an undefined function on native Windows.

* m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Test whether fchown exists.
* lib/dirchownmod.c (fchown): Define to a fallback if the system does
not have fchown.
(dirchownmod): Test HAVE_FCHOWN.

7 months agofts: Don't assume that a pointer is as wide as a 'long'.
Bruno Haible [Tue, 27 Aug 2024 20:08:00 +0000 (22:08 +0200)]
fts: Don't assume that a pointer is as wide as a 'long'.

* lib/fts.c (fts_sort): Cast pointers to 'uintptr_t', not to 'long'.

7 months agomkdir: Fix for use of posixcheck module on native Windows.
Bruno Haible [Tue, 27 Aug 2024 20:00:54 +0000 (22:00 +0200)]
mkdir: Fix for use of posixcheck module on native Windows.

* lib/sys_stat.in.h (mkdir): Give priority to the native Windows
definition over the GNULIB_POSIXCHECK redefinition.

7 months agowindows-spawn: Fix clang warning.
Bruno Haible [Tue, 27 Aug 2024 19:43:36 +0000 (21:43 +0200)]
windows-spawn: Fix clang warning.

* lib/windows-spawn.c (convert_CreateProcess_error): Remove unreachable
'break;' statements.

7 months agoImprove support for clang on Windows.
Bruno Haible [Tue, 27 Aug 2024 19:40:15 +0000 (21:40 +0200)]
Improve support for clang on Windows.

* lib/c++defs.h (_GL_CXXALIASWARN_2): Treat clang like gcc 4.2.
* lib/stdio.in.h (fwrite, fwrite_unlocked): Likewise.
* lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Likewise.
* lib/libc-config.h (__GNUC_PREREQ): Override glibc's definition to
handle clang in disguise.

7 months agoExplicitly exclude clang when we test for a GCC version >= 4.3.
Bruno Haible [Tue, 27 Aug 2024 14:20:16 +0000 (16:20 +0200)]
Explicitly exclude clang when we test for a GCC version >= 4.3.

Rationale: clang can disguise as any possible GCC version.

* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): When testing __GNUC__,
exclude clang.
* lib/_Noreturn.h (_Noreturn): Likewise.
* lib/aligned-malloc.h (aligned_free, aligned_malloc): Likewise.
* lib/base32.h: Likewise.
* lib/base64.h: Likewise.
* lib/dfa.c (FALLTHROUGH): Likewise.
* lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, opendir, fdopendir): Likewise.
* lib/intprops-internal.h: Likewise.
* lib/jit/cache.h (clear_cache): Likewise.
* lib/malloc.in.h (memalign): Likewise.
* lib/mcel.h: Likewise.
* lib/regex.h: Likewise.
* lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE): Likewise.
* lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC, fdopen, fopen, popen, tmpfile):
Likewise.
* lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, aligned_alloc, calloc,
canonicalize_file_name, malloc, realloc): Likewise.
* lib/string.in.h (_GL_ATTRIBUTE_DEALLOC, strdup, strndup): Likewise.
* lib/verify.h: Likewise.
* lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC, wcsdup): Likewise.
* lib/xalloc-oversized.h (xalloc_oversized): Likewise.
* lib/fenv-private.h (_FPU_GETCW, _FPU_SETCW, _FPU_GETFPSR,
_FPU_SETFPSR): When testing __GNUC__, exclude clang. Use different
builtins for clang.
* lib/hamt.h (GL_HAMT_THREAD_SAFE): When testing __GNUC__, exclude
clang. Enable for clang >= 4.
* lib/astrxfrm.c: Use _GL_GNUC_PREREQ.
* lib/readutmp.c: Likewise.
* lib/strftime.c: Likewise.
* tests/test-asyncsafe-linked_list-strong.c: Likewise.
* tests/test-asyncsafe-linked_list-weak.c: Likewise.
* tests/test-c-strtod-mt.c: Likewise.
* tests/test-c-strtof-mt.c: Likewise.
* tests/test-c-strtold-mt.c: Likewise.
* tests/test-gmtime_r-mt.c: Likewise.
* tests/test-intprops.c: Likewise.
* tests/test-limits-h.c: Likewise.
* tests/test-localtime_r-mt.c: Likewise.
* tests/test-memrchr.c: Likewise.
* tests/test-nl_langinfo-mt.c: Likewise.
* tests/test-setlocale_null-mt-all.c: Likewise.
* tests/test-setlocale_null-mt-one.c: Likewise.
* tests/test-statat.c: Likewise.
* tests/test-xvasprintf.c: Likewise.

7 months agoreadutmp: In systemd mode, show sessions of type "web".
Bruno Haible [Tue, 27 Aug 2024 09:46:33 +0000 (11:46 +0200)]
readutmp: In systemd mode, show sessions of type "web".

Reported by Allison Karlitskaya <allison.karlitskaya@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00160.html>.

* lib/readutmp.c (read_utmp_from_systemd): For a systemd session of type
"web", add a single USER_PROCESS entry.

7 months agoFix a test failure from a clang that masquerades as gcc 13.
Bruno Haible [Mon, 26 Aug 2024 22:49:07 +0000 (00:49 +0200)]
Fix a test failure from a clang that masquerades as gcc 13.

* tests/test-fenv-except-trapping-2.c (main): Skip the '4' test on
clang, since clang 17 still generates buggy comparisons, like gcc
versions < 8.

7 months agoFix some of the warnings from a clang that masquerades as gcc 13.
Bruno Haible [Mon, 26 Aug 2024 22:19:14 +0000 (00:19 +0200)]
Fix some of the warnings from a clang that masquerades as gcc 13.

* lib/c-stack.c: Use _GL_GNUC_PREREQ to test for the gcc version.
* lib/canonicalize.c: Likewise.
* lib/diffseq.h: Likewise.
* lib/file-has-acl.c: Likewise.
* lib/freopen-safer.c: Likewise.
* lib/getndelim2.c: Likewise.
* lib/mini-gmp-gnulib.c: Likewise.
* lib/propername.c: Likewise.
* lib/quotearg.c: Likewise.
* lib/vasnprintf.c: Likewise.
* tests/test-argmatch.c: Likewise.
* tests/test-dup2.c: Likewise.
* tests/test-explicit_bzero.c: Likewise.
* tests/test-fcntl.c: Likewise.
* tests/test-fopen.h: Likewise.
* tests/test-getdtablesize.c: Likewise.
* tests/test-getgroups.c: Likewise.
* tests/test-listen.c: Likewise.
* tests/test-localename.c: Likewise.
* tests/test-memset_explicit.c: Likewise.
* tests/test-open.h: Likewise.
* tests/test-perror2.c: Likewise.
* tests/test-select.h: Likewise.
* lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD): Don't use
gnu_printf with clang.
* lib/string-buffer.h: Likewise.
* lib/textstyle.in.h: Likewise.

7 months agoFix compilation errors with clang that masquerades as gcc 13.
Bruno Haible [Mon, 26 Aug 2024 19:13:50 +0000 (21:13 +0200)]
Fix compilation errors with clang that masquerades as gcc 13.

Reported by Sam James and Paul Eggert.

* m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_GNUC_PREREQ, ignore the
values of __GNUC__ and __GNUC_MINOR__ defined by clang.
* lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Don't treat
clang like GCC.
* lib/wchar.in.h (wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr): Disable
the _GL_CXXALIASWARN1 and _GL_CXXALIASWARN invocations for masquerading
clang++.

7 months agorelocatable-prog: Add support for 32-bit build on FreeBSD/powerpc64.
Bruno Haible [Sat, 24 Aug 2024 14:33:05 +0000 (16:33 +0200)]
relocatable-prog: Add support for 32-bit build on FreeBSD/powerpc64.

Reference: <https://savannah.gnu.org/patch/?10469>.

* build-aux/config.libpath: Accept a second argument. Use it on
FreeBSD/powerpc64.
* m4/relocatable.m4 (AC_LIB_LIBPATH): Require gl_HOST_CPU_C_ABI_32BIT.
Pass HOST_CPU_C_ABI_32BIT to the config.libpath script.
* modules/relocatable-prog (Files): Add m4/host-cpu-c-abi.m4.

7 months agodiffseq: port to GCC 14.2.1 in ‘patch’
Paul Eggert [Fri, 23 Aug 2024 20:50:32 +0000 (13:50 -0700)]
diffseq: port to GCC 14.2.1 in ‘patch’

* lib/diffseq.h: Also suppress -Wanalyzer-use-of-uninitialized-value.
This fixes an unwanted diagnostic when compiling GNU ‘patch’
with gcc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-1) x86-64.

7 months agomcel: port to uClibc-ng
Paul Eggert [Thu, 22 Aug 2024 06:00:38 +0000 (23:00 -0700)]
mcel: port to uClibc-ng

Problem reported by Waldemar Brodkorb in:
https://lists.gnu.org/r/bug-gnulib/2024-08/msg00130.html
* lib/mcel.h (mcel_scan): Don’t treat uClibc-ng like glibc.

7 months agostdio: Fix compilation error in C++ mode on Linux/riscv64 with musl.
Bruno Haible [Wed, 21 Aug 2024 21:22:26 +0000 (23:22 +0200)]
stdio: Fix compilation error in C++ mode on Linux/riscv64 with musl.

* lib/stdio.in.h (fpurge): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

7 months agolock: Fix pthread-rwlock crashes with clang (regr. 2024-08-07).
Bruno Haible [Sat, 17 Aug 2024 13:07:59 +0000 (15:07 +0200)]
lock: Fix pthread-rwlock crashes with clang (regr. 2024-08-07).

* lib/glthread/lock.h: Don't mark pthread_rwlock_init,
pthread_rwlockattr_init as weak if we are overriding them.

7 months agogitsub.sh: For a submodule, merge from the right remote branch.
Bruno Haible [Fri, 16 Aug 2024 20:07:19 +0000 (22:07 +0200)]
gitsub.sh: For a submodule, merge from the right remote branch.

Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> at
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00101.html>.

* top/gitsub.sh (func_upgrade): For a submodule, use 'git branch' to
determine the branch to merge from, instead of assuming that it is
always the 'master' branch.

8 months agotests: Fix link errors (regression 2024-08-12).
Bruno Haible [Wed, 14 Aug 2024 14:14:27 +0000 (16:14 +0200)]
tests: Fix link errors (regression 2024-08-12).

* modules/chown-tests (Makefile.am): Link test-chown with LIBINTL.
* modules/lchown-tests (Makefile.am): Link test-lchown with LIBINTL.
* modules/stat-time-tests (Makefile.am): Link test-stat-time with
LIBINTL.

8 months agombrtoc16: Fix compilation error on Haiku.
Bruno Haible [Tue, 13 Aug 2024 06:38:22 +0000 (08:38 +0200)]
mbrtoc16: Fix compilation error on Haiku.

* lib/uchar.in.h (mbrtoc16): Fix typo.

8 months agofdutimensat, utimensat tests: Fix test failures on Cygwin.
Bruno Haible [Mon, 12 Aug 2024 14:15:50 +0000 (16:15 +0200)]
fdutimensat, utimensat tests: Fix test failures on Cygwin.

* tests/nap.h: Include concat-filename.h, xgetcwd.h.
(nap_file): New variable.
(nap_get_stat, clear_temp_file): Use nap_file, not TEMPFILE.
(nap): Initialize nap_file.
* modules/chown-tests (Depends-on): Add xconcat-filename, xgetcwd.
* modules/fchownat-tests (Depends-on): Likewise.
* modules/fdutimensat-tests (Depends-on): Likewise.
* modules/futimens-tests (Depends-on): Likewise.
* modules/lchown-tests (Depends-on): Likewise.
* modules/stat-time-tests (Depends-on): Likewise.
* modules/utime-tests (Depends-on): Likewise.
* modules/utimens-tests (Depends-on): Likewise.
* modules/utimensat-tests (Depends-on): Likewise.

8 months agoMake sure gperf-generated files are the same in VPATH builds.
Bruno Haible [Sat, 10 Aug 2024 10:48:55 +0000 (12:48 +0200)]
Make sure gperf-generated files are the same in VPATH builds.

Reported by Patrice Dumas <pertusus@free.fr> in
<https://lists.gnu.org/archive/html/bug-texinfo/2024-08/msg00030.html>.

* modules/iconv_open (Makefile.am): Eliminate directory names from the
generated iconv_open-aix.h, iconv_open-hpux.h, iconv_open-irix.h,
iconv_open-osf.h, iconv_open-solaris.h, iconv_open-zos.h.
* modules/unicase/locale-language (Makefile.am): Eliminate directory
names from the generated unicase/locale-languages.h.
* modules/unicase/special-casing (Makefile.am): Eliminate directory
names from the generated unicase/special-casing-table.h.
* modules/unictype/bidiclass-byname (Makefile.am): Eliminate directory
names from the generated unictype/bidi_byname.h.
* modules/unictype/category-byname (Makefile.am): Eliminate directory
names from the generated unictype/categ_byname.h.
* modules/unictype/combining-class-byname (Makefile.am): Eliminate
directory names from the generated unictype/combiningclass_byname.h.
* modules/unictype/joininggroup-byname (Makefile.am): Eliminate
directory names from the generated unictype/joininggroup_byname.h.
* modules/unictype/joiningtype-byname (Makefile.am): Eliminate directory
names from the generated unictype/joiningtype_byname.h.
* modules/unictype/property-byname (Makefile.am): Eliminate directory
names from the generated unictype/pr_byname.h.
* modules/unictype/scripts (Makefile.am): Eliminate directory names from
the generated unictype/scripts_byname.h.
* modules/uninorm/composition (Makefile.am): Eliminate directory names
from the generated uninorm/composition-table.h.

8 months agotest-utime: port to noatime file systems
Paul Eggert [Fri, 9 Aug 2024 21:03:44 +0000 (14:03 -0700)]
test-utime: port to noatime file systems

Problem encountered on Ubuntu 24.04 zfs mounted noatime.
* tests/test-fdutimensat.c (main):
* tests/test-futimens.h (test_futimens):
* tests/test-lutimens.h (test_lutimens):
* tests/test-utime.c (test_utime):
* tests/test-utimens-common.h (checkable_atime): New function.
* tests/test-utimens.h (test_utimens):
* tests/test-utimensat.c (main):
Do not check atime on file systems mounted noatime.

8 months agoAvoid compiler warnings in some configure tests.
Bruno Haible [Wed, 7 Aug 2024 22:54:03 +0000 (00:54 +0200)]
Avoid compiler warnings in some configure tests.

* m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Allocate more room for local
array 'name'.
* m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Don't
pass a NULL pointer to pthread_mutex_timedlock.

8 months agopthread-rwlock: Fix default wait queue behaviour on glibc/Linux.
Bruno Haible [Wed, 7 Aug 2024 17:53:37 +0000 (19:53 +0200)]
pthread-rwlock: Fix default wait queue behaviour on glibc/Linux.

* lib/pthread.in.h: If REPLACE_PTHREAD_RWLOCK_INIT is 1 but
REPLACE_PTHREAD_RWLOCK_DESTROY is 0, override
PTHREAD_RWLOCK_INITIALIZER.
* lib/pthread-rwlock.c
(pthread_rwlockattr_init) [PTHREAD_RWLOCK_BAD_WAITQUEUE]: New function.
(pthread_rwlock_init) [PTHREAD_RWLOCK_BAD_WAITQUEUE]: New function.
* m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Check for reasonable
pthread_rwlock wait queue handling. Set REPLACE_PTHREAD_RWLOCK_INIT and
REPLACE_PTHREAD_RWLOCKATTR_INIT and define PTHREAD_RWLOCK_BAD_WAITQUEUE
if not.
* modules/pthread-rwlock (configure.ac): Update
GL_COND_OBJ_PTHREAD_RWLOCK condition.

8 months agofchmodat: Fix cross-compilation guess.
Bruno Haible [Wed, 7 Aug 2024 10:21:05 +0000 (12:21 +0200)]
fchmodat: Fix cross-compilation guess.

* m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Tolerate Linux version number
in $host_os.

8 months agowindows-mutex, windows-timedmutex: Follow pthread_mutex_trylock spec.
Bruno Haible [Tue, 6 Aug 2024 13:14:25 +0000 (15:14 +0200)]
windows-mutex, windows-timedmutex: Follow pthread_mutex_trylock spec.

* lib/windows-mutex.h (glwthread_mutex_t): Add 'owner' field.
* lib/windows-mutex.c: Include <stdlib.h>.
(glwthread_mutex_lock): Set the 'owner' field after entering the
critical section.
(glwthread_mutex_trylock): Detect whether the lock was previously locked
by this thread. Set the 'owner' field after entering the critical
section.
(glwthread_mutex_unlock): Clear the 'owner' field before leaving the
critical section.
* lib/windows-timedmutex.h (glwthread_timedmutex_t): Add 'owner' field.
* lib/windows-timedmutex.c: (glwthread_timedmutex_lock): Set the 'owner'
field after entering the critical section.
(glwthread_timedmutex_trylock): Detect whether the lock was previously
locked by this thread. Set the 'owner' field after entering the critical
section.
(glwthread_timedmutex_unlock): Clear the 'owner' field before leaving
the critical section.

8 months agodfa-tests: Detect test-dfa-match-aux error.
Bernhard Voelker [Sun, 4 Aug 2024 16:14:32 +0000 (18:14 +0200)]
dfa-tests: Detect test-dfa-match-aux error.

* tests/test-dfa-invalid-merge.sh: Set fail=1 if test-dfa-match-aux fails.
Remove redundant 'returns_ 0'.

8 months agotest-framework-sh: Improve returns_ example.
Bernhard Voelker [Sun, 4 Aug 2024 16:12:16 +0000 (18:12 +0200)]
test-framework-sh: Improve returns_ example.

In the shell test framework, an error is either flagged by setting
the shell variable fail=1, or by invoking the fail_ function with an
error diagnostic.

* tests/init.sh (returns_): Change example code in the comment to
use '|| fail=1' properly.

8 months agoFix misspelling of __clang_major__.
Bruno Haible [Mon, 29 Jul 2024 19:59:44 +0000 (21:59 +0200)]
Fix misspelling of __clang_major__.

* lib/cdefs.h (__THROW, __THROWNL, __NTH, __NTHNL): Fix misspelled macro
name.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
* lib/malloc.in.h (_GL_ATTRIBUTE_NOTHROW): Likewise.
* lib/stddef.in.h (_GL_ATTRIBUTE_NOTHROW): Likewise.
* lib/stdio.in.h (_GL_ATTRIBUTE_NOTHROW): Likewise.
* lib/stdlib.in.h (_GL_ATTRIBUTE_NOTHROW): Likewise.
* lib/string.in.h (_GL_ATTRIBUTE_NOTHROW): Likewise.
* lib/sys_stat.in.h (_GL_ATTRIBUTE_NOTHROW): Likewise.
* lib/wchar.in.h (_GL_ATTRIBUTE_NOTHROW): Likewise.

8 months agochdir: Fix mistake in GNULIB_POSIXCHECK.
Bruno Haible [Mon, 29 Jul 2024 18:21:06 +0000 (20:21 +0200)]
chdir: Fix mistake in GNULIB_POSIXCHECK.

* lib/unistd.in.h: Don't attach the chdir warning to the 'chown'
function.

8 months agoatoll: Fix module dependencies.
Bruno Haible [Mon, 29 Jul 2024 18:17:06 +0000 (20:17 +0200)]
atoll: Fix module dependencies.

* modules/atoll (Depends-on): Add stdlib.

8 months agoautoupdate
Paul Eggert [Sun, 28 Jul 2024 20:07:43 +0000 (13:07 -0700)]
autoupdate

8 months agosys_time, sys_types: Remove sys directory at 'make mostlyclean'.
Collin Funk [Sat, 27 Jul 2024 01:37:09 +0000 (18:37 -0700)]
sys_time, sys_types: Remove sys directory at 'make mostlyclean'.

* modules/sys_time (Makefile.am): Add sys to MOSTLYCLEANDIRS.
* modules/sys_types (Makefile.am): Likewise.

8 months agoAvoid false select_used_without_requesting_gnulib_module_select.
Bruno Haible [Wed, 24 Jul 2024 23:29:22 +0000 (01:29 +0200)]
Avoid false select_used_without_requesting_gnulib_module_select.

* modules/select (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_select.in.h (select): Don't define to
select_used_without_requesting_gnulib_module_select if the gnulib module
'select' is in use under the same configure.ac.

8 months agoAvoid false shutdown_used_without_requesting_gnulib_module_shutdown.
Bruno Haible [Wed, 24 Jul 2024 23:27:32 +0000 (01:27 +0200)]
Avoid false shutdown_used_without_requesting_gnulib_module_shutdown.

* modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (shutdown): Don't define to
shutdown_used_without_requesting_gnulib_module_shutdown if the gnulib
module 'shutdown' is in use under the same configure.ac.