]> Savannah Git Hosting - gnulib.git/log
gnulib.git
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.

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

* lib/setpayload.c (setpayload): On MIPS CPUs with MIPS_NAN2008_DOUBLE,
accept a zero payload.
* lib/setpayloadf.c (setpayloadf): On MIPS CPUs with MIPS_NAN2008_FLOAT,
accept a zero payload.
* lib/setpayloadl.c (setpayloadl): On MIPS CPUs with
MIPS_NAN2008_LONG_DOUBLE, accept a zero payload.
* m4/setpayload.m4 (gl_FUNC_SETPAYLOADF, gl_FUNC_SETPAYLOAD,
gl_FUNC_SETPAYLOADL): Invoke gl_NAN_MIPS.
* modules/setpayload (Files): Add m4/nan-mips.m4.
* modules/setpayloadf (Files): Likewise.
* modules/setpayloadl (Files): Likewise.

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

* lib/totalorder.c (totalorder): On MIPS CPUs with MIPS_NAN2008_DOUBLE,
don't invert the most significant bit of the mantissa field.
* lib/totalorderf.c (totalorderf): On MIPS CPUs with MIPS_NAN2008_FLOAT,
don't invert the most significant bit of the mantissa field.
* lib/totalorderl.c (totalorderl): On MIPS CPUs with
MIPS_NAN2008_LONG_DOUBLE, don't invert the most significant bit of the
mantissa field.
* m4/totalorder.m4 (gl_FUNC_TOTALORDERF, gl_FUNC_TOTALORDER,
gl_FUNC_TOTALORDERL): Invoke gl_NAN_MIPS.
* modules/totalorder (Files): Add m4/nan-mips.m4.
* modules/totalorderf (Files): Likewise.
* modules/totalorderl (Files): Likewise.

12 months agosnan: Add support for m68k.
Bruno Haible [Fri, 19 Apr 2024 00:13:30 +0000 (02:13 +0200)]
snan: Add support for m68k.

* lib/snan.h (construct_memory_SNaNl): Handle m68k specially.

12 months agototalorderl: Simplify on MSVC.
Bruno Haible [Thu, 18 Apr 2024 14:29:28 +0000 (16:29 +0200)]
totalorderl: Simplify on MSVC.

* lib/totalorderl.c (totalorderl): If 'long double' is the same as
'double', just invoke totalorder. Otherwise, drop the optimized code
for small 'long double' since it does not occur on any platform.
* m4/totalorder.m4 (gl_FUNC_TOTALORDERL): Require
gl_LONG_DOUBLE_VS_DOUBLE. If 'long double' is the same as 'double', use
TOTALORDER_LIBM.
* modules/totalorderl (Depends-on): Add totalorder.

12 months agosignbit: Fix typos.
Bruno Haible [Thu, 18 Apr 2024 13:11:06 +0000 (15:11 +0200)]
signbit: Fix typos.

* lib/signbitd.c: Fix typo in comment.
* lib/signbitf.c: Likewise.

12 months agognulib-tool.py: Ignore 'attribute-defined-outside-init' warnings.
Collin Funk [Wed, 17 Apr 2024 23:20:32 +0000 (16:20 -0700)]
gnulib-tool.py: Ignore 'attribute-defined-outside-init' warnings.

* pygnulib/.pylintrc: Add W0201 to the disabled warnings.
See discussion here:
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00275.html>

12 months agototalorder* tests: Strengthen tests.
Bruno Haible [Wed, 17 Apr 2024 23:34:02 +0000 (01:34 +0200)]
totalorder* tests: Strengthen tests.

* tests/test-totalorder.h: Include <math.h>.
(positive_NaN_with_payload, negative_NaN_with_payload): New functions.
(main): Test quiet NaNs of each sign with different payload.
* tests/test-totalorder.c (TOTALORDER_POSITIVE_NAN,
TOTALORDER_NEGATIVE_NAN): Remove macros.
(TOTALORDER_SETPAYLOAD): New macro.
* tests/test-totalorderf.c (TOTALORDER_POSITIVE_NAN,
TOTALORDER_NEGATIVE_NAN): Remove macros.
(TOTALORDER_SETPAYLOAD): New macro.
* tests/test-totalorderl.c (TOTALORDER_POSITIVE_NAN,
TOTALORDER_NEGATIVE_NAN): Remove macros.
(TOTALORDER_SETPAYLOAD): New macro.
* modules/totalorder-tests (Depends-on): Add setpayload.
(Makefile.am): Link test-totalorder with $(SETPAYLOAD_LIBM).
* modules/totalorderf-tests (Depends-on): Add setpayloadf.
(Makefile.am): Link test-totalorderf with $(SETPAYLOADF_LIBM).
* modules/totalorderl-tests (Depends-on): Add setpayloadl.
(Makefile.am): Link test-totalorderl with $(SETPAYLOADL_LIBM).

12 months agognulib-tool.py: Use same warning style as gnulib-tool.sh.
Bruno Haible [Wed, 17 Apr 2024 22:44:19 +0000 (00:44 +0200)]
gnulib-tool.py: Use same warning style as gnulib-tool.sh.

* pygnulib/GLTestDir.py (GLTestDir.execute): Prefix the
"incompatible license" message with "gnulib-tool: warning: ".

12 months agostdio, utime-h: Fix more linkage errors when using C++.
Bruno Haible [Wed, 17 Apr 2024 22:21:18 +0000 (00:21 +0200)]
stdio, utime-h: Fix more linkage errors when using C++.

* lib/stdio.in.h (rpl_fwrite, rpl_fwrite_unlocked): Use _GL_EXTERN_C
instead of extern.
* lib/utime.in.h (_gl_utimens_windows): Likewise.

12 months agoFix linkage errors when using C++.
Bruno Haible [Wed, 17 Apr 2024 22:28:40 +0000 (00:28 +0200)]
Fix linkage errors when using C++.

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

* lib/acl.h: Add 'extern "C" {' / '}' boilerplate.
* lib/alignalloc.h: Likewise.
* lib/aligned-malloc.h: Likewise.
* lib/allocator.h: Likewise.
* lib/arcfour.h: Likewise.
* lib/arctwo.h: Likewise.
* lib/areadlink.h: Likewise.
* lib/argv-iter.h: Likewise.
* lib/argz.in.h: Likewise.
* lib/binary-io.h: Likewise.
* lib/bitrotate.h: Likewise.
* lib/bitset.h: Likewise.
* lib/bitsetv.h: Likewise.
* lib/c-strcaseeq.h: Likewise.
* lib/canon-host.h: Likewise.
* lib/careadlinkat.h: Likewise.
* lib/chdir-long.h: Likewise.
* lib/check-version.h: Likewise.
* lib/classpath.h: Likewise.
* lib/cloexec.h: Likewise.
* lib/close-stream.h: Likewise.
* lib/crc.h: Likewise.
* lib/csharpcomp.h: Likewise.
* lib/csharpexec.h: Likewise.
* lib/cycle-check.h: Likewise.
* lib/des.h: Likewise.
* lib/dev-ino.h: Likewise.
* lib/di-set.h: Likewise.
* lib/eealloc.h: Likewise.
* lib/exclude.h: Likewise.
* lib/execinfo.in.h: Likewise.
* lib/execute.h: Likewise.
* lib/exitfail.h: Likewise.
* lib/fcntl-safer.h: Likewise.
* lib/file-set.h: Likewise.
* lib/file-type.h: Likewise.
* lib/filenamecat.h: Likewise.
* lib/filevercmp.h: Likewise.
* lib/fpending.h: Likewise.
* lib/fprintftime.h: Likewise.
* lib/fpucw.h: Likewise.
* lib/fsusage.h: Likewise.
* lib/ftoastr.h: Likewise.
* lib/full-read.h: Likewise.
* lib/gc.h: Likewise.
* lib/getndelim2.h: Likewise.
* lib/getnline.h: Likewise.
* lib/getugroups.h: Likewise.
* lib/glthread/tls.h: Likewise.
* lib/hamt.h: Likewise.
* lib/hard-locale.h: Likewise.
* lib/hash-pjw-bare.h: Likewise.
* lib/hash-pjw.h: Likewise.
* lib/hash-triple.h: Likewise.
* lib/hmac.h: Likewise.
* lib/human.h: Likewise.
* lib/i-ring.h: Likewise.
* lib/idcache.h: Likewise.
* lib/idx.h: Likewise.
* lib/ino-map.h: Likewise.
* lib/inttostr.h: Likewise.
* lib/isapipe.h: Likewise.
* lib/javacomp.h: Likewise.
* lib/javaexec.h: Likewise.
* lib/jit/cache.h: Likewise.
* lib/linebuffer.h: Likewise.
* lib/localeinfo.h: Likewise.
* lib/long-options.h: Likewise.
* lib/mbchar.h: Likewise.
* lib/mbfile.h: Likewise.
* lib/mbiter.h: Likewise.
* lib/mbiterf.h: Likewise.
* lib/mbuiter.h: Likewise.
* lib/mbuiterf.h: Likewise.
* lib/mcel.h: Likewise.
* lib/memcasecmp.h: Likewise.
* lib/memcoll.h: Likewise.
* lib/memxor.h: Likewise.
* lib/mgetgroups.h: Likewise.
* lib/mkdir-p.h: Likewise.
* lib/modechange.h: Likewise.
* lib/mountlist.h: Likewise.
* lib/mpsort.h: Likewise.
* lib/msvc-nothrow.h: Likewise.
* lib/nan.h: Likewise.
* lib/openat-priv.h: Likewise.
* lib/openat.h: Likewise.
* lib/opendirat.h: Likewise.
* lib/pagealign_alloc.h: Likewise.
* lib/parse-datetime.h: Likewise.
* lib/parse-duration.h: Likewise.
* lib/physmem.h: Likewise.
* lib/posixtm.h: Likewise.
* lib/posixver.h: Likewise.
* lib/printf-frexp.h: Likewise.
* lib/printf-frexpl.h: Likewise.
* lib/priv-set.h: Likewise.
* lib/quote.h: Likewise.
* lib/quotearg.h: Likewise.
* lib/read-file.h: Likewise.
* lib/readline.h: Likewise.
* lib/readtokens.h: Likewise.
* lib/readtokens0.h: Likewise.
* lib/regex-quote.h: Likewise.
* lib/renameatu.h: Likewise.
* lib/rijndael-alg-fst.h: Likewise.
* lib/rijndael-api-fst.h: Likewise.
* lib/safe-alloc.h: Likewise.
* lib/safe-write.h: Likewise.
* lib/same-inode.h: Likewise.
* lib/same.h: Likewise.
* lib/save-cwd.h: Likewise.
* lib/savedir.h: Likewise.
* lib/savewd.h: Likewise.
* lib/selinux-at.h: Likewise.
* lib/signed-nan.h: Likewise.
* lib/signed-snan.h: Likewise.
* lib/snan.h: Likewise.
* lib/sockets.h: Likewise.
* lib/stdio-safer.h: Likewise.
* lib/stdlib-safer.h: Likewise.
* lib/streq.h: Likewise.
* lib/strerror-override.h: Likewise.
* lib/tmpdir.h: Likewise.
* lib/trim.h: Likewise.
* lib/u64.h: Likewise.
* lib/unicase/casefold.h: Likewise.
* lib/unicase/caseprop.h: Likewise.
* lib/unicase/invariant.h: Likewise.
* lib/unicase/special-casing.in.h: Likewise.
* lib/unicase/unicasemap.h: Likewise.
* lib/unicodeio.h: Likewise.
* lib/unilbrk/lbrktables.h: Likewise.
* lib/unilbrk/ulc-common.h: Likewise.
* lib/uninorm/decompose-internal.h: Likewise.
* lib/unistd-safer.h: Likewise.
* lib/unitypes.in.h: Likewise.
* lib/uniwbrk/wbrktable.h: Likewise.
* lib/unlinkdir.h: Likewise.
* lib/userspec.h: Likewise.
* lib/utimecmp.h: Likewise.
* lib/utimens.h: Likewise.
* lib/windows-spawn.h: Likewise.
* lib/write-any-file.h: Likewise.
* lib/xbinary-io.h: Likewise.
* lib/xgetcwd.h: Likewise.
* lib/xgetdomainname.h: Likewise.
* lib/xgethostname.h: Likewise.
* lib/xmemcoll.h: Likewise.
* lib/xprintf.h: Likewise.
* lib/xreadlink.h: Likewise.
* lib/xsize.h: Likewise.
* lib/xstrndup.h: Likewise.
* lib/xstrtod.h: Likewise.
* lib/xstrtol.h: Likewise.
* lib/yesno.h: Likewise.
* lib/isnand-nolibm.h (isnand): Declare with C linkage.
* lib/isnanf-nolibm.h (isnanf): Likewise.
* lib/isnanl-nolibm.h (isnanl): Likewise.

12 months agognulib-tool.py: Make an instance variable local to a function.
Collin Funk [Wed, 17 Apr 2024 18:47:16 +0000 (11:47 -0700)]
gnulib-tool.py: Make an instance variable local to a function.

* pygnulib/GLImport.py (GLImport.execute): Define the GLFileAssistant as
local to this function because it is unused elsewhere.

12 months agognulib-tool.py: Remove an unused instance attribute.
Collin Funk [Wed, 17 Apr 2024 18:34:07 +0000 (11:34 -0700)]
gnulib-tool.py: Remove an unused instance attribute.

* pygnulib/GLImport.py (GLImport.__init__): Remove the unused
GLFileSystem object.

12 months agognulib-tool.py: Fix a pylint 'attribute-defined-outside-init' warning.
Collin Funk [Wed, 17 Apr 2024 03:21:04 +0000 (20:21 -0700)]
gnulib-tool.py: Fix a pylint 'attribute-defined-outside-init' warning.

* pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Don't
define a 'modules' attribute since it is never used.

12 months agogetpayloadl: Add tests.
Bruno Haible [Wed, 17 Apr 2024 09:09:13 +0000 (11:09 +0200)]
getpayloadl: Add tests.

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

12 months agogetpayloadl: New module.
Bruno Haible [Wed, 17 Apr 2024 09:08:40 +0000 (11:08 +0200)]
getpayloadl: New module.

* lib/math.in.h (getpayloadl): New declaration.
* lib/getpayloadl.c: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether getpayloadl is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOADL.
(gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOADL, REPLACE_GETPAYLOADL.
* modules/math (Makefile.am): Substitute GNULIB_GETPAYLOADL,
HAVE_GETPAYLOADL, REPLACE_GETPAYLOADL.
* modules/getpayloadl: New file.
* doc/posix-functions/getpayloadl.texi: Mention the new module and the
glibc bug.

12 months agogetpayloadf: Add tests.
Bruno Haible [Wed, 17 Apr 2024 09:03:53 +0000 (11:03 +0200)]
getpayloadf: Add tests.

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

12 months agogetpayloadf: New module.
Bruno Haible [Wed, 17 Apr 2024 09:02:52 +0000 (11:02 +0200)]
getpayloadf: New module.

* lib/math.in.h (getpayloadf): New declaration.
* lib/getpayloadf.c: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether getpayloadf is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOADF.
(gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOADF, REPLACE_GETPAYLOADF.
* modules/math (Makefile.am): Substitute GNULIB_GETPAYLOADF,
HAVE_GETPAYLOADF, REPLACE_GETPAYLOADF.
* modules/getpayloadf: New file.
* doc/posix-functions/getpayloadf.texi: Mention the new module and the
glibc bug.

12 months agogetpayload: Add tests.
Bruno Haible [Wed, 17 Apr 2024 08:58:47 +0000 (10:58 +0200)]
getpayload: Add tests.

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

12 months agogetpayload: New module.
Bruno Haible [Wed, 17 Apr 2024 08:57:05 +0000 (10:57 +0200)]
getpayload: New module.

* lib/math.in.h (getpayload): New declaration.
* lib/getpayload.c: New file.
* m4/getpayload.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether getpayload is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOAD.
(gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOAD, REPLACE_GETPAYLOAD.
* modules/math (Makefile.am): Substitute GNULIB_GETPAYLOAD,
HAVE_GETPAYLOAD, REPLACE_GETPAYLOAD.
* modules/getpayload: New file.
* doc/posix-functions/getpayload.texi: Mention the new module and the
glibc bug.

12 months agowchar: Fix serial number.
Sam James [Wed, 17 Apr 2024 00:47:56 +0000 (02:47 +0200)]
wchar: Fix serial number.

* m4/wchar_h.m4: Remove duplicate serial number specification and
increment serial.

Copyright-paperwork-exempt: Yes

12 months agognulib-tool.py: Make GLModule's __eq__ and __hash__ method agree.
Collin Funk [Tue, 16 Apr 2024 19:13:08 +0000 (12:13 -0700)]
gnulib-tool.py: Make GLModule's __eq__ and __hash__ method agree.

* pygnulib/GLModuleSystem.py (GLModuleTable.__hash__): Only use the
module name in hash computations.

12 months agosetpayloadsigl: Add tests.
Bruno Haible [Tue, 16 Apr 2024 19:29:16 +0000 (21:29 +0200)]
setpayloadsigl: Add tests.

* tests/test-setpayloadsigl.c: New file, based on
tests/test-setpayloadl.c.
* modules/setpayloadsigl-tests: New file.

12 months agosetpayloadsigl: New module.
Bruno Haible [Tue, 16 Apr 2024 19:28:42 +0000 (21:28 +0200)]
setpayloadsigl: New module.

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

12 months agosetpayloadsigf: Add tests.
Bruno Haible [Tue, 16 Apr 2024 19:15:16 +0000 (21:15 +0200)]
setpayloadsigf: Add tests.

* tests/test-setpayloadf.c (PAYLOAD_BITS): New macro.
(main): Use it.
* tests/test-setpayloadsigf.c: New file, based on
tests/test-setpayloadf.c.
* modules/setpayloadsigf-tests: New file.

12 months agosetpayloadsigf: New module.
Bruno Haible [Tue, 16 Apr 2024 19:12:39 +0000 (21:12 +0200)]
setpayloadsigf: New module.

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

12 months agosetpayloadsig: Add tests.
Bruno Haible [Tue, 16 Apr 2024 19:06:20 +0000 (21:06 +0200)]
setpayloadsig: Add tests.

* tests/test-setpayload.c (PAYLOAD_BITS): New macro.
(main): Use it.
* tests/test-setpayloadsig.c: New file, based on
tests/test-setpayload.c.
* modules/setpayloadsig-tests: New file.

12 months agosetpayloadsig: New module.
Bruno Haible [Tue, 16 Apr 2024 19:01:17 +0000 (21:01 +0200)]
setpayloadsig: New module.

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

12 months agosetpayloadl: Fix platform-specific bugs.
Bruno Haible [Tue, 16 Apr 2024 22:38:07 +0000 (00:38 +0200)]
setpayloadl: Fix platform-specific bugs.

* lib/setpayloadl.c (setpayloadl): On m68k, consider the actual memory
layout of a 'long double'. On platforms with quadruple-precision
'long double', store 111 bits of payload, not only 110 bits.

12 months agognulib-tool.py: Prefer 'not in' over 'not ... in'.
Collin Funk [Tue, 16 Apr 2024 15:36:55 +0000 (08:36 -0700)]
gnulib-tool.py: Prefer 'not in' over 'not ... in'.

* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Change conditional.
* pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Likewise.

12 months agognulib-tool.py: Make data structures more clear.
Collin Funk [Tue, 16 Apr 2024 15:21:27 +0000 (08:21 -0700)]
gnulib-tool.py: Make data structures more clear.

* pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Use a set to
represent the unconditional modules instead of a dictionary. Remove
redundant comments.
(GLModuleTable.addUnconditional): Add the module to a set instead of
using it as a key to the dictionary.

12 months agosetpayloadl: Add tests.
Bruno Haible [Tue, 16 Apr 2024 12:58:57 +0000 (14:58 +0200)]
setpayloadl: Add tests.

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

12 months agosetpayloadl: New module.
Bruno Haible [Tue, 16 Apr 2024 12:57:25 +0000 (14:57 +0200)]
setpayloadl: New module.

* lib/math.in.h (setpayloadl): New declaration.
* lib/setpayloadl.c: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether setpayloadl is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADL.
(gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADL.
* modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADL,
HAVE_SETPAYLOADL.
* modules/setpayloadl: New file.
* doc/posix-functions/setpayloadl.texi: Mention the new module.

12 months agosetpayloadf: Add tests.
Bruno Haible [Tue, 16 Apr 2024 12:40:37 +0000 (14:40 +0200)]
setpayloadf: Add tests.

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

12 months agosetpayloadf: New module.
Bruno Haible [Tue, 16 Apr 2024 12:39:16 +0000 (14:39 +0200)]
setpayloadf: New module.

* lib/math.in.h (setpayloadf): New declaration.
* lib/setpayloadf.c: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether setpayloadf is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADF.
(gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADF.
* modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADF,
HAVE_SETPAYLOADF.
* modules/setpayloadf: New file.
* doc/posix-functions/setpayloadf.texi: Mention the new module.

12 months agosetpayload: Add tests.
Bruno Haible [Tue, 16 Apr 2024 12:29:16 +0000 (14:29 +0200)]
setpayload: Add tests.

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

12 months agosetpayload: New module.
Bruno Haible [Tue, 16 Apr 2024 12:25:27 +0000 (14:25 +0200)]
setpayload: New module.

* lib/math.in.h (setpayload): New declaration.
* lib/setpayload.c: New file.
* m4/setpayload.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether setpayload is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOAD.
(gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOAD.
* modules/math (Makefile.am): Substitute GNULIB_SETPAYLOAD,
HAVE_SETPAYLOAD.
* modules/setpayload: New file.
* doc/posix-functions/setpayload.texi: Mention the new module.

12 months agognulib-tool.py: Optimize directory creation.
Collin Funk [Mon, 15 Apr 2024 16:16:25 +0000 (09:16 -0700)]
gnulib-tool.py: Optimize directory creation.

* pygnulib/GLTestDir.py (GLTestDir.execute): Use a list of possible
subdirectories and create them upfront instead of checking every file.

12 months agogitlog-to-changelog: Revert 2024-04-12 fix and add documentation.
Simon Josefsson [Mon, 15 Apr 2024 15:47:52 +0000 (17:47 +0200)]
gitlog-to-changelog: Revert 2024-04-12 fix and add documentation.

* build-aux/gitlog-to-changelog: Use localtime.
* doc/gitlog-to-changelog.texi: Add.
* doc/gnulib.texi (Build Infrastructure Modules): Add.

12 months agognulib-tool.py: Fix incorrect type hint.
Collin Funk [Sun, 14 Apr 2024 20:41:17 +0000 (13:41 -0700)]
gnulib-tool.py: Fix incorrect type hint.

* pygnulib/constants.py (filter_filelist): Correct the type hint on the
'filelist' argument. It is a list of strings, not a string.

12 months agognulib-tool.py: Write newlines consistently.
Collin Funk [Sun, 14 Apr 2024 17:31:34 +0000 (10:31 -0700)]
gnulib-tool.py: Write newlines consistently.

* pygnulib/constants.py (NL): Remove variable.
* pygnulib/GLImport.py (GLImport.gnulib_comp): Use '\n' instead of
constants.NL.
* pygnulib/GLModuleSystem.py
(GLModule.getAutomakeSnippet_Unconditional): Likewise.
* pygnulib/main.py (main_with_exception_handling): Likewise.

12 months agognulib-tool.py: Don't perform newline conversions.
Collin Funk [Sun, 14 Apr 2024 17:18:03 +0000 (10:18 -0700)]
gnulib-tool.py: Don't perform newline conversions.

* pygnulib/constants.py (nlconvert): Remove function. Remove unused
platform import.
* pygnulib/GLImport.py (GLImport.gnulib_cache): Remove calls to
nlconvert().
* pygnulib/GLModuleSystem.py
(GLModule.getAutomakeSnippet_Unconditional): Likewise.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Likewise.

12 months agousers.txt: Update some more entries.
Bruno Haible [Sun, 14 Apr 2024 20:43:35 +0000 (22:43 +0200)]
users.txt: Update some more entries.

* users.txt: Remove cvsps, gpg, gtkreindeer, libvirt, mailfromd, msmtp,
OPeNDAP. Update some existing entries.

12 months agognulib-tool.py: Remove some unused variable assignments.
Collin Funk [Sun, 14 Apr 2024 16:37:17 +0000 (09:37 -0700)]
gnulib-tool.py: Remove some unused variable assignments.

* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Remove unused
variable.
* pygnulib/GLInfo.py (GLInfo.date, GLInfo.version): Remove assignments
to variables unconditionally set in try, except blocks.
* pygnulib/GLModuleSystem.py (GLModule.getConditionalName)
(GLModule.getShellFunc, GLModule.getShellVar): Likewise.

12 months agognulib-tool.py: Don't use mutable default arguments.
Collin Funk [Sun, 14 Apr 2024 01:51:06 +0000 (18:51 -0700)]
gnulib-tool.py: Don't use mutable default arguments.

* pygnulib/GLFileSystem.py (GLFileAssistant.__init__): Set the default
argument for 'transformers' to None. If it is None then set it to an
empty dictionary in the body.

12 months agobootstrap: Implement phase 1 as documented in the --help output.
Bruno Haible [Sat, 13 Apr 2024 23:38:42 +0000 (01:38 +0200)]
bootstrap: Implement phase 1 as documented in the --help output.

Reported by Simon Josefsson as bug #1 in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00152.html>.

* top/bootstrap: Correct indentation.
* top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): Implement as
documented:
If GNULIB_SRCDIR and GNULIB_REVISION are set and there is a 'gnulib'
submodule, checkout the revision GNULIB_REVISION.
If GNULIB_SRCDIR and GNULIB_REVISION are set and --no-git is specified,
don't checkout the revision GNULIB_REVISION.

12 months agobootstrap: Simplify git submodule initialization.
Bruno Haible [Sat, 13 Apr 2024 22:08:50 +0000 (00:08 +0200)]
bootstrap: Simplify git submodule initialization.

* top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): Err out if git is
older than version 1.6.4. Remove fallback code for older versions.
* build-aux/bootstrap: Regenerated.

12 months agoImprove 'git diff' of Python files.
Collin Funk [Sat, 13 Apr 2024 18:16:44 +0000 (11:16 -0700)]
Improve 'git diff' of Python files.

* .gitattributes: Add a rule for *.py files.

12 months agognulib-tool.py: Fix extra arguments to function call.
Collin Funk [Sat, 13 Apr 2024 17:09:17 +0000 (10:09 -0700)]
gnulib-tool.py: Fix extra arguments to function call.

* pygnulib/GLImport.py (GLImport.execute): Add the missing joinpath call
on two file name components before calling isfile().

12 months agobootstrap: Fix --help messages.
Bruno Haible [Sat, 13 Apr 2024 15:23:48 +0000 (17:23 +0200)]
bootstrap: Fix --help messages.

Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00162.html>.

* top/bootstrap (usage): Fix the description of GNULIB_SRCDIR. Document
GNULIB_REFDIR. Use full-sentences style. Tweak wording.
* top/bootstrap-funclib.sh (autopull_usage): Clarify the phase. Don't
mention nonexistent options --gnulib-srcdir and --gnulib-refdir. Use
full-sentences style.
(autogen_usage): Clarify the phase. Use full-sentences style.
* build-aux/bootstrap: Regenerated.