]> git.ipfire.org Git - thirdparty/gnulib.git/log
thirdparty/gnulib.git
2 years 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.

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

2 years 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 years 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().

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

2 years agognulib-tool.py: Code tweak.
Bruno Haible [Sat, 13 Apr 2024 11:30:44 +0000 (13:30 +0200)] 
gnulib-tool.py: Code tweak.

* pygnulib/main.py (main): Move file contents analysis out of a 'with'
statement.

2 years agognulib-tool.py: Stop using codecs.open.
Bruno Haible [Sat, 13 Apr 2024 10:55:44 +0000 (12:55 +0200)] 
gnulib-tool.py: Stop using codecs.open.

* pygnulib/*.py: To open a file, consistently use
open(..., mode='[rwa]', newline='\n', encoding='utf-8').

2 years agognulib-tool.py: Refactor directory tree removals.
Bruno Haible [Sat, 13 Apr 2024 10:06:34 +0000 (12:06 +0200)] 
gnulib-tool.py: Refactor directory tree removals.

* pygnulib/constants.py (rmtree): New function.
* pygnulib/GLImport.py (GLImport.execute): Use it instead of calling
'rm -rf' directly or shutil.rmtree.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Likewise.
* pygnulib/main.py (main): Likewise.

2 years agognulib-tool.py: Update TODO list.
Bruno Haible [Sat, 13 Apr 2024 01:52:23 +0000 (03:52 +0200)] 
gnulib-tool.py: Update TODO list.

2 years agognulib-tool.py: Fix --copy-file directory creation.
Collin Funk [Sat, 13 Apr 2024 01:34:49 +0000 (18:34 -0700)] 
gnulib-tool.py: Fix --copy-file directory creation.

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

* pygnulib/main.py (main): Make sure that destdir is set in the GLConfig
object before copying files.

2 years agognulib-tool.py: Implement --add-import --with-*-tests correctly.
Bruno Haible [Fri, 12 Apr 2024 23:23:11 +0000 (01:23 +0200)] 
gnulib-tool.py: Implement --add-import --with-*-tests correctly.

* pygnulib/GLConfig.py (GLConfig.update): Use list-merging for the test
categories.
* pygnulib/GLImport.py (GLImport.__init__): Don't merge back those
values which were already considered by taking the union.

2 years agognulib-tool.py: Implement --add-import --avoid correctly.
Bruno Haible [Fri, 12 Apr 2024 22:53:05 +0000 (00:53 +0200)] 
gnulib-tool.py: Implement --add-import --avoid correctly.

* pygnulib/GLConfig.py (GLConfig.update): Don't test for the unused key
'tests'.
(GLConfig.default): Likewise.
* pygnulib/GLImport.py (GLImport.__init__): Don't merge back those
values which were already considered by taking the union.

2 years agognulib-tool.py: Implement --add-import --avoid correctly.
Bruno Haible [Fri, 12 Apr 2024 22:49:50 +0000 (00:49 +0200)] 
gnulib-tool.py: Implement --add-import --avoid correctly.

* pygnulib/GLConfig.py (GLConfig.update): Don't test for the unused key
'tests'.
* pygnulib/GLImport.py (GLImport.__init__): Don't merge back those
values which were already considered by taking the union.

2 years agognulib-tool.py: Refactor.
Bruno Haible [Fri, 12 Apr 2024 22:24:52 +0000 (00:24 +0200)] 
gnulib-tool.py: Refactor.

* pygnulib/GLConfig.py (GLConfig.update, GLConfig.update_key): Improve
variable names and comments.
* pygnulib/GLImport.py (GLImport.__init__): Improve comments.

2 years agognulib-tool.py: Optimize.
Bruno Haible [Fri, 12 Apr 2024 22:10:44 +0000 (00:10 +0200)] 
gnulib-tool.py: Optimize.

* pygnulib/GLConfig.py (GLConfig.update, GLConfig.update_key): Avoid
useless cloning of dictionaries.

2 years agognulib-tool.py: Update TODO list.
Bruno Haible [Fri, 12 Apr 2024 20:37:35 +0000 (22:37 +0200)] 
gnulib-tool.py: Update TODO list.

2 years agognulib-tool.py: Implement --no-conditional-dependencies correctly.
Bruno Haible [Fri, 12 Apr 2024 20:36:21 +0000 (22:36 +0200)] 
gnulib-tool.py: Implement --no-conditional-dependencies correctly.

* pygnulib/GLConfig.py (GLConfig.default): For 'conddeps', return None,
not False.
(GLConfig.checkCondDeps): Update result type.
(resetCondDeps): Reset to return None, not False.
* pygnulib/GLImport.py (GLImport.actioncmd): Update.

2 years agognulib-tool.py: Implement --no-conditional-dependencies correctly.
Bruno Haible [Fri, 12 Apr 2024 20:21:57 +0000 (22:21 +0200)] 
gnulib-tool.py: Implement --no-conditional-dependencies correctly.

* pygnulib/GLConfig.py (GLConfig.default): For 'conddeps', return None,
not False.
(GLConfig.checkCondDeps): Update result type.
(resetCondDeps): Reset to return None, not False.
* pygnulib/GLImport.py (GLImport.actioncmd): Update.

2 years agognulib-tool.py: Implement --no-libtool option correctly.
Bruno Haible [Fri, 12 Apr 2024 20:10:54 +0000 (22:10 +0200)] 
gnulib-tool.py: Implement --no-libtool option correctly.

* pygnulib/GLConfig.py (GLConfig.default): For 'libtool', return None,
not False.
(GLConfig.checkLibtool): Update result type.
(resetLibtool): Reset to return None, not False.
* pygnulib/GLImport.py (GLImport.actioncmd): Update.

2 years agognulib-tool.py: Accept conditional dependencies with tests.
Bruno Haible [Fri, 12 Apr 2024 17:10:33 +0000 (19:10 +0200)] 
gnulib-tool.py: Accept conditional dependencies with tests.

* pygnulib/GLImport.py (GLImport.__init__): Don't reject the combination
of gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS.
* pygnulib/GLError.py (GLError.__repr__): Remove error 10.
* pygnulib/main.py (main_with_exception_handling): Likewise.

2 years agognulib-tool.py: Fix handling of --with-obsolete.
Bruno Haible [Fri, 12 Apr 2024 16:11:46 +0000 (18:11 +0200)] 
gnulib-tool.py: Fix handling of --with-obsolete.

* pygnulib/constants.py (TESTS): Remove 'obsolete' category.
* pygnulib/GLConfig.py (GLConfig.__init__): Add optional incobsolete
parameter.
(GLConfig.default): Handle 'incobsolete'.
(GLConfig.checkIncObsolete, GLConfig.setIncObsolete,
GLConfig.resetIncObsolete): New methods.
* pygnulib/GLModuleSystem.py (GLModuleSystem.transitive_closure): For
incobsolete, use new GLConfig methods.
* pygnulib/GLImport.py (GLImport.__init__, GLImport.actioncmd,
GLImport.gnulib_cache): Likewise.
* pygnulib/main.py (main): Pass the incobsolete value to the GLConfig
constructor.

2 years agogitlog-to-changelog: Make output reproducible.
Simon Josefsson [Fri, 12 Apr 2024 15:25:16 +0000 (17:25 +0200)] 
gitlog-to-changelog: Make output reproducible.

* build-aux/gitlog-to-changelog: Use gmtime instead of localtime.

2 years agognulib-tool.py: Fix parsing of gl_LGPL in gnulib-cache.m4.
Bruno Haible [Fri, 12 Apr 2024 15:17:12 +0000 (17:17 +0200)] 
gnulib-tool.py: Fix parsing of gl_LGPL in gnulib-cache.m4.

* pygnulib/GLImport.py (GLImport.__init__): Search for gl_LGPL in
gnulib-cache.m4 more carefully.

2 years agognulib-tool.py: Fix parsing of gnulib-cache.m4.
Bruno Haible [Fri, 12 Apr 2024 14:32:37 +0000 (16:32 +0200)] 
gnulib-tool.py: Fix parsing of gnulib-cache.m4.

* pygnulib/GLImport.py (GLImport.__init__): While parsing
gnulib-cache.m4, stop parsing the identifier starting with 'gl_' when
encountering a character that is not a uppercase letter, digit, or
underscore.

2 years agognulib-tool.py: Fix misspelled option in output.
Bruno Haible [Fri, 12 Apr 2024 13:51:28 +0000 (15:51 +0200)] 
gnulib-tool.py: Fix misspelled option in output.

* pygnulib/GLImport.py (GLImport.actioncmd): Fix typo.

2 years agognulib-tool.py: Persist the --with-longrunning-tests option.
Bruno Haible [Fri, 12 Apr 2024 13:47:54 +0000 (15:47 +0200)] 
gnulib-tool.py: Persist the --with-longrunning-tests option.

* pygnulib/GLImport.py (GLImport.gnulib_cache): Conditionally add
gl_WITH_LONGRUNNING_TESTS to gnulib-cache.m4.

2 years agognulib-tool.py: Print warnings just like gnulib-tool.sh.
Bruno Haible [Fri, 12 Apr 2024 13:26:45 +0000 (15:26 +0200)] 
gnulib-tool.py: Print warnings just like gnulib-tool.sh.

* pygnulib/main.py (main): When printing a warning, print just
"gnulib-tool" instead of the absolute file name.

2 years agognulib-tool.sh: Accept conditional dependencies with tests.
Bruno Haible [Fri, 12 Apr 2024 13:14:43 +0000 (15:14 +0200)] 
gnulib-tool.sh: Accept conditional dependencies with tests.

* gnulib-tool.sh (func_import): Don't reject the combination of
gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS.

2 years agognulib-tool.py: Optimize module set lookups.
Bruno Haible [Thu, 11 Apr 2024 19:49:45 +0000 (21:49 +0200)] 
gnulib-tool.py: Optimize module set lookups.

* gnulib-tool.py (profiler_args): New variable.
* pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Turn
handledmodules into a set.
(GLModuleTable.transitive_closure_separately): For the 'in' test, use
a set variable main_modules_set.

2 years agognulib-tool.py: Remove redundant backslashes from regexps.
Collin Funk [Thu, 11 Apr 2024 18:27:34 +0000 (11:27 -0700)] 
gnulib-tool.py: Remove redundant backslashes from regexps.

* pygnulib/GLTestDir.py (GLTestDir.execute): Don't backslash ']' when it
is outside of a set.
* pygnulib/GLImport.py (GLImport.__init__): Don't use a backslash when
']' is at the start of a '[...]' set. Don't backslash special characters
in a '[...]' set since they have their meaning dropped.
* pygnulib/main.py (main): Likewise.

2 years agognulib-tool.py: Simplify regular expressions.
Collin Funk [Thu, 11 Apr 2024 18:00:47 +0000 (11:00 -0700)] 
gnulib-tool.py: Simplify regular expressions.

* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
(GLEmiter.tests_Makefile_am): Change occurrences of '[A-Z][A-Z]*' to
'[A-Z]+'.

2 years agousers.txt: Correct some entries.
Bruno Haible [Thu, 11 Apr 2024 13:27:16 +0000 (15:27 +0200)] 
users.txt: Correct some entries.

* users.txt: Update some existing entries.

2 years agognulib-tool.sh: Improve sort order of directories.
Bruno Haible [Thu, 11 Apr 2024 13:08:01 +0000 (15:08 +0200)] 
gnulib-tool.sh: Improve sort order of directories.

* gnulib-tool.sh (func_import): In file fileset-changes, store directory
names without a trailing slash.

2 years agognulib-tool.sh: Remove './' prefix from file names to update or remove.
Bruno Haible [Thu, 11 Apr 2024 11:31:37 +0000 (13:31 +0200)] 
gnulib-tool.sh: Remove './' prefix from file names to update or remove.

* gnulib-tool.sh (func_import): Don't let rewritten file names start
with './'.

2 years agognulib-tool.py: Fix sorting of the LINGUAS file.
Collin Funk [Thu, 11 Apr 2024 10:46:46 +0000 (12:46 +0200)] 
gnulib-tool.py: Fix sorting of the LINGUAS file.

* pygnulib/GLImport.py (GLImport.execute): Sort the list of locales
before writing them into the LINGUAS file.

2 years agognulib-tool.sh: Handle .gitignore files that do not end in a newline.
Bruno Haible [Thu, 11 Apr 2024 00:44:03 +0000 (02:44 +0200)] 
gnulib-tool.sh: Handle .gitignore files that do not end in a newline.

* gnulib-tool.sh (func_import): If the .gitignore file ends with a
character other than a newline, add a newline before adding more lines.

2 years agognulib-tool.py: Skip nonexistent modules instead of failing.
Bruno Haible [Wed, 10 Apr 2024 23:55:05 +0000 (01:55 +0200)] 
gnulib-tool.py: Skip nonexistent modules instead of failing.

* pygnulib/GLModuleSystem.py (GLModuleSystem.find): Use the same warning
wording as gnulib-tool.sh.
* pygnulib/GLImport.py (GLImport.gnulib_cache): Print the specified
modules, not the base modules.
(GLImport.prepare): Don't put None elements into base_modules.

2 years agognulib-tool.py: Use function arguments instead of magic numbers.
Collin Funk [Wed, 10 Apr 2024 15:24:58 +0000 (08:24 -0700)] 
gnulib-tool.py: Use function arguments instead of magic numbers.

* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Remove the
'verifier' integer flag argument. Add the 'module_filter' function
argument. Use it to determine if Autoconf snippets should be printed for
each module.
* pygnulib/GLImport.py (GLImport.gnulib_comp): Update call to use a
lambda function.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.

2 years agognulib-tool: Fix a typo.
Collin Funk [Wed, 10 Apr 2024 12:56:34 +0000 (05:56 -0700)] 
gnulib-tool: Fix a typo.

* gnulib-tool.sh: Fix a typo in comment.
* pygnulib/main.py (main): Likewise.

2 years agognulib-tool.py: Change the avoid list to a set for lookups.
Collin Funk [Tue, 9 Apr 2024 16:11:03 +0000 (09:11 -0700)] 
gnulib-tool.py: Change the avoid list to a set for lookups.

* pygnulib/GLModuleSystem.py (GLModuleSystem.__init__): Store the
avoided modules in a set instead of a list. This is used only for
membership checks when computing the transitive closure of the given
modules, therefore prefer the O(1) average case over O(n).

2 years agognulib-tool.py: Remove unused setter and getter functions.
Collin Funk [Tue, 9 Apr 2024 15:55:02 +0000 (08:55 -0700)] 
gnulib-tool.py: Remove unused setter and getter functions.

* pygnulib/GLModuleSystem.py (GLModuleTable.getAvoids)
(GLModuleTable.setAvoids): Remove these unused functions.

2 years agototalorder, totalorderf: Avoid miscompilation by gcc on NetBSD/i386.
Bruno Haible [Tue, 9 Apr 2024 15:47:01 +0000 (17:47 +0200)] 
totalorder, totalorderf: Avoid miscompilation by gcc on NetBSD/i386.

* lib/totalorder.c (totalorder): Use the a compiler optimization barrier
also for GCC.
* lib/totalorderf.c (totalorderf): Likewise.

2 years agognulib-tool.py: Simplify use of GLModuleTable accessors.
Collin Funk [Tue, 9 Apr 2024 07:01:49 +0000 (00:01 -0700)] 
gnulib-tool.py: Simplify use of GLModuleTable accessors.

* pygnulib/GLModuleSystem.py (GLModuleTable.__getitem__): Remove
function.
* pygnulib/GLImport.py (GLImport.gnulib_cache, GLImport.gnulib_comp)
(GLImport.execute): Use function calls on the GLModuleTable to access
module lists instead of using keys to emulate a dictionary.

2 years agototalorder, totalorderf: Avoid miscompilation by clang on OpenBSD/i386.
Bruno Haible [Tue, 9 Apr 2024 12:17:38 +0000 (14:17 +0200)] 
totalorder, totalorderf: Avoid miscompilation by clang on OpenBSD/i386.

* lib/totalorder.c (totalorder): Insert a compiler optimization barrier.
* lib/totalorderf.c (totalorderf): Likewise.

2 years agototalorder, totalorderf: Fix handling of SNaN on i386 and x86_64 CPUs.
Bruno Haible [Tue, 9 Apr 2024 11:08:32 +0000 (13:08 +0200)] 
totalorder, totalorderf: Fix handling of SNaN on i386 and x86_64 CPUs.

* lib/totalorder.c: Include <string.h>.
(totalorder): Use memcpy to copy the 'double' values into the union.
Drop 'volatile'.
* lib/totalorderf.c: Include <string.h>.
(totalorderf): Use memcpy to copy the 'float' values into the union.
Drop 'volatile'.

2 years agototalorder tests: Fix signature test.
Bruno Haible [Tue, 9 Apr 2024 10:22:54 +0000 (12:22 +0200)] 
totalorder tests: Fix signature test.

* tests/test-totalorder.c: Test the signature of totalorder, not
totalorderf.

2 years agognulib-tool.py: Use single-quotes for strings, part 2.
Collin Funk [Tue, 9 Apr 2024 01:34:16 +0000 (18:34 -0700)] 
gnulib-tool.py: Use single-quotes for strings, part 2.

* pygnulib/GLEmiter.py (GLEmiter.po_Makevars): Change a double-quoted
string to single-quotes missed by the previous commit.

2 years agognulib-tool.py: Use single-quotes for strings.
Collin Funk [Mon, 8 Apr 2024 23:37:48 +0000 (16:37 -0700)] 
gnulib-tool.py: Use single-quotes for strings.

* pygnulib/*.py: Change double-quoted strings to use single-quotes
unless doing so would require adding backslashes.

2 years agognulib-tool.py: Prefer 'list.append(item)' over 'list += [item]'.
Collin Funk [Mon, 8 Apr 2024 23:08:50 +0000 (16:08 -0700)] 
gnulib-tool.py: Prefer 'list.append(item)' over 'list += [item]'.

* pygnulib/*.py: Change occurrences '+= [item]' to use '.append(item)'
where item is a single element added to the list.
See discussion here:
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00091.html>

2 years agoptsname_r: Work around ptsname_r bug on NetBSD 10.0.
Bruno Haible [Mon, 8 Apr 2024 23:16:15 +0000 (01:16 +0200)] 
ptsname_r: Work around ptsname_r bug on NetBSD 10.0.

* m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): On NetBSD, arrange to override
ptsname_r.
* lib/ptsname_r.c (ptsname_r): Add workaround for NetBSD bug.
* doc/glibc-functions/ptsname_r.texi: Mention the NetBSD bug.

2 years agognulib-tool.py: Fix incomplete type hint.
Collin Funk [Mon, 8 Apr 2024 05:22:49 +0000 (22:22 -0700)] 
gnulib-tool.py: Fix incomplete type hint.

* pygnulib/GLModuleSystem.py (GLModuleTable.getCondition): Add None to
the return type hint. This is the return value when the module is not a
conditional dependency.

2 years agognulib-tool.py: Remove unnecessary conditional.
Collin Funk [Mon, 8 Apr 2024 05:00:48 +0000 (22:00 -0700)] 
gnulib-tool.py: Remove unnecessary conditional.

* pygnulib/GLModuleSystem.py (GLModuleTable.__getitem__): Don't check if
the key is valid twice.

2 years agognulib-tool.py: Remove an unused and incorrect function.
Collin Funk [Mon, 8 Apr 2024 01:55:50 +0000 (18:55 -0700)] 
gnulib-tool.py: Remove an unused and incorrect function.

* pygnulib/GLFileSystem.py (GLFileAssistant.removeFile): Remove this
unused function. The correct method of removing an element from a list
is to use the remove() function, not pop() which takes an index.

2 years agognulib-tool.py: Omit some unnecessary list() calls around sorted().
Collin Funk [Mon, 8 Apr 2024 01:49:24 +0000 (18:49 -0700)] 
gnulib-tool.py: Omit some unnecessary list() calls around sorted().

* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Remove the list()
call in the argument to sorted. The sorted() function works on any
iterable and always returns a list.
* pygnulib/GLImport.py (GLImport.rewrite_old_files)
(GLImport.rewrite_new_files): Likewise.
* pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure)
(GLModuleTable.transitive_closure_separately): Likewise.
* pygnulib/GLTestDir.py (GLTestDir.rewrite_files): Likewise.

2 years agopthread-h: Fix configuration (regression 2024-03-28).
Bruno Haible [Mon, 8 Apr 2024 10:08:53 +0000 (12:08 +0200)] 
pthread-h: Fix configuration (regression 2024-03-28).

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

* m4/pthread_h.m4 (gl_PTHREAD_H_PART1): New macro, extracted from
gl_PTHREAD_H.
(gl_PTHREAD_H): Require it. Define using AC_DEFUN.
* m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Require gl_PTHREAD_H_PART1,
not only gl_PTHREAD_H_DEFAULTS.

2 years agognulib-tool.py: Don't remove duplicate avoided modules.
Collin Funk [Sun, 7 Apr 2024 23:41:18 +0000 (16:41 -0700)] 
gnulib-tool.py: Don't remove duplicate avoided modules.

* pygnulib/GLConfig.py (GLConfig.addAvoid): Don't remove duplicates from
the modules passed with --avoid.

2 years agosigsegv tests: Avoid a crash on NetBSD 10.0/i386.
Bruno Haible [Sun, 7 Apr 2024 14:53:02 +0000 (16:53 +0200)] 
sigsegv tests: Avoid a crash on NetBSD 10.0/i386.

* tests/test-sigsegv-catch-stackoverflow1.c
(stackoverflow_handler_continuation): On NetBSD/i386, align the stack
pointer before calling longjmp.

2 years agognulib-tool.py: Add comment.
Bruno Haible [Sun, 7 Apr 2024 11:48:14 +0000 (13:48 +0200)] 
gnulib-tool.py: Add comment.

* pygnulib/constants.py (joinpath): Document a limitation.

2 years agognulib-tool.py: Don't allow path normalization to delete a variable.
Collin Funk [Sat, 6 Apr 2024 13:04:52 +0000 (06:04 -0700)] 
gnulib-tool.py: Don't allow path normalization to delete a variable.

* pygnulib/GLModuleSystem.py
(GLModule.getAutomakeSnippet_Unconditional): Use os.path.join() on the
Makefile variable so it isn't deleted by a following '..' from
os.path.norm().

2 years agognulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.
Collin Funk [Sat, 6 Apr 2024 12:57:51 +0000 (05:57 -0700)] 
gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.

* pygnulib/GLImport.py (GLImport.__init__): Don't modify the path given
by AC_CONFIG_AUX_DIR by prefixing it with destdir. Use a more strict
regular expression instead of cleaner().

2 years agognulib-tool.py: Locate configure.ac correctly when --dir is given.
Collin Funk [Sat, 6 Apr 2024 11:41:03 +0000 (04:41 -0700)] 
gnulib-tool.py: Locate configure.ac correctly when --dir is given.

* pygnulib/GLConfig.py (GLConfig.setAutoconfFile): Don't combine the
given file name argument with destdir.
* pygnulib/main.py (main): Use os.path.join() instead of joinpath() when
constructing the path to the configure.ac file. The latter normalizes
paths which causes the test suite to fail when printed in files.

2 years agoexpm1l: Work around a NetBSD 10.0/i386 bug.
Bruno Haible [Sat, 6 Apr 2024 10:01:59 +0000 (12:01 +0200)] 
expm1l: Work around a NetBSD 10.0/i386 bug.

* m4/expm1l.m4 (gl_FUNC_EXPM1L): Test the value of
expm1l(2^LDBL_MIN_EXP).
* doc/posix-functions/expm1l.texi: Mention the NetBSD 10.0/i386 bug.
* tests/test-expm1.h (test_function): Allow more deviation on
NetBSD/i386.

2 years agoautoupdate
Karl Berry [Fri, 5 Apr 2024 15:09:18 +0000 (08:09 -0700)] 
autoupdate

2 years agoexp2l: Work around a NetBSD 10.0/i386 bug.
Bruno Haible [Fri, 5 Apr 2024 14:45:25 +0000 (16:45 +0200)] 
exp2l: Work around a NetBSD 10.0/i386 bug.

* m4/exp2l.m4 (gl_FUNC_EXP2L): Test the value of exp2l(LDBL_MAX_EXP-1).
* doc/posix-functions/exp2l.texi: Mention the NetBSD 10.0/i386 bug.

2 years agoroundl: Fix a link error on Linux/powerpc64le.
Bruno Haible [Fri, 5 Apr 2024 14:04:59 +0000 (16:04 +0200)] 
roundl: Fix a link error on Linux/powerpc64le.

* m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an additional TYPE
argument.
* m4/isfinite.m4 (gl_ISFINITE): Use the type 'double'.
* m4/isinf.m4 (gl_ISINF): Likewise.
* m4/round.m4 (gl_FUNC_ROUND): Likewise.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Use the type 'float'.
* m4/roundl.m4 (gl_FUNC_ROUNDL): Use the type 'long double'.

2 years agoexp2l tests: Enable a test for glibc versions >= 2.16.
Bruno Haible [Fri, 5 Apr 2024 13:30:28 +0000 (15:30 +0200)] 
exp2l tests: Enable a test for glibc versions >= 2.16.

* tests/test-exp2.h (test_function): Disable a glibc bug workaround for
glibc versions >= 2.16.

2 years agoexpl tests: Avoid test failure on NetBSD 10.0/i386.
Bruno Haible [Fri, 5 Apr 2024 13:16:27 +0000 (15:16 +0200)] 
expl tests: Avoid test failure on NetBSD 10.0/i386.

* tests/test-exp.h (test_function): Allow more deviation on NetBSD/i386.

2 years agognulib-tool.py: Use 'Any' instead of type unions in GLConfig.
Collin Funk [Fri, 5 Apr 2024 04:41:08 +0000 (21:41 -0700)] 
gnulib-tool.py: Use 'Any' instead of type unions in GLConfig.

* pygnulib/GLConfig.py (GLConfig.__getitem__, GLConfig.dictionary)
(GLConfig.default, GLConfig.isdefault, GLConfig.values): Use 'Any' from
the typing module instead of large type unions. This silences unhelpful
warnings from type checkers.

2 years agognulib-tool.py: Fix 'consider-using-set-comprehension' warnings.
Collin Funk [Fri, 5 Apr 2024 03:42:09 +0000 (20:42 -0700)] 
gnulib-tool.py: Fix 'consider-using-set-comprehension' warnings.

* pygnulib/GLImport.py (GLImport.prepare): Create a set directly instead
of creating a list and passing it to a call of set().
(GLImport.__init__): Likewise. Use max() instead of getting the last
element of a sorted list.

2 years agognulib-tool.py: Fix 'consider-using-with' pylint warnings.
Collin Funk [Fri, 5 Apr 2024 03:32:55 +0000 (20:32 -0700)] 
gnulib-tool.py: Fix 'consider-using-with' pylint warnings.

* pygnulib/GLModuleSystem.py (GLModuleSystem.list): Use run() instead of
Popen() from the subprocess module. This function handles cleanup
internally instead of as a context manager via the 'with' statement.

2 years agoUpdate for NetBSD 9.3 and 10.0.
Bruno Haible [Fri, 5 Apr 2024 10:04:59 +0000 (12:04 +0200)] 
Update for NetBSD 9.3 and 10.0.

* doc/*/*.texi: Update for NetBSD 9.3 and 10.0.
* m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comments and cross-compilation
guess.
* m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): Likewise.
* m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
* m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Likewise.
* m4/fcntl.m4: Update comments.
* m4/fenv-environment.m4: Likewise.
* m4/fenv-exceptions-trapping.m4: Likewise.
* m4/fnmatch.m4: Likewise.
* m4/getcwd-abort-bug.m4: Likewise.
* m4/iswdigit.m4: Likewise.
* m4/iswxdigit.m4: Likewise.
* m4/modfl.m4: Likewise.
* m4/wcscmp.m4: Likewise.
* m4/wcsncmp.m4: Likewise.
* m4/wctrans.m4: Likewise.
* m4/wcwidth.m4: Likewise.

2 years agoposix-modules, all-modules: Fix --version output using git options.
Collin Funk [Thu, 4 Apr 2024 00:48:56 +0000 (17:48 -0700)] 
posix-modules, all-modules: Fix --version output using git options.

* all-modules (func_version): Pass --format and --date options to git
so the output does not depend on the user's configuration. Pass
'-n 1' to speed up the operation, since we only need the first entry.
* posix-modules (func_version): Likewise.

2 years agoall-modules: Fix errors during './all-modules --version' execution.
Bruno Haible [Fri, 5 Apr 2024 02:17:56 +0000 (04:17 +0200)] 
all-modules: Fix errors during './all-modules --version' execution.

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

* all-modules (func_exit, func_fatal_error, func_readlink,
func_gnulib_dir): Include auxiliary functions from gnulib-tool.sh.