]> Savannah Git Hosting - gnulib.git/log
gnulib.git
11 months agoargp: Fix test failure with clang's ASAN.
Bruno Haible [Wed, 8 May 2024 23:25:15 +0000 (01:25 +0200)]
argp: Fix test failure with clang's ASAN.

Reported in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00035.html>.

* m4/argp.m4 (gl_ARGP): Rename argp_parse to rpl_argp_parse.

11 months agognulib-tool.py: Make --megatest behaviour more similar to shell impl.
Bruno Haible [Wed, 8 May 2024 09:11:12 +0000 (11:11 +0200)]
gnulib-tool.py: Make --megatest behaviour more similar to shell impl.

* pygnulib/main.py (main) [megatest]: Remove space from the testdir
name.

11 months agognulib-tool: In --megatestdir mode, stop when there is an error.
Bruno Haible [Wed, 8 May 2024 08:55:43 +0000 (10:55 +0200)]
gnulib-tool: In --megatestdir mode, stop when there is an error.

* gnulib-tool.sh (megatest): Fail when one of the 'configure' or 'make'
steps fails.
* pygnulib/main.py (main): Likewise.

11 months agognulib-tool.py: Fix behavior of --test when a subprocess fails.
Collin Funk [Wed, 8 May 2024 08:24:09 +0000 (01:24 -0700)]
gnulib-tool.py: Fix behavior of --test when a subprocess fails.

Reported by Bruno Haible in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00101.html>.

* pygnulib/main.py (main): Use sp.run with check=True so that an
exception is thrown when a process fails. Simply exit if an exception
occurs.

11 months agobase32, base64: Prefer stdckdint to intprops.
Collin Funk [Wed, 8 May 2024 04:47:17 +0000 (21:47 -0700)]
base32, base64: Prefer stdckdint to intprops.

* lib/base32.c (base32_encode_alloc): Include stdckdint.h. Prefer
ckd_mul to INT_MULTIPLY_OK.
* lib/base64.c (base64_encode_alloc): Likewise.
* modules/base32 (Depends-on): Add stdckdint.
* modules/base64 (Depends-on): Likewise.

11 months agognulib-tool.py: Handle module dependencies that cannot be found.
Collin Funk [Wed, 8 May 2024 00:10:23 +0000 (17:10 -0700)]
gnulib-tool.py: Handle module dependencies that cannot be found.

* pygnulib/GLModuleSystem.py
(GLModule.getDependenciesWithoutConditions): Filter out None from the
module dependencies. An appropriate warning will already be printed by
GLModuleSystem.find().

11 months ago* doc/posix-headers/utmpx.texi: Update for glibc.
Paul Eggert [Tue, 7 May 2024 17:49:14 +0000 (10:49 -0700)]
* doc/posix-headers/utmpx.texi: Update for glibc.

11 months agonstrftime: use clearer code for padding
Paul Eggert [Tue, 7 May 2024 16:19:17 +0000 (09:19 -0700)]
nstrftime: use clearer code for padding

This also works around GCC bug 114965
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114965>.
* lib/strftime.c (enum pad_style): New type.
(width_add, my_strftime, __strftime_internal):
Use it instead of checking the raw chars.
* tests/test-nstrftime.h (T): Test for the GCC bug.

12 months agomaintainer-makefile: Prohibit BSD4.3/SysV u_char etc types.
Simon Josefsson [Mon, 6 May 2024 13:01:10 +0000 (15:01 +0200)]
maintainer-makefile: Prohibit BSD4.3/SysV u_char etc types.

* top/maint.mk (sc_unsigned_char, sc_unsigned_short)
(sc_unsigned_int, sc_unsigned_long): Add.

12 months agoinet-ntop, inet-pton: Avoid obsolete u_char type.
Simon Josefsson [Mon, 6 May 2024 12:56:08 +0000 (14:56 +0200)]
inet-ntop, inet-pton: Avoid obsolete u_char type.

* lib/inet_pton.c (inet_pton6): Use unsigned char instead of u_char.
* lib/inet_ntop.c: Doc fix.

12 months agognulib-tool.py: Regenerate aclocal.m4 before using 'autoconf -t ...'.
Bruno Haible [Sun, 5 May 2024 14:30:10 +0000 (16:30 +0200)]
gnulib-tool.py: Regenerate aclocal.m4 before using 'autoconf -t ...'.

Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00065.html>.

* pygnulib/GLImport.py (GLImport): New field m4dirs.
(GLImport.__init__): Accept an additional m4dirs argument.
(GLImport.execute): Regenerate aclocal.m4 before creating the library
Makefile.
* pygnulib/main.py (main): Pass the guessed_m4dirs to GLImport.

12 months agognulib-tool: Ignore autom4te.cache when using GNULIB_TOOL_IMPL=sh+py.
Collin Funk [Sun, 5 May 2024 06:46:02 +0000 (23:46 -0700)]
gnulib-tool: Ignore autom4te.cache when using GNULIB_TOOL_IMPL=sh+py.

Reported by Paul Eggert in:
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00061.html>.

* gnulib-tool: Don't compare the autom4te.cache directory since requests
are not sorted in Autoconf version 2.71 and below.

12 months agoreadutmp, boot-time: Work around a Cygwin 3.5.3 bug.
Bruno Haible [Sat, 4 May 2024 14:36:06 +0000 (16:36 +0200)]
readutmp, boot-time: Work around a Cygwin 3.5.3 bug.

Reported by Ken Brown <kbrown@cornell.edu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00035.html>.

* lib/boot-time-aux.h (get_windows_boot_time): On Cygwin, ignore
pagefile.sys if it appears to be a directory, and use another file as
a fallback.

12 months agoFix ChangeLog entry for previous commit.
Collin Funk [Sat, 4 May 2024 12:17:45 +0000 (05:17 -0700)]
Fix ChangeLog entry for previous commit.

12 months agognulib-tool.py: Fix an undefined function name.
Collin Funk [Sat, 4 May 2024 00:26:18 +0000 (17:26 -0700)]
gnulib-tool.py: Fix an undefined function name.

* pygnulib/main.py (main_with_exception_handling): Use the tempfile
module prefix when calling mkdtemp(). Use the 'glpy' prefix for the
temporary directory that exists for the entirety of the program.

12 months agomaint.mk: Don't fail on ~/.indent.pro, reported by Collin Funk.
Simon Josefsson [Fri, 3 May 2024 06:44:03 +0000 (08:44 +0200)]
maint.mk: Don't fail on ~/.indent.pro, reported by Collin Funk.

* top/maint.mk (indent_args): Use --ignore-profile.

12 months agognulib-tool.sh: Fix program name in error message.
Collin Funk [Thu, 2 May 2024 23:57:13 +0000 (16:57 -0700)]
gnulib-tool.sh: Fix program name in error message.

* gnulib-tool.sh: Use 'gnulib-tool' instead of 'gnulib' as the program
name in the error message.

12 months agoDEPENDENCIES: Add Cygwin as supported platform.
Collin Funk [Thu, 2 May 2024 21:22:14 +0000 (14:22 -0700)]
DEPENDENCIES: Add Cygwin as supported platform.

* DEPENDENCIES: Mention Cygwin as a supported platform for building
Windows binaries.

12 months agodoc: Add appendix about Gnulib history.
Bruno Haible [Thu, 2 May 2024 18:10:14 +0000 (20:10 +0200)]
doc: Add appendix about Gnulib history.

* doc/gnulib-history.texi: New file.
* doc/gnulib.texi: Include it.

12 months agognulib-tool.py: Don't leave temporary directories on exit.
Collin Funk [Thu, 2 May 2024 07:49:58 +0000 (00:49 -0700)]
gnulib-tool.py: Don't leave temporary directories on exit.

* pygnulib/main.py (main_with_exception_handling): Use
tempfile.TemporaryDirectory as a context manager so it is removed before
the program exits.
(main): Expect a temporary directory to be passed as an argument.
* pygnulib/GLConfig.py (GLConfig.__init__): Accept an optional temporary
directory parameter instead of creating one.
* pygnulib/GLImport.py (GLImport.__init__): Don't remove the cache's
temporary directory since it doesn't create one anymore.
(GLImport.execute): Don't remove the temporary directory explicitly. It
is handled by the usage of a context manager.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Likewise.

12 months agognulib-tool.py: Quote file names passed to 'patch'.
Collin Funk [Thu, 2 May 2024 04:26:34 +0000 (21:26 -0700)]
gnulib-tool.py: Quote file names passed to 'patch'.

* pygnulib/GLTestDir.py (_patch_test_driver): Import shlex and cleanup
unused imports. Use shlex.quote() on the file names passed to 'patch'.
* pygnulib/GLFileSystem.py (GLFileSystem.lookup): Likewise. Perform
redirection using sp.call() arguments instead of using the shell.

12 months agoreadutmp, boot-time: Improve for some Cygwin installations.
Bruno Haible [Wed, 1 May 2024 22:52:26 +0000 (00:52 +0200)]
readutmp, boot-time: Improve for some Cygwin installations.

Reported by Ken Brown <kbrown@cornell.edu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00008.html>.

* lib/boot-time-aux.h (get_windows_boot_time): Use /proc/cygdrive/
instead of /cygdrive/.

12 months agostddef: A better workaround against GCC bug 114870.
Bruno Haible [Wed, 1 May 2024 22:10:21 +0000 (00:10 +0200)]
stddef: A better workaround against GCC bug 114870.

* lib/stddef.in.h: If STDDEF_NOT_IDEMPOTENT is 1, disable the special
invocation convention.
* m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_NOT_IDEMPOTENT.
(gl_STDDEF_H_DEFAULTS): Initialize STDDEF_NOT_IDEMPOTENT.
* modules/stddef (Makefile.am): Substitute STDDEF_NOT_IDEMPOTENT.

12 months agostddef: Fix <stddef.h> behaviour on Cygwin (regression 2024-04-27).
Bruno Haible [Wed, 1 May 2024 21:10:51 +0000 (23:10 +0200)]
stddef: Fix <stddef.h> behaviour on Cygwin (regression 2024-04-27).

Reported by Markus Mützel <markus.muetzel@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00522.html>.

* lib/stddef.in.h: Don't test _@GUARD_PREFIX@_STDDEF_H. Fix comments.

12 months agodoc: Reference a gcc bug.
Bruno Haible [Wed, 1 May 2024 21:07:14 +0000 (23:07 +0200)]
doc: Reference a gcc bug.

* doc/posix-headers/stddef.texi: Reference a gcc bug.

12 months agoautoupdate
Karl Berry [Wed, 1 May 2024 15:12:11 +0000 (08:12 -0700)]
autoupdate

12 months agosprintf-posix, snprintf-posix tests: Add comment.
Bruno Haible [Wed, 1 May 2024 10:25:18 +0000 (12:25 +0200)]
sprintf-posix, snprintf-posix tests: Add comment.

Suggested by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00546.html>.

* tests/test-sprintf-posix.h (test_function): Add comment about known
failures.

12 months agognulib-tool.py: Fix mistake in previous commit.
Collin Funk [Wed, 1 May 2024 09:21:43 +0000 (02:21 -0700)]
gnulib-tool.py: Fix mistake in previous commit.

* pygnulib/GLModuleSystem.py (GLModuleSystem.exists)
(GLModuleSystem.find): Rename 'module' argument to 'module_name' so it
is clear they are not a GLModule object. Treat them as such.

12 months agognulib-tool.py: Use the GLModule's name variable directly.
Collin Funk [Wed, 1 May 2024 08:12:18 +0000 (01:12 -0700)]
gnulib-tool.py: Use the GLModule's name variable directly.

* pygnulib/GLModuleSystem.py (GLModule.getName): Remove function.
(GLModule.__str__, GLModule.__repr__, GLModule.isNonTests)
(GLModule.repeatModuleInTests, GLModule.getDependenciesRecursively)
(GLModule.getShellFunc, GLModule.getShellVar)
(GLModule.getConditionalName, GLModule.getApplicability)
(GLModule.getDependencies, GLModule.getAutomakeSnippet_Unconditional)
(GLModule.getLicense, GLModuleSystem.find)
(GLModuleTable.transitive_closure): Use the GLModule's name instance
variable instead of using str() or removed getName() function.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet)
(GLEmiter.preEarlyMacros, GLEmiter.lib_Makefile_am)
(GLEmiter.tests_Makefile_am): Likewise.
* pygnulib/GLImport.py (GLImport.gnulib_comp, GLImport.prepare):
Likewise.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Likewise.

12 months agointprops: document fix for GCC bug 68193
Paul Eggert [Wed, 1 May 2024 02:36:43 +0000 (19:36 -0700)]
intprops: document fix for GCC bug 68193

* lib/intprops-internal.h (_GL__GENERIC_BOGUS):
GCC bug 68193 is fixed in GCC 14.  This is just for documentation,
as _GL__GENERIC_BOGUS is not consulted in GCC 14.

12 months ago*printf: Don't invoke gl_PRINTF_DIRECTIVE_N when it's not needed.
Bruno Haible [Tue, 30 Apr 2024 11:35:50 +0000 (13:35 +0200)]
*printf: Don't invoke gl_PRINTF_DIRECTIVE_N when it's not needed.

* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Don't require
gl_PRINTF_DIRECTIVE_N if gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_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.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise.

12 months ago*printf: Avoid a dialog during 'configure' with MSVC in debug mode.
Bruno Haible [Tue, 30 Apr 2024 11:14:31 +0000 (13:14 +0200)]
*printf: Avoid a dialog during 'configure' with MSVC in debug mode.

Suggested by Paul Harris <harris.pc@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-04/msg00005.html>.

* m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): In the test program, include
<crtdbg.h> and disable the MSVC reporting for assertion failures.

12 months agognulib-tool.py: Remove remaining unused instance variables.
Collin Funk [Tue, 30 Apr 2024 08:09:55 +0000 (01:09 -0700)]
gnulib-tool.py: Remove remaining unused instance variables.

* pygnulib/GLModuleSystem.py (GLModule.__init__)
(GLModuleTable.__init__): Remove the unused GLFileSystem variable. These
classes perform lookups with a GLModuleSystem.
* pygnulib/GLTestDir.py (GLTestDir.__init__): Remove the unused
GLFileAssistant variable. The transformations it performs are not needed
in testdirs.

12 months agognulib-tool.py: Add type hints to classes.
Collin Funk [Tue, 30 Apr 2024 05:20:31 +0000 (22:20 -0700)]
gnulib-tool.py: Add type hints to classes.

* pygnulib/*.py: Add type hints for all instance and class variables.
* pygnulib/GLMakefileTable.py (GLMakefileTable.__getitem__): Fix return
type hint since the dictionary has str values.

12 months agognulib-tool.py: Emit libtests in testdirs generated Makefile.am.
Collin Funk [Tue, 30 Apr 2024 05:15:56 +0000 (22:15 -0700)]
gnulib-tool.py: Emit libtests in testdirs generated Makefile.am.

Reported by Bruno Haible in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00463.html>.

* pygnulib/GLTestDir.py (GLTestDir.execute): Modify the GLEmiter's
config variable instead of the GLTestDir's so that it can be accessed
when emitting the Makefile.am.

12 months agodoc: Update macro list in gnulib-cache.m4 documentation.
Collin Funk [Sun, 28 Apr 2024 22:52:27 +0000 (15:52 -0700)]
doc: Update macro list in gnulib-cache.m4 documentation.

* doc/gnulib-tool.texi (Modified imports): Add missing macros from the
sed invocation in func_import of gnulib-tool.sh.

12 months agodoc: Mention AC_CONFIG_MACRO_DIRS in configure.ac.
Collin Funk [Sun, 28 Apr 2024 11:43:39 +0000 (04:43 -0700)]
doc: Mention AC_CONFIG_MACRO_DIRS in configure.ac.

Document the following gnulib-tool change:
2021-12-19  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.

* doc/gnulib-tool.texi (Initial import): Update the example gnulib-tool
invocation. Document the use of AC_CONFIG_MACRO_DIRS as an alternative
to ACLOCAL_AMFLAGS.

12 months agobootstrap: Support checking out a recent GNULIB_REVISION, part 2.
Bruno Haible [Sun, 28 Apr 2024 09:29:27 +0000 (11:29 +0200)]
bootstrap: Support checking out a recent GNULIB_REVISION, part 2.

Reported by Markus Mützel <markus.muetzel@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00507.html>.

* top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): If using a submodule
and the 'git checkout' command fails, fetch the newer commits and then
retry it.
* build-aux/bootstrap: Regenerated.

12 months agognulib-tool: Simplify the Python version test.
Bruno Haible [Sat, 27 Apr 2024 18:33:59 +0000 (20:33 +0200)]
gnulib-tool: Simplify the Python version test.

Suggested by Pádraig Brady in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00469.html>.

* gnulib-tool: Use Python's sys.version_info, not --version.
* gnulib-tool.py: Use the same version test here. Use --version only to
produce a specific error message.

12 months agomaint: be more precise and vague about GCC 14
Paul Eggert [Sat, 27 Apr 2024 23:07:16 +0000 (16:07 -0700)]
maint: be more precise and vague about GCC 14

In commentary, be specific about which particular GCC 14 prerelease is
meant when this matters, and don’t say “GCC 14” otherwise.
Prompted by a remark by Sam James in:
https://lists.gnu.org/r/bug-gnulib/2024-04/msg00484.html

12 months agognulib-tool.py: Preserve module ordering in --create-megatestdir.
Collin Funk [Sat, 27 Apr 2024 22:01:24 +0000 (15:01 -0700)]
gnulib-tool.py: Preserve module ordering in --create-megatestdir.

* pygnulib/GLTestDir.py (GLMegaTestDir.execute): Use a separate set to
remove duplicates from the original list without sorting.

12 months agofcntl-h, stdio, unistd: Ensure off64_t is defined on all platforms.
Bruno Haible [Sat, 27 Apr 2024 17:51:53 +0000 (19:51 +0200)]
fcntl-h, stdio, unistd: Ensure off64_t is defined on all platforms.

* lib/fcntl.in.h: Update comment regarding off64_t.
* lib/stdio.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* tests/test-fcntl-h.c: Verify that off64_t is defined.
* tests/test-stdio.c: Likewise.
* tests/test-unistd.c: Likewise.
* doc/posix-headers/fcntl.texi: Mention the off64_t workaround.
* doc/posix-headers/stdio.texi: Likewise.
* doc/posix-headers/unistd.texi: Likewise.
* doc/posix-headers/aio.texi: Mention the problem with off64_t.

12 months agosys_types: Ensure off64_t is defined on all platforms.
Bruno Haible [Sat, 27 Apr 2024 17:46:34 +0000 (19:46 +0200)]
sys_types: Ensure off64_t is defined on all platforms.

* m4/off64_t.m4: New file.
* m4/sys_types_h.m4 (gl_SYS_TYPES_H): Require gl_TYPE_OFF64_T.
* lib/sys_types.in.h (off64_t): New type.
(GNULIB_defined_off64_t): New macro.
* modules/sys_types (Files): Add m4/off64_t.m4.
(configure.ac-early): Require AC_USE_SYSTEM_EXTENSIONS.
(Makefile.am): Substitute HAVE_OFF64_T.
* tests/test-sys_types.c: Verify that off64_t is defined.
* doc/posix-headers/sys_types.texi: Mention the off64_t workaround.

12 months agonullptr: work around GCC 14 nullptr sentinel bug
Paul Eggert [Sat, 27 Apr 2024 17:31:45 +0000 (10:31 -0700)]
nullptr: work around GCC 14 nullptr sentinel bug

* m4/nullptr.m4 (gl_NULLPTR): Work around GCC bug 114780.

12 months agostddef: work around GCC 14 stddef.h bugs
Paul Eggert [Sat, 27 Apr 2024 16:09:38 +0000 (09:09 -0700)]
stddef: work around GCC 14 stddef.h bugs

* lib/stddef.in.h: Do nothing if _@GUARD_PREFIX@_STDDEF_H is
defined, as stddef.h has already been included.  This works
around GCC bug 114870.
(_GCC_NULLPTR_T): Define if needed to work around GCC bug 114869.
* m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS):
* modules/stddef (stddef.h):
Detect the two bugs.

12 months agobootstrap: Support checking out a recent GNULIB_REVISION.
Bruno Haible [Sat, 27 Apr 2024 17:08:06 +0000 (19:08 +0200)]
bootstrap: Support checking out a recent GNULIB_REVISION.

Reported by Markus Mützel <markus.muetzel@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00462.html>.

* top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): If the
'git checkout' command fails, fetch the newer commits and then retry it.
* build-aux/bootstrap: Regenerated.

12 months agoctime, localtime, tzset, wcsftime: Fix env access (regr. 2024-02-09).
Bruno Haible [Sat, 27 Apr 2024 14:09:55 +0000 (16:09 +0200)]
ctime, localtime, tzset, wcsftime: Fix env access (regr. 2024-02-09).

Reported by Markus Mützel <markus.muetzel@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00457.html>.

* lib/ctime.c (rpl_ctime): Fix logic of environment traversal.
* lib/localtime.c (rpl_localtime): Likewise.
* lib/tzset.c (rpl_tzset): Likewise.
* lib/wcsftime.c (rpl_wcsftime): Likewise.

12 months agologin_tty tests: Avoid gcc warnings.
Bruno Haible [Sat, 27 Apr 2024 00:22:05 +0000 (02:22 +0200)]
login_tty tests: Avoid gcc warnings.

* tests/test-login_tty.c: Include ignore-value.h.
(main): Ignore the results of the freopen calls.
* modules/login_tty-tests (Depends-on): Add ignore-value.

12 months agoDocument prerequisite for gnulib-tool.
Bruno Haible [Fri, 26 Apr 2024 23:10:41 +0000 (01:10 +0200)]
Document prerequisite for gnulib-tool.

Suggested by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00450.html>.

* DEPENDENCIES: Add Python 3.7 as "recommended".

12 months agognulib-tool: Use the Python implementation by default. v1.0
Bruno Haible [Fri, 26 Apr 2024 09:33:06 +0000 (11:33 +0200)]
gnulib-tool: Use the Python implementation by default.

* gnulib-tool: If GNULIB_TOOL_IMPL is not set: Use the Python
implementation if a suitable 'python3' program is found in $PATH;
otherwise print a warning and use the shell implementation.

12 months agognulib-tool.py: Remove some unused instance variables.
Collin Funk [Fri, 26 Apr 2024 08:58:09 +0000 (01:58 -0700)]
gnulib-tool.py: Remove some unused instance variables.

* pygnulib/GLTestDir.py (GLMegaTestDir.__init__): Don't define instance
variables that are never used.

12 months agognulib-tool.py: Reduce code duplication in file name transformations.
Collin Funk [Thu, 25 Apr 2024 22:30:29 +0000 (15:30 -0700)]
gnulib-tool.py: Reduce code duplication in file name transformations.

* pygnulib/functions.py: New file for shared functions between modules.
Add a function based on functions removed from GLImport and GLTestDir.
Accepts a single file name instead of a list.
* pygnulib/GLImport.py (GLImport.prepare): Use the new function.
(GLImport.rewrite_new_files, GLImport.rewrite_old_files): Remove
functions.
* pygnulib/GLTestDir.py (GLTestDir.execute): Use the new function.
(GLTestDir.rewrite_files): Remove functions.
* pygnulib/main.py (main): Remove unused function import. Use the new
function.

12 months agodoc: Remove documentation of IRIX as supported platform.
Bruno Haible [Thu, 25 Apr 2024 20:07:37 +0000 (22:07 +0200)]
doc: Remove documentation of IRIX as supported platform.

* doc/posix-headers/netdb.texi: Don't mention IRIX specific workarounds.
* doc/posix-headers/pthread.texi: Likewise.
* doc/posix-headers/sys_socket.texi: Likewise.
* doc/posix-headers/wctype.texi: Likewise.
* doc/posix-functions/btowc.texi: Likewise.
* doc/posix-functions/cbrtf.texi: Likewise.
* doc/posix-functions/cbrtl.texi: Likewise.
* doc/posix-functions/copysignf.texi: Likewise.
* doc/posix-functions/exp2.texi: Likewise.
* doc/posix-functions/exp2f.texi: Likewise.
* doc/posix-functions/exp2l.texi: Likewise.
* doc/posix-functions/expm1f.texi: Likewise.
* doc/posix-functions/expm1l.texi: Likewise.
* doc/posix-functions/fabsl.texi: Likewise.
* doc/posix-functions/isnan.texi: Likewise.
* doc/posix-functions/iswblank.texi: Likewise.
* doc/posix-functions/link.texi: Likewise.
* doc/posix-functions/log10l.texi: Likewise.
* doc/posix-functions/log1pf.texi: Likewise.
* doc/posix-functions/log2.texi: Likewise.
* doc/posix-functions/log2f.texi: Likewise.
* doc/posix-functions/log2l.texi: Likewise.
* doc/posix-functions/lseek.texi: Likewise.
* doc/posix-functions/nl_langinfo.texi: Likewise.
* doc/posix-functions/pthread_sigmask.texi: Likewise.
* doc/posix-functions/remainderf.texi: Likewise.
* doc/posix-functions/remainderl.texi: Likewise.
* doc/posix-functions/rintf.texi: Likewise.
* doc/posix-functions/sigaltstack.texi: Likewise.
* doc/posix-functions/strtod.texi: Likewise.
* doc/posix-functions/strtold.texi: Likewise.
* doc/posix-functions/vscanf.texi: Likewise.
* doc/posix-functions/wctob.texi: Likewise.
* doc/**/*.texi: Update.

12 months agoHACKING: Fix a typo.
Collin Funk [Thu, 25 Apr 2024 18:45:15 +0000 (11:45 -0700)]
HACKING: Fix a typo.

* HACKING: Add missing 't' to platforms.

12 months agorelocatable-lib-lgpl: Allow unconditional use of set_relocation_prefix.
Bruno Haible [Thu, 25 Apr 2024 12:07:12 +0000 (14:07 +0200)]
relocatable-lib-lgpl: Allow unconditional use of set_relocation_prefix.

Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00384.html>.

* lib/relocatable.h (set_relocation_prefix): Define in a dummy way if
ENABLE_RELOCATABLE is not defined.

12 months agodoc: Update target platforms list.
Bruno Haible [Thu, 25 Apr 2024 07:42:53 +0000 (09:42 +0200)]
doc: Update target platforms list.

* doc/gnulib-intro.texi (Supported Platforms): Mention FreeBSD 14
instead of 13. Mention AIX 7.3 instead of 7.2. Mention Cygwin 3.4.
Don't mention IRIX.
(Formerly Supported Platforms): Add IRIX.

12 months agolargefile: Update documentation.
Bruno Haible [Thu, 25 Apr 2024 07:32:33 +0000 (09:32 +0200)]
largefile: Update documentation.

* doc/largefile.texi: Remove mention of IRIX.

12 months agognulib-tool.py: Add a new GLFileTable class.
Collin Funk [Wed, 24 Apr 2024 23:04:25 +0000 (16:04 -0700)]
gnulib-tool.py: Add a new GLFileTable class.

* pygnulib/GLFileTable.py: New file. Define the GLFileTable class with
five attributes which can be individually typed.
* pygnulib/GLTestDir.py (GLTestDir.execute): Use the GLFileTable class.
* pygnulib/GLImport.py (GLImport.gnulib_comp, GLImport.prepare)
(GLImport.execute): Likewise. Update type hints and doc strings.

12 months agolargefile: port to C++
Paul Eggert [Wed, 24 Apr 2024 21:56:28 +0000 (14:56 -0700)]
largefile: port to C++

This patch is mostly taken from Autoconf master.
* m4/largefile.m4 (AC_SYS_YEAR2038_RECOMMENDED):
Undefine if unpatched Autoconf 2.72 or earlier, so that
later code will redefine it.
The remaining part of this patch is from Autoconf master.
(_AC_SYS_YEAR2038_PROBE, _AC_SYS_LARGEFILE_PROBE):
Put "$CCFLAGS" in diagnostics, not "$CC".
(_AC_SYS_LARGEFILE_OPTIONS): Omit -n32.
(AC_SYS_LARGEFILE_PROBE): Fiddle with CPPFLAGS, not CC.
Do not worry about -n32.

12 months agoc32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14
Paul Eggert [Wed, 24 Apr 2024 19:43:28 +0000 (12:43 -0700)]
c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14

* lib/c32srtombs-state.c (_gl_c32srtombs_state):
* lib/mbsrtoc32s-state.c (_gl_mbsrtoc32s_state):
* lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state):
* lib/wcsrtombs-state.c (_gl_wcsrtombs_state):
Add an extern decl for a “private” extern symbol, to pacify GCC
14’s -Wmissing-variable-declarations option.

12 months agophysmem: Port better to Linux.
Bruno Haible [Wed, 24 Apr 2024 18:24:37 +0000 (20:24 +0200)]
physmem: Port better to Linux.

* lib/physmem.h (physmem_total, physmem_available): Add documentation.
(physmem_claimable): New declaration.
* lib/physmem.c: Include <fcntl.h>, <stdio.h>, full-read.h.
(get_meminfo): New function.
(physmem_claimable): Renamed from physmem_available. Add logic for
aggressivity > 0.
(physmem_available): New function.
* modules/physmem (Depends-on): Add full-read.

12 months agoFix warnings triggered by including <config.h> twice (regr. 2024-04-19).
Bruno Haible [Wed, 24 Apr 2024 17:59:48 +0000 (19:59 +0200)]
Fix warnings triggered by including <config.h> twice (regr. 2024-04-19).

Reported by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00398.html>.

* m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use AH_VERBATIM instead
of AC_DEFINE.

12 months agomanywarnings: update C warnings for GCC 14
Paul Eggert [Wed, 24 Apr 2024 06:18:07 +0000 (23:18 -0700)]
manywarnings: update C warnings for GCC 14

Adjust for C programs compiled by GCC 14.
(A C++ expert still needs to look at manywarnings-c++.m4.)
* build-aux/gcc-warning.spec: Add warnings introduced in GCC 13.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Add -Wflex-array-member-not-at-end, -Wmissing-variable-declarations.

12 months agoUpdate HACKING.
Bruno Haible [Tue, 23 Apr 2024 19:26:20 +0000 (21:26 +0200)]
Update HACKING.

Suggested by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00388.html>.

* HACKING: Mention an alternative to gitk.

12 months agognulib-tool.py: Make better use of imports.
Collin Funk [Tue, 23 Apr 2024 18:28:19 +0000 (11:28 -0700)]
gnulib-tool.py: Make better use of imports.

* pygnulib/*.py: Import functions from constants.py directly instead of
assigning them to module-specific variable. Keep the module prefix for
standard library functions.

12 months agoUpdate HACKING.
Bruno Haible [Tue, 23 Apr 2024 14:58:04 +0000 (16:58 +0200)]
Update HACKING.

* HACKING: Mention the linear git history, how to work with ChangeLog,
how to run a testdir, where to find the gnulib-tool tests, and where are
the continuous integrations.

12 months agognulib-tool: Fix trouble caused by Python's bytecode cache.
Bruno Haible [Mon, 22 Apr 2024 11:12:35 +0000 (13:12 +0200)]
gnulib-tool: Fix trouble caused by Python's bytecode cache.

Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00367.html>.

* gnulib-tool: In sh+py mode, ignore the __pycache__ directory during
comparison.

12 months agognulib-tool.py: Fix trouble caused by Python's bytecode cache.
Bruno Haible [Mon, 22 Apr 2024 11:11:05 +0000 (13:11 +0200)]
gnulib-tool.py: Fix trouble caused by Python's bytecode cache.

Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00367.html>.

* gnulib-tool.py: Set PYTHONPYCACHEPREFIX, so as to avoid creating a
__pycache__ directory in the developer's gnulib checkout (only effective
with Python ≥ 3.8).

12 months agognulib-tool.py: Make temporary directories recognizable.
Collin Funk [Sun, 21 Apr 2024 07:29:50 +0000 (00:29 -0700)]
gnulib-tool.py: Make temporary directories recognizable.

* pygnulib/GLConfig.py (GLConfig.__init__): Pass the 'glpy' prefix to
mkdtemp.

12 months agognulib-tool.sh: In --create-testdir, just warn about a bad module name.
Bruno Haible [Sun, 21 Apr 2024 11:28:57 +0000 (13:28 +0200)]
gnulib-tool.sh: In --create-testdir, just warn about a bad module name.

* gnulib-tool.sh (func_create_testdir): Validate the modules list.

12 months agognulib-tool.py: Don't fail when given a bad module name.
Collin Funk [Sun, 21 Apr 2024 03:29:44 +0000 (20:29 -0700)]
gnulib-tool.py: Don't fail when given a bad module name.

* pygnulib/GLTestDir.py (GLTestDir.execute): Don't include None in the
list of GLModule objects.
* pygnulib/GLModuleSystem.py (GLModuleSystem.find): Document the meaning
of the None return.

12 months agognulib-tool.py: Update type hints and docstring.
Collin Funk [Sun, 21 Apr 2024 02:47:28 +0000 (19:47 -0700)]
gnulib-tool.py: Update type hints and docstring.

* pygnulib/GLImport.py (GLImport.execute): Update transformer type hint
to reflect change from sed expressions to re.sub() arguments.
(GLImport.prepare): Likewise. Don't reference sed or license
replacements in docstring.

12 months agosigned-snan: Relicense under LGPLv2+.
Bruno Haible [Sun, 21 Apr 2024 00:08:06 +0000 (02:08 +0200)]
signed-snan: Relicense under LGPLv2+.

* modules/signed-snan (License): Change to LGPLv2+.
* lib/signed-snan.h: Update license notice.

12 months agosnan: Relicense under LGPLv2+.
Bruno Haible [Sun, 21 Apr 2024 00:06:38 +0000 (02:06 +0200)]
snan: Relicense under LGPLv2+.

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

12 months agosigned-nan: Relicense under LGPLv2+.
Bruno Haible [Sun, 21 Apr 2024 00:01:38 +0000 (02:01 +0200)]
signed-nan: Relicense under LGPLv2+.

* modules/signed-nan (License): Change to LGPLv2+.
* lib/signed-nan.h: Update license notice.

12 months agonan: Relicense under LGPLv2+.
Bruno Haible [Sat, 20 Apr 2024 23:58:39 +0000 (01:58 +0200)]
nan: Relicense under LGPLv2+.

Eric Blake's approval is in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00290.html>.
Paul Eggert's approval is in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00324.html>.
Daniel Richard G.'s approval was given in private email.

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

12 months agognulib-tool: In sh+py mode, don't fail because of dangling symlinks.
Bruno Haible [Sat, 20 Apr 2024 22:27:18 +0000 (00:27 +0200)]
gnulib-tool: In sh+py mode, don't fail because of dangling symlinks.

Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00318.html>
and Pádraig Brady in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00321.html>.

* gnulib-tool: In sh+py mode, use diff option '--no-dereference' if
available.

12 months agognulib-tool.py: Remove duplicate per-module definitions.
Collin Funk [Sat, 20 Apr 2024 06:42:24 +0000 (23:42 -0700)]
gnulib-tool.py: Remove duplicate per-module definitions.

* pygnulib/constants.py: Remove duplicate __authors__, __license__, and
__copyright__ definitions.
* pygnulib/GLInfo.py: Use the value of __authors__ and __copyright__
from __init__.py for output.
* pygnulib/*.py: Remove unused references to the constant.py
definitions.

12 months agognulib-tool.py: Fix a bug in removed / added files handling.
Bruno Haible [Sat, 20 Apr 2024 21:45:59 +0000 (23:45 +0200)]
gnulib-tool.py: Fix a bug in removed / added files handling.

* pygnulib/GLImport.py (GLImport.execute): When looking for files that
are in both filetable['old'] and filetable['new'], consider only the
first element of each tuple, not the entire tuple.

12 months agognulib-tool.py: Sort file lists case-sensitively.
Bruno Haible [Sat, 20 Apr 2024 21:03:18 +0000 (23:03 +0200)]
gnulib-tool.py: Sort file lists case-sensitively.

* pygnulib/GLImport.py (GLImport.prepare, GLImport.execute): Omit
.lower() call in sort key computation.

12 months agognulib-tool.py: Fix output of --create-megatestdir.
Bruno Haible [Sat, 20 Apr 2024 19:55:45 +0000 (21:55 +0200)]
gnulib-tool.py: Fix output of --create-megatestdir.

* pygnulib/GLTestDir.py (GLMegaTestDir.execute): Remove stray backslash
from output.

12 months agowcsstr: Update doc.
Bruno Haible [Sat, 20 Apr 2024 01:45:58 +0000 (03:45 +0200)]
wcsstr: Update doc.

* doc/posix-functions/wcsstr.texi: Update glibc version.

12 months agogetlogin_r tests: Fix compilation error on some OpenSolaris derivatives.
Bruno Haible [Fri, 19 Apr 2024 22:54:53 +0000 (00:54 +0200)]
getlogin_r tests: Fix compilation error on some OpenSolaris derivatives.

* tests/test-getlogin_r.c (getlogin_r): Don't check the signature on
Solaris.

12 months agomemset_explicit: Fix compilation error on some OpenSolaris derivatives.
Bruno Haible [Fri, 19 Apr 2024 22:09:11 +0000 (00:09 +0200)]
memset_explicit: Fix compilation error on some OpenSolaris derivatives.

* m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Arrange to define
__STDC_WANT_LIB_EXT1__ to 1.
* modules/memset_explicit (Depends-on): Add extensions.
* m4/memset_explicit.m4 (gl_FUNC_MEMSET_EXPLICIT): Require
gl_USE_SYSTEM_EXTENSIONS.
* lib/memset_explicit.c (__STDC_WANT_LIB_EXT1__): Remove definition.

12 months agognulib-tool.py: Make use of GLModule's __hash__ method.
Collin Funk [Fri, 19 Apr 2024 19:00:33 +0000 (12:00 -0700)]
gnulib-tool.py: Make use of GLModule's __hash__ method.

* pygnulib/GLModuleSystem.py (GLModuleTable.addUnconditional)
(GLModuleTable.isConditional): Use the GLModule object instead of the
module name directly.
(GLModuleTable.addConditional, GLModuleTable.getCondition): Likewise.
Use a tuple of two GLModule objects as a key for the conditionals
dictionary.

12 months agognulib-tool.py: Simplify data structures for dependencies.
Collin Funk [Fri, 19 Apr 2024 18:32:44 +0000 (11:32 -0700)]
gnulib-tool.py: Simplify data structures for dependencies.

* pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Use a defaultdict
for dependers to remove the base initialization case.
(GLModuleTable.addConditional): Use a set to disallow duplicates instead
of performing list lookups.

12 months agognulib-tool.py: Simplify running some commands in a given directory.
Bruno Haible [Fri, 19 Apr 2024 16:21:26 +0000 (18:21 +0200)]
gnulib-tool.py: Simplify running some commands in a given directory.

* pygnulib/GLImport.py (GLImport.execute): Use sp.call with a cwd
argument, instead of calling chdir twice.
* pygnulib/GLModuleSystem.py (GLModuleSystem.list): Likewise.
* pygnulib/main.py (mode=='find'): Likewise.

12 months agognulib-tool.py: Update authors list.
Bruno Haible [Fri, 19 Apr 2024 15:41:54 +0000 (17:41 +0200)]
gnulib-tool.py: Update authors list.

* pygnulib/constants.py (__author__): Add Collin Funk.
* pygnulib/__init__.py (__copyright__, __author__): Include years and
authors of the gnulib-tool shell script.

12 months agogetpayload* tests: Don't assume that '-' works as expected on NaN.
Bruno Haible [Fri, 19 Apr 2024 15:23:23 +0000 (17:23 +0200)]
getpayload* tests: Don't assume that '-' works as expected on NaN.

* tests/test-getpayload.c: Include signed-nan.h.
(main): Use minus_NaNd.
* tests/test-getpayloadf.c: Include signed-nan.h.
(main): Use minus_NaNf.
* tests/test-getpayloadl.c: Include signed-nan.h.
(main): Use minus_NaNl.
* modules/getpayload-tests (Depends-on): Add signed-nan.
* modules/getpayloadf-tests (Depends-on): Likewise.
* modules/getpayloadl-tests (Depends-on): Likewise.

12 months agosigned-nan: Don't assume that '-' works as expected on NaN values.
Bruno Haible [Fri, 19 Apr 2024 11:57:14 +0000 (13:57 +0200)]
signed-nan: Don't assume that '-' works as expected on NaN values.

* lib/signed-nan.h (minus_NaNf): New function.
(positive_NaNf, negative_NaNf): Use it.
(minus_NaNd): New function.
(positive_NaNd, negative_NaNd): Use it.
(minus_NaNl): New function.
(positive_NaNl, negative_NaNl): Use it.
* tests/test-totalorder.c (TOTALORDER_MINUS): New macro.
* tests/test-totalorderf.c (TOTALORDER_MINUS): New macro.
* tests/test-totalorderl.c (TOTALORDER_MINUS): New macro.
* tests/test-totalorder.h (negative_NaN_with_payload): Use it.
* tests/test-totalordermag.c (TOTALORDER_MINUS): New macro.
* tests/test-totalordermagf.c (TOTALORDER_MINUS): New macro.
* tests/test-totalordermagl.c (TOTALORDER_MINUS): New macro.
* tests/test-totalordermag.h (negative_NaN_with_payload): Use it.

12 months agognulib-tool.py: Add a comment about coding style.
Collin Funk [Thu, 18 Apr 2024 18:03:00 +0000 (11:03 -0700)]
gnulib-tool.py: Add a comment about coding style.

* pygnulib/main.py: Add a note about the common convention of using an
underscore prefix to mark a function/variable as private.

12 months agognulib-tool.py: Remove some unused instance variables.
Collin Funk [Thu, 18 Apr 2024 17:46:33 +0000 (10:46 -0700)]
gnulib-tool.py: Remove some unused instance variables.

* pygnulib/GLModuleSystem.py (GLModuleSystem.__init__)
(GLModule.__init__): Remove unused 'args' instance variable.

12 months agofstatat, stat: document macOS st_ino pipe bug
Paul Eggert [Fri, 19 Apr 2024 07:29:32 +0000 (00:29 -0700)]
fstatat, stat: document macOS st_ino pipe bug

* doc/posix-functions/fstatat.texi (fstatat):
* doc/posix-functions/stat.texi (stat):
Document macOS bug (see <https://bugs.gnu.org/70411>).

12 months agototalordermagl: Add tests.
Bruno Haible [Fri, 19 Apr 2024 00:22:21 +0000 (02:22 +0200)]
totalordermagl: Add tests.

* tests/test-totalordermagl.c: New file, based on
tests/test-totalorderl.c.
* modules/totalordermagl-tests: New file, based on
modules/totalorderl-tests.

12 months agototalordermagl: New module.
Bruno Haible [Fri, 19 Apr 2024 00:22:16 +0000 (02:22 +0200)]
totalordermagl: New module.

* lib/math.in.h (totalordermagl): New declaration.
* lib/totalordermagl.c: New file, based on lib/totalorderl.c.
* m4/math_h.m4 (gl_MATH_H): Test whether totalordermagl is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGL.
(gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGL,
REPLACE_TOTALORDERMAGL.
* modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGL,
HAVE_TOTALORDERMAGL, REPLACE_TOTALORDERMAGL.
* modules/totalordermagl: New file, based on modules/totalorderl.
* doc/posix-functions/totalordermagl.texi: Mention the new module.

12 months agototalordermagf: Add tests.
Bruno Haible [Fri, 19 Apr 2024 00:22:01 +0000 (02:22 +0200)]
totalordermagf: Add tests.

* tests/test-totalordermagf.c: New file, based on
tests/test-totalorderf.c.
* modules/totalordermagf-tests: New file, based on
modules/totalorderf-tests.

12 months agototalordermagf: New module.
Bruno Haible [Fri, 19 Apr 2024 00:21:56 +0000 (02:21 +0200)]
totalordermagf: New module.

* lib/math.in.h (totalordermagf): New declaration.
* lib/totalordermagf.c: New file, based on lib/totalorderf.c.
* m4/math_h.m4 (gl_MATH_H): Test whether totalordermagf is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGF.
(gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGF,
REPLACE_TOTALORDERMAGF.
* modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGF,
HAVE_TOTALORDERMAGF, REPLACE_TOTALORDERMAGF.
* modules/totalordermagf: New file, based on modules/totalorderf.
* doc/posix-functions/totalordermagf.texi: Mention the new module.

12 months agototalordermag: Add tests.
Bruno Haible [Fri, 19 Apr 2024 00:21:34 +0000 (02:21 +0200)]
totalordermag: Add tests.

* tests/test-totalordermag.c: New file, based on
tests/test-totalorder.c.
* tests/test-totalordermag.h: New file, based on
tests/test-totalorder.h.
* modules/totalordermag-tests: New file, based on
modules/totalorder-tests.

12 months agototalordermag: New module.
Bruno Haible [Fri, 19 Apr 2024 00:21:21 +0000 (02:21 +0200)]
totalordermag: New module.

* lib/math.in.h (totalordermag): New declaration.
* lib/totalordermag.c: New file, based on lib/totalorder.c.
* m4/totalordermag.m4: New file, based on m4/totalorder.m4.
* m4/math_h.m4 (gl_MATH_H): Test whether totalordermag is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAG.
(gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAG,
REPLACE_TOTALORDERMAG.
* modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAG,
HAVE_TOTALORDERMAG, REPLACE_TOTALORDERMAG.
* modules/totalordermag: New file, based on modules/totalorder.
* doc/posix-functions/totalordermag.texi: Mention the new module.

12 months agosetpayloadsig*: Support newer MIPS CPUs.
Bruno Haible [Fri, 19 Apr 2024 00:14:45 +0000 (02:14 +0200)]
setpayloadsig*: Support newer MIPS CPUs.

* lib/setpayloadsig.c (setpayloadsig): On MIPS CPUs with MIPS_NAN2008_DOUBLE,
reject a zero payload.
* lib/setpayloadsigf.c (setpayloadsigf): On MIPS CPUs with MIPS_NAN2008_FLOAT,
reject a zero payload.
* lib/setpayloadsigl.c (setpayloadsigl): On MIPS CPUs with
MIPS_NAN2008_LONG_DOUBLE, reject a zero payload.