Bruno Haible [Wed, 3 Aug 2022 14:49:15 +0000 (16:49 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 23.
Follow gnulib-tool changes
2016-11-11 Bruno Haible <bruno@clisp.org>
gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
2016-12-02 Nikos Mavrogiannopoulos <nmav@gnutls.org>
gnulib-tool (func_import): Adhere to the license guideline ...
2016-12-02 Daiki Ueno <ueno@gnu.org>
gnulib-tool (func_import): Relax the regex ...
* gnulib-tool.py: For --lgpl, accept value 3orGPLv2.
* pygnulib/GLInfo.py (GLInfo.usage): Update.
* pygnulib/GLConfig.py (GLConfig.setLGPL): Update argument check.
* pygnulib/GLImport.py (GLImport.__init__, GLImport.gnulib_cache):
Update gl_LGPL handling.
(GLImport.prepare): Update license compatibility checks and license
header rewriting.
* pygnulib/GLTestDir.py (GLTestDir.execute): Update license
compatibility checks. Handle also the licenses GPLv3+, GPL, LGPLv3+.
Bruno Haible [Wed, 3 Aug 2022 13:51:35 +0000 (15:51 +0200)]
gnulib-tool.py: Fix unjustified "incompatible license" warnings.
* pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit a warning when
the dependency module has a license such as "public domain" or
"unlimited".
Bruno Haible [Wed, 3 Aug 2022 12:51:20 +0000 (14:51 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 22.
Follow gnulib-tool change
2016-10-15 Bruno Haible <bruno@clisp.org>
Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
* pygnulib/GLModuleSystem.py (GLModule.getLicense): Special-case the
'parse-datetime' module.
Bruno Haible [Wed, 3 Aug 2022 12:43:40 +0000 (14:43 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 21.
Follow gnulib-tool change
2016-10-16 Bruno Haible <bruno@clisp.org>
gnulib-tool: Make --create-testdir on all modules work again.
* pygnulib/GLTestDir.py (GLTestDir.execute): Don't include the
non-recursive-gnulib-prefix-hack module.
Bruno Haible [Wed, 3 Aug 2022 12:37:12 +0000 (14:37 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 20.
Follow gnulib-tool changes
2016-01-15 Paul Eggert <eggert@cs.ucla.edu>
gnulib-tool: don't assume ln -s works
2016-01-24 Paul Eggert <eggert@cs.ucla.edu>
gnulib-tool: don't give up on ln -s so easily
2017-06-08 Bruno Haible <bruno@clisp.org>
gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
* pygnulib/constants.py (symlink_relative): New function.
(link_relative): Use it instead of os.symlink.
Bruno Haible [Wed, 3 Aug 2022 12:27:51 +0000 (14:27 +0200)]
gnulib-tool.py: Avoid errors when writing to a VFAT file system, part 2.
* pygnulib/constants.py (movefile): New function.
* pygnulib/*.py: Use it instead of shutil.
Bruno Haible [Wed, 3 Aug 2022 09:27:21 +0000 (11:27 +0200)]
gnulib-tool.py: Avoid errors when writing to a VFAT file system.
* pygnulib/constants.py (copyfile, copyfile2): New functions.
* gnulib-tool.py: Use them instead of shutil.
* pygnulib/*.py: Likewise.
Bruno Haible [Tue, 2 Aug 2022 22:24:29 +0000 (00:24 +0200)]
gnulib-tool.py: Fix typo.
* pygnulib/GLImport.py (GLImport.__init__): Use the relative auxdir as
second, not as first argument of joinpath.
Bruno Haible [Sun, 31 Jul 2022 21:28:18 +0000 (23:28 +0200)]
gnulib-tool.py: Fix typo.
* pygnulib/GLTestDir.py (GLMegaTestDir.execute): Invoke os.mkdir as
intended.
Bruno Haible [Sun, 31 Jul 2022 21:02:58 +0000 (23:02 +0200)]
gnulib-tool.py: Improve some error messages.
* gnulib-tool.py (main): Write "*** Stop." instead of "*** Exit.".
(__main__): Print an error message for GLError 5, 13, 14, 15, 16, 17, 18.
* pygnulib/GLError.py (GLError.__repr__): Compute one error message,
not 19.
Bruno Haible [Sun, 31 Jul 2022 20:35:30 +0000 (22:35 +0200)]
gnulib-tool.py: Write errors to stderr, not stdout.
* pygnulib/constants.py: Write error messages to stderr, not stdout.
Bruno Haible [Sun, 31 Jul 2022 20:29:15 +0000 (22:29 +0200)]
gnulib-tool.py: Use mainstream coding style.
* pygnulib/GLConfig.py: Use 'raise' to re-throw an exception.
Bruno Haible [Sun, 31 Jul 2022 19:08:55 +0000 (21:08 +0200)]
gnulib-tool.py: Implement options --symlink and --local-symlink.
* gnulib-tool.py (main): Handle options --symlink and --local-symlink.
* pygnulib/constants.py (link_if_changed): Ignore FileNotFoundError from
os.remove call.
Bruno Haible [Sun, 31 Jul 2022 18:02:40 +0000 (20:02 +0200)]
gnulib-tool.py: Make --copy-file work.
* gnulib-tool.py (main) [copy-file]: Fix reference to uninitialized
variable. Fix error handling of os.makedirs. Pass the destdir to the
GLFileAssistant.
Bruno Haible [Sun, 31 Jul 2022 16:56:05 +0000 (18:56 +0200)]
gnulib-tool.py: Allow module arguments to occur at any position.
* gnulib-tool.py (main): Collect the non-option arguments in a single
list, regardless of their position. Use parse_known_args instead of
parse_args, and give an error message about unknown options ourselves.
* gnulib-tool: Fix typo in error message.
Bruno Haible [Sun, 31 Jul 2022 16:54:22 +0000 (18:54 +0200)]
gnulib-tool.py: Make --test behaviour more similar to gnulib-tool.
* gnulib-tool.py (main) [test]: Remove space from the testdir name.
Bruno Haible [Sun, 31 Jul 2022 16:53:24 +0000 (18:53 +0200)]
gnulib-tool: Clarify that --test allows zero module arguments.
* gnulib-tool (func_usage): Mark the modules for --test as optional.
* pygnulib/GLInfo.py (GLInfo.usage): Likewise.
Bruno Haible [Sun, 31 Jul 2022 16:51:17 +0000 (18:51 +0200)]
gnulib-tool.py: Make option processing more similar to gnulib-tool.
* gnulib-tool.py (main): Allow --add-import and --remove-import with 0
modules.
Bruno Haible [Sun, 31 Jul 2022 16:48:25 +0000 (18:48 +0200)]
gnulib-tool.py: Improve compliance with GNU standards.
* gnulib-tool.py (main): Handle --help and --version before testing for
conflicting modes.
Bruno Haible [Sun, 31 Jul 2022 16:44:56 +0000 (18:44 +0200)]
gnulib-tool.py: Emit error message when conflicting modes are specified.
* gnulib-tool.py (main): Fix test of conflicting modes. (Some options
produce a value of [], and as a condition, [] evaluates to False.)
Bruno Haible [Sun, 31 Jul 2022 16:42:31 +0000 (18:42 +0200)]
gnulib-tool.py: Remove most short options.
* gnulib-tool.py (main): Reorder the list of options. Remove most short
options, for consistency with gnulib-tool.
Bruno Haible [Sun, 31 Jul 2022 16:39:19 +0000 (18:39 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 19.
Follow gnulib-tool changes
2015-12-09 Pavel Raiskup <praiskup@redhat.com>
gnulib-tool: allow multiple --local-dir usage
2019-02-14 Bruno Haible <bruno@clisp.org>
gnulib-tool: Improve handling of multiple --local-dir options.
* gnulib-tool (func_reconstruct_cached_dir): When the argument is
absolute, return it unmodified.
(func_compute_relative_local_gnulib_path): Renamed from
func_count_relative_local_gnulib_path. Add comment.
* gnulib-tool.py: Accept multiple --local-dir options and collect the
values into localpath.
* pygnulib/GLConfig.py: Take a localpath argument instead of a localdir
argument.
(getLocalDir, setLocalDir, resetLocalDir): Remove methods.
(getLocalPath, setLocalPath, resetLocalPath): New methods.
* pygnulib/GLFileSystem.py (CopyAction): New class.
(GLFileSystem.lookup): Consider all dirs in localpath.
(GLFileSystem.shouldLink): New method.
(GLFileAssistant): Use shouldLink.
* pygnulib/GLModuleSystem.py (GLModuleSystem.exists): Iterate over all
dirs in localpath.
(GLModuleSystem.list): Likewise.
* pygnulib/GLEmiter.py: Update.
* pygnulib/GLImport.py (GLImport.__init__): Put the argument of
gl_LOCAL_DIR into localpath, not localdir.
(GLImport.actioncmd): Consider all dirs in localpath.
(GLImport.relative_to_destdir, GLImport.relative_to_currdir): New
methods.
(GLImport.gnulib_cache): Combine all dirs in localpath. Use
self.relative_to_destdir.
* pygnulib/GLTestDir.py (GLTestDir.execute): Use shouldLink.
Bruno Haible [Sun, 31 Jul 2022 16:35:58 +0000 (18:35 +0200)]
gnulib-tool.py: Improve the primitives for relative file names.
* pygnulib/constants.py (relativize): Don't attempt to handle absolute
file names. Fix bug with relativize('../foo/bar', '../foo/bla/zut').
(relconcat): New function.
Bruno Haible [Sun, 31 Jul 2022 16:30:50 +0000 (18:30 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 18.
Follow gnulib-tool change
2005-09-20 Bruno Haible <bruno@clisp.org>
gnulib-tool: Remove trailing slashes
* pygnulib/constants.py (remove_trailing_slashes): New function.
* pygnulib/GLConfig.py (GLConfig): Use it in the setters.
Bruno Haible [Sun, 31 Jul 2022 21:48:14 +0000 (23:48 +0200)]
avltree-omap, avltree-oset, avltreehash-list, rbtree-omap: Pacify GCC.
* lib/gl_avltree_omap.c (gl_avltree_omap_check_invariants): Add extern
decl.
* lib/gl_avltree_oset.c (gl_avltree_oset_check_invariants): Likewise.
* lib/gl_avltreehash_list.c (gl_avltreehash_list_check_invariants):
Likewise.
* lib/gl_rbtree_omap.c (gl_rbtree_omap_check_invariants): Likewise.
Paul Eggert [Sun, 31 Jul 2022 17:17:35 +0000 (10:17 -0700)]
rbtree-oset: Pacify GCC
* lib/gl_rbtree_oset.c (gl_rbtree_oset_check_invariants):
* lib/gl_rbtreehash_list.c (gl_rbtreehash_list_check_invariants):
Add extern decls, to pacify --enable-gcc-warnings with Bison.
Bruno Haible [Sun, 31 Jul 2022 16:28:32 +0000 (18:28 +0200)]
Update gnulib-tool.py.TODO.
Akim Demaille [Mon, 4 Jul 2022 05:18:07 +0000 (07:18 +0200)]
gnulib-tool: add support for --automake-subdir-tests
<https://lists.gnu.org/r/bug-gnulib/2022-01/msg00111.html>
* gnulib-tool (main): Handle --automake-subdir-tests.
(func_emit_shellvars_init, func_emit_lib_Makefile_am): Use
$sourcebase when handling tests and --automake-subdir-tests is
given.
(func_append_actionarg): Support --automake-subdir-tests.
(func_create_testdir): Add missing argument for func_emit_initmacro_end.
Bruno Haible [Sun, 31 Jul 2022 05:16:34 +0000 (07:16 +0200)]
gendocs.sh: Fix error when invoking 'perl' (regression 2022-07-23).
* build-aux/gendocs.sh (PERL): Use double-quotes, not single-quotes.
Bruno Haible [Sat, 30 Jul 2022 11:51:36 +0000 (13:51 +0200)]
gnulib-tool.py: Clean up imports.
* gnulib-tool.py: Remove unused constants.
* pygnulib/*.py: Likewise.
Bruno Haible [Sat, 30 Jul 2022 11:29:26 +0000 (13:29 +0200)]
gnulib-tool.py: Assume Python 3.
* gnulib-tool.py: Don't allow 'bytes' as an alternative to 'str'.
* pygnulib/*.py: Likewise.
Bruno Haible [Sat, 30 Jul 2022 09:45:36 +0000 (11:45 +0200)]
gnulib-tool.py: Assume Python 3.
* gnulib-tool.py: Don't set PYTHON3, string. Use str instead of string.
* pygnulib/*.py: Likewise.
Bruno Haible [Sat, 30 Jul 2022 08:44:02 +0000 (10:44 +0200)]
gnulib-tool.py: Modernize coding style.
* pygnulib/*.py: Remove parentheses around raise value expressions.
Bruno Haible [Sat, 30 Jul 2022 23:07:08 +0000 (01:07 +0200)]
doc: Update regarding bootstrap split.
Reported by Paul Smith <psmith@gnu.org>.
* doc/gnulib-tool.texi (gettextize and autopoint): Mention autogen.sh
instead of bootstrap.
(VCS Issues): Describe three alternative approaches.
* doc/gnulib.texi (Developer tools): Mention also autopull.sh and
autogen.sh.
* top/bootstrap (usage): Fix copy&paste mistake.
Bruno Haible [Fri, 29 Jul 2022 21:29:23 +0000 (23:29 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 17.
Follow gnulib-tool change
2015-10-06 Pavel Raiskup <praiskup@redhat.com>
gnulib-tool: fix tests of 'extensions' module
* pygnulib/GLEmiter.py (GLEmiter.preEarlyMacros): New function.
* pygnulib/GLImport.py (GLImport.gnulib_comp): Invoke it.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
Bruno Haible [Fri, 29 Jul 2022 20:58:27 +0000 (22:58 +0200)]
gnulib-tool.py: Follow gnulib-tool changes, part 16.
Follow gnulib-tool change
2015-09-25 Pavel Raiskup <praiskup@redhat.com>
gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
* pygnulib/GLImport.py (GLImport.gnulib_comp): Put the
gl_USE_SYSTEM_EXTENSIONS right before gl_PROG_AR_RANLIB into
gnulib-comp.m4 (if the 'extensions' module is used).
Bruno Haible [Fri, 29 Jul 2022 16:45:33 +0000 (18:45 +0200)]
gnulib-tool.py: Modernize coding style.
* pygnulib/*.py: Remove parentheses around return value expressions.
Bruno Haible [Fri, 29 Jul 2022 14:41:28 +0000 (16:41 +0200)]
gnulib-tool.py: Modernize the file headers.
* pygnulib/*.py: Remove '#!/usr/bin/python' (not needed) and
'encoding: UTF-8' lines (default in Python 3). Add copyright notice.
Bruno Haible [Fri, 29 Jul 2022 14:35:28 +0000 (16:35 +0200)]
gnulib-tool.py: Use mainstream coding style.
* gnulib-tool.py: Clarify the coding style. Fix some pycodestyle
warnings.
* pygnulib/constants.py: Likewise.
* pygnulib/GLEmiter.py: Likewise.
* pygnulib/GLImport.py: Likewise.
* pygnulib/GLMakefileTable.py: Likewise.
Bruno Haible [Fri, 29 Jul 2022 09:20:00 +0000 (11:20 +0200)]
gnulib-tool.py: Fix error (regression 2021-04-11).
* pygnulib/GLConfig.py (GLConfig.getModuleIndicatorPrefix): Fix code.
Bruno Haible [Fri, 29 Jul 2022 09:14:27 +0000 (11:14 +0200)]
gnulib-tool.py: Fix warning from Python 3.10.4.
* pygnulib/GLModuleSystem.py (getConditionalName): Fix a string
substitution expression.
Bruno Haible [Fri, 29 Jul 2022 09:09:00 +0000 (11:09 +0200)]
gnulib-tool.py: Fix error in Ubuntu 22.04.
* gnulib-tool.py: Search for python3 in $PATH.
Bruno Haible [Fri, 29 Jul 2022 05:26:22 +0000 (07:26 +0200)]
Update gnulib-tool.py.TODO.
Karl Berry [Tue, 26 Jul 2022 14:55:39 +0000 (07:55 -0700)]
autoupdate
Bruno Haible [Mon, 25 Jul 2022 08:21:42 +0000 (10:21 +0200)]
bootstrap: Make the automatic sync more resilient.
Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00060.html>.
* top/bootstrap (bootstrap_sync): Set to true when bootstrap-funclib.sh
is not present.
* top/gen-bootstrap.sed: Insert a couple of comment lines.
* build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
Bruno Haible [Sun, 24 Jul 2022 22:53:48 +0000 (00:53 +0200)]
Fix comment.
Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00058.html>.
* top/bootstrap-funclib.sh: Fix comment about canonical location.
* top/autopull.sh: Likewise.
* top/autogen.sh: Likewise.
* top/bootstrap: Likewise.
Bruno Haible [Sun, 24 Jul 2022 14:24:37 +0000 (16:24 +0200)]
Split bootstrap into autopull.sh and autogen.sh.
* top/bootstrap-funclib.sh: New file, based on build-aux/bootstrap.
* top/autopull.sh: New file, based on build-aux/bootstrap.
* top/autogen.sh: New file, based on build-aux/bootstrap.
* top/bootstrap: New file, based on build-aux/bootstrap.
* top/gen-bootstrap.sed: New file.
* Makefile (build-aux/bootstrap): New rule.
(regen): Depend on it.
* build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
Bruno Haible [Sun, 24 Jul 2022 10:58:44 +0000 (12:58 +0200)]
bootstrap: Obey another environment variable GNULIB_REFDIR.
* build-aux/bootstrap (usage): Document option --gnulib-refdir and
environment variable GNULIB_REFDIR.
Accept option --gnulib-refdir.
When GNULIB_SRCDIR is specified, verify that it denotes a directory.
Use $GNULIB_REFDIR, not $GNULIB_SRCDIR, as argument to git's --reference
option.
Improve an error message.
* NEWS: Mention the change.
Bruno Haible [Sat, 23 Jul 2022 11:31:20 +0000 (13:31 +0200)]
Fix a couple of ShellCheck warnings.
* MODULES.html.sh (sed_escape_slash): Remove unused variable.
* build-aux/bootstrap: Avoid computed printf format strings.
* build-aux/do-release-commit-and-tag: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/declared.sh: Fix "unrecognized option" message.
* gnulib-tool (supplied_opts): Remove unused variable.
(--single-con): Remove redundant option recognition.
* tests/test-parse-duration.sh (nl): Remove unused variable.
* tests/test-update-copyright.sh: Use double-quotes instead of
single-quotes.
Bruno Haible [Sat, 23 Jul 2022 10:01:35 +0000 (12:01 +0200)]
Avoid DoS vulnerability through unsafe default assignment.
See https://www.shellcheck.net/wiki/SC2223 .
* MODULES.html.sh (func_tmpdir): Surround default assignment with
double-quotes.
* build-aux/bootstrap: Likewise.
* build-aux/csharpcomp.sh.in (func_tmpdir): Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/libtool-next-version (func_tmpdir): Likewise.
* config/srclist-update: Likewise.
* gnulib-tool (func_tmpdir): Likewise.
* posix-modules (func_tmpdir): Likewise.
* tests/test-atexit.sh: Likewise.
* tests/test-btoc32-1.sh: Likewise.
* tests/test-btoc32-2.sh: Likewise.
* tests/test-btowc1.sh: Likewise.
* tests/test-btowc2.sh: Likewise.
* tests/test-c-dtoastr.sh: Likewise.
* tests/test-c-ldtoastr.sh: Likewise.
* tests/test-c-snprintf.sh: Likewise.
* tests/test-c-strcase.sh: Likewise.
* tests/test-c-vasprintf.sh: Likewise.
* tests/test-c-vsnprintf.sh: Likewise.
* tests/test-c-xvasprintf.sh: Likewise.
* tests/test-c32isalnum.sh: Likewise.
* tests/test-c32isalpha.sh: Likewise.
* tests/test-c32isblank.sh: Likewise.
* tests/test-c32iscntrl.sh: Likewise.
* tests/test-c32isdigit.sh: Likewise.
* tests/test-c32isgraph.sh: Likewise.
* tests/test-c32islower.sh: Likewise.
* tests/test-c32isprint.sh: Likewise.
* tests/test-c32ispunct.sh: Likewise.
* tests/test-c32isspace.sh: Likewise.
* tests/test-c32isupper.sh: Likewise.
* tests/test-c32isxdigit.sh: Likewise.
* tests/test-c32rtomb.sh: Likewise.
* tests/test-c32snrtombs-1.sh: Likewise.
* tests/test-c32snrtombs-2.sh: Likewise.
* tests/test-c32snrtombs-3.sh: Likewise.
* tests/test-c32snrtombs-4.sh: Likewise.
* tests/test-c32srtombs-1.sh: Likewise.
* tests/test-c32srtombs-2.sh: Likewise.
* tests/test-c32srtombs-3.sh: Likewise.
* tests/test-c32srtombs-4.sh: Likewise.
* tests/test-c32stombs-1.sh: Likewise.
* tests/test-c32stombs-2.sh: Likewise.
* tests/test-c32stombs-3.sh: Likewise.
* tests/test-c32stombs-4.sh: Likewise.
* tests/test-closein.sh: Likewise.
* tests/test-copy-acl.sh (func_tmpdir): Likewise.
* tests/test-copy-file.sh (func_tmpdir): Likewise.
* tests/test-dprintf-posix.sh: Likewise.
* tests/test-execl.sh: Likewise.
* tests/test-execle.sh: Likewise.
* tests/test-execlp.sh: Likewise.
* tests/test-execv.sh: Likewise.
* tests/test-execve.sh: Likewise.
* tests/test-execvp.sh: Likewise.
* tests/test-execvpe.sh: Likewise.
* tests/test-file-has-acl.sh (func_tmpdir): Likewise.
* tests/test-fprintf-posix.sh: Likewise.
* tests/test-init.sh: Likewise.
* tests/test-iswdigit.sh: Likewise.
* tests/test-iswxdigit.sh: Likewise.
* tests/test-mbmemcasecmp1.sh: Likewise.
* tests/test-mbmemcasecmp2.sh: Likewise.
* tests/test-mbmemcasecmp3.sh: Likewise.
* tests/test-mbmemcasecoll1.sh: Likewise.
* tests/test-mbmemcasecoll2.sh: Likewise.
* tests/test-mbmemcasecoll3.sh: Likewise.
* tests/test-mbrtoc32-1.sh: Likewise.
* tests/test-mbrtoc32-2.sh: Likewise.
* tests/test-mbrtoc32-3.sh: Likewise.
* tests/test-mbrtoc32-4.sh: Likewise.
* tests/test-mbrtowc1.sh: Likewise.
* tests/test-mbrtowc2.sh: Likewise.
* tests/test-mbrtowc3.sh: Likewise.
* tests/test-mbrtowc4.sh: Likewise.
* tests/test-mbscasecmp.sh: Likewise.
* tests/test-mbscasestr2.sh: Likewise.
* tests/test-mbscasestr3.sh: Likewise.
* tests/test-mbscasestr4.sh: Likewise.
* tests/test-mbschr.sh: Likewise.
* tests/test-mbscspn.sh: Likewise.
* tests/test-mbsinit.sh: Likewise.
* tests/test-mbsncasecmp.sh: Likewise.
* tests/test-mbsnrtoc32s-1.sh: Likewise.
* tests/test-mbsnrtoc32s-2.sh: Likewise.
* tests/test-mbsnrtoc32s-3.sh: Likewise.
* tests/test-mbsnrtoc32s-4.sh: Likewise.
* tests/test-mbsnrtowcs1.sh: Likewise.
* tests/test-mbsnrtowcs2.sh: Likewise.
* tests/test-mbsnrtowcs3.sh: Likewise.
* tests/test-mbsnrtowcs4.sh: Likewise.
* tests/test-mbspbrk.sh: Likewise.
* tests/test-mbspcasecmp.sh: Likewise.
* tests/test-mbsrchr.sh: Likewise.
* tests/test-mbsrtoc32s-1.sh: Likewise.
* tests/test-mbsrtoc32s-2.sh: Likewise.
* tests/test-mbsrtoc32s-3.sh: Likewise.
* tests/test-mbsrtoc32s-4.sh: Likewise.
* tests/test-mbsrtowcs1.sh: Likewise.
* tests/test-mbsrtowcs2.sh: Likewise.
* tests/test-mbsrtowcs3.sh: Likewise.
* tests/test-mbsrtowcs4.sh: Likewise.
* tests/test-mbsspn.sh: Likewise.
* tests/test-mbsstr2.sh: Likewise.
* tests/test-mbsstr3.sh: Likewise.
* tests/test-mbstoc32s-1.sh: Likewise.
* tests/test-mbstoc32s-2.sh: Likewise.
* tests/test-mbstoc32s-3.sh: Likewise.
* tests/test-mbstoc32s-4.sh: Likewise.
* tests/test-nl_langinfo.sh: Likewise.
* tests/test-parse-duration.sh (func_tmpdir): Likewise.
* tests/test-perror.sh: Likewise.
* tests/test-printf-posix.sh: Likewise.
* tests/test-set-mode-acl.sh (func_tmpdir): Likewise.
* tests/test-setlocale1.sh: Likewise.
* tests/test-strtod1.sh: Likewise.
* tests/test-strtold1.sh: Likewise.
* tests/test-unicodeio2.sh: Likewise.
* tests/test-unicodeio3.sh: Likewise.
* tests/test-vasnprintf-posix2.sh: Likewise.
* tests/test-vc-list-files-cvs.sh: Likewise.
* tests/test-vc-list-files-git.sh: Likewise.
* tests/test-vdprintf-posix.sh: Likewise.
* tests/test-vfprintf-posix.sh: Likewise.
* tests/test-vprintf-posix.sh: Likewise.
* tests/test-wcrtomb.sh: Likewise.
* tests/test-wcsnrtombs1.sh: Likewise.
* tests/test-wcsnrtombs2.sh: Likewise.
* tests/test-wcsnrtombs3.sh: Likewise.
* tests/test-wcsnrtombs4.sh: Likewise.
* tests/test-wcsrtombs1.sh: Likewise.
* tests/test-wcsrtombs2.sh: Likewise.
* tests/test-wcsrtombs3.sh: Likewise.
* tests/test-wcsrtombs4.sh: Likewise.
* tests/test-xprintf-posix.sh: Likewise.
* tests/test-xstrtoimax.sh: Likewise.
* tests/test-xstrtol.sh: Likewise.
* tests/test-xstrtoll.sh: Likewise.
* tests/test-xstrtoumax.sh: Likewise.
* tests/test-yesno.sh: Likewise.
* tests/unicase/test-locale-language.sh: Likewise.
* tests/unicase/test-ulc-casecmp1.sh: Likewise.
* tests/unicase/test-ulc-casecmp2.sh: Likewise.
* tests/unicase/test-ulc-casecoll1.sh: Likewise.
* tests/unicase/test-ulc-casecoll2.sh: Likewise.
* tests/unigbrk/test-ulc-grapheme-breaks.sh: Likewise.
* tests/unistdio/test-u16-vasnprintf2.sh: Likewise.
* tests/unistdio/test-u16-vasnprintf3.sh: Likewise.
* tests/unistdio/test-u32-vasnprintf2.sh: Likewise.
* tests/unistdio/test-u32-vasnprintf3.sh: Likewise.
* tests/unistdio/test-u8-vasnprintf2.sh: Likewise.
* tests/unistdio/test-u8-vasnprintf3.sh: Likewise.
* tests/unistdio/test-ulc-vasnprintf2.sh: Likewise.
* tests/unistdio/test-ulc-vasnprintf3.sh: Likewise.
* tests/uniwbrk/test-ulc-wordbreaks.sh: Likewise.
* tests/uniwidth/test-uc_width2.sh: Likewise.
Bruno Haible [Mon, 18 Jul 2022 17:55:17 +0000 (19:55 +0200)]
bootstrap: Comments.
* build-aux/bootstrap: Comment about two unused variables.
Bruno Haible [Sun, 17 Jul 2022 10:55:05 +0000 (12:55 +0200)]
doc: Update README.
* doc/README: Fix stale links (reported by Tzvetelin Katchov). Clarify
the relation to build-aux/gnu-web-doc-update.
Bruno Haible [Thu, 14 Jul 2022 19:57:16 +0000 (21:57 +0200)]
doc: Fix typo.
Reported by Eric Gallager <egall@gwmail.gwu.edu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00045.html>.
* doc/posix-functions/mmap.texi: Add parenthesis.
Paul Eggert [Thu, 14 Jul 2022 01:54:56 +0000 (18:54 -0700)]
* doc/parse-datetime.texi: Tweak wording again.
Paul Eggert [Wed, 13 Jul 2022 00:11:26 +0000 (17:11 -0700)]
parse-datetime: improve doc for TZ="<-07>7" etc.
* doc/parse-datetime.texi (Specifying time zone rules):
Give examples of POSIX TZ strings that specify UTC offsets (Bug#56524).
Bruno Haible [Sun, 10 Jul 2022 21:19:03 +0000 (23:19 +0200)]
sigsegv: Optimize stackvma implementation for AIX 7.
Reported by Neha Jain <nehajain29@in.ibm.com> in
<https://lists.gnu.org/archive/html/bug-m4/2022-06/msg00005.html>
via Eric Blake.
* lib/stackvma.c: For AIX, add implementation that uses /proc/$pid/map,
based on lib/vma-iter.c.
(sigsegv_get_vma): Use it on AIX 7 or higher.
Bruno Haible [Sun, 10 Jul 2022 19:52:11 +0000 (21:52 +0200)]
vma-iter: Add support for AIX 7.
* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on AIX.
* lib/vma-iter.c (vma_iterate): Add code for AIX, known to work on
AIX 7.
* lib/get-rusage-as.c: Update comments.
* lib/get-rusage-data.c: Likewise.
* tests/test-get-rusage-as.c (main): Take into account the special
address space organization on AIX in 32-bit mode.
Bruno Haible [Sun, 10 Jul 2022 15:30:28 +0000 (17:30 +0200)]
iconv: Define a summary result.
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00020.html>.
* m4/iconv.m4 (AM_ICONV): Define also am_cv_func_iconv_summary.
Bruno Haible [Sun, 10 Jul 2022 08:23:48 +0000 (10:23 +0200)]
iconv: Remove obsolete comment.
* m4/iconv.m4 (AM_ICONV): Remove comment that is obsolete since
2020-08-16.
Bruno Haible [Sun, 10 Jul 2022 07:21:20 +0000 (09:21 +0200)]
announce-gen: Fix internationalization in verification instructions.
* build-aux/announce-gen: Set LC_ALL, not LANG, to "C", to force English
output from gpg.
Bruno Haible [Sun, 10 Jul 2022 07:02:42 +0000 (09:02 +0200)]
lib-symbol-visibility: Improve documentation.
* doc/lib-symbol-visibility.texi: Tweak BUILDING_SHARED snippet.
Bruno Haible [Sun, 10 Jul 2022 06:47:59 +0000 (08:47 +0200)]
doc: Mark Minix as no longer tested.
Rationale: No commits since 2018 at https://git.minix3.org/.
Reported by Paul Eggert and Jim Meyering in
<https://lists.gnu.org/archive/html/grep-devel/2022-07/msg00027.html>.
* doc/gnulib-intro.texi (Supported Platforms): Mark Minix as no longer
tested.
Jim Meyering [Sun, 10 Jul 2022 01:42:29 +0000 (18:42 -0700)]
announce-gen: better diagnose some usage errors
* build-aux/announce-gen (main): Erroneous usage would elicit a
misleading diagnostic. When --gnulib-version=V was specified:
- without --bootstrap-tools=..., or
- with --bootstrap-tools=..., but without "gnulib" in that list
we would give an inappropriate diagnostic. Now, each diagnostic
is tailored to the precise erroneous condition.
Reported by Bruno Haible in
https://lists.gnu.org/r/bug-gnulib/2022-01/msg00025.html
Simon Josefsson [Sat, 9 Jul 2022 08:27:15 +0000 (10:27 +0200)]
git-version-gen: Doc fix.
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00012.html>.
* build-aux/git-version-gen (usage): Replace incorrect text with
bug report instructions.
Simon Josefsson [Fri, 8 Jul 2022 22:32:04 +0000 (00:32 +0200)]
announce-gen: Improve GnuPG verification instructions.
* build-aux/announce-gen: Add GPG fingerprint to output, and a
pointer to GNU keyring.
Simon Josefsson [Fri, 8 Jul 2022 19:39:45 +0000 (21:39 +0200)]
lib-symbol-visibility: Improve documentation.
* doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet
suggested by Bruno Haible.
Bruno Haible [Mon, 4 Jul 2022 22:48:36 +0000 (00:48 +0200)]
havelib: Fix 'configure --help' output.
* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Fix m4 quoting bug.
Bruno Haible [Sun, 3 Jul 2022 14:50:12 +0000 (16:50 +0200)]
lib-symbol-visibility: Improve documentation.
Reported by Vivien Kraus <vivien@planete-kraus.eu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00093.html>.
* doc/lib-symbol-visibility.texi: List the platforms. Extend the
LIBFOO_DLL_EXPORTED to work also with mingw and also with
--disable-shared.
Bruno Haible [Sun, 3 Jul 2022 09:58:03 +0000 (11:58 +0200)]
supersede: Support the file name "/dev/null" on native Windows.
* lib/supersede.c (open_supersede): On native Windows, map "/dev/null"
to "NUL".
Jim Meyering [Thu, 23 Jun 2022 15:12:44 +0000 (08:12 -0700)]
maint.mk: fix syntax-check for unnecessary hash.h header use
* top/maint.mk (_hash_re): Correct the regexp. It had two problems:
- lacked the "hash_" prefix, so would match non-uses
- failed to detect uses of the hash_x?initialize functions
The former led to an excess/unneeded use of hash.h in coreutils' cut.c.
The latter would have led to a FP "not needed" report for copy.c.
Bruno Haible [Tue, 21 Jun 2022 23:46:37 +0000 (01:46 +0200)]
fchmodat: Fix test failure on native Windows.
* modules/fchmodat (Depends-on): Add 'chmod'.
Bruno Haible [Tue, 21 Jun 2022 23:45:33 +0000 (01:45 +0200)]
chmod: Add tests.
* tests/test-chmod.c: New file, based on tests/test-lchmod.c.
* modules/chmod-tests: New file.
Bruno Haible [Tue, 21 Jun 2022 23:43:52 +0000 (01:43 +0200)]
chmod: New module.
* lib/sys_stat.in.h (chmod): Declare when GNULIB_CHMOD is 1.
* lib/chmod.c: New file, based on lib/lchmod.c.
* m4/chmod.m4: New file, based on m4/fchmodat.m4.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H): Test whether chmod is declared.
(gl_SYS_STAT_H_REQUIRE_DEFAULTS): Initialize GNULIB_CHMOD.
(gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_CHMOD.
* modules/sys_stat (Makefile.am): Substitute GNULIB_CHMOD,
REPLACE_CHMOD.
* modules/chmod: New file, based on modules/lchmod.
* doc/posix-functions/chmod.texi: Mention the new module and the
problems on IRIX and Windows.
Bruno Haible [Tue, 21 Jun 2022 21:19:07 +0000 (23:19 +0200)]
lchmod: Simplify.
* lib/lchmod.c: Remove unnecessary include, obsolete since 2020-02-23.
Bruno Haible [Mon, 20 Jun 2022 05:20:53 +0000 (07:20 +0200)]
javacomp-script, javaexec-script: Add support for disabling Java.
* m4/javacomp.m4 (gt_JAVACOMP_DISABLED): New macro.
* m4/javaexec.m4 (gt_JAVAEXEC_DISABLED): New macro.
Paul Eggert [Mon, 20 Jun 2022 04:30:01 +0000 (23:30 -0500)]
lchmod: port back to AIX 7.2
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
* lib/lchmod.c: Include string.h, for strlen.
(lchmod): Do not depend on HAVE_READLINK since we now depend on
the readlink module. Check for AIX 7.2 bug.
* m4/lchmod.m4 (gl_PREREQ_LCHMOD): Do not check for readlink
since we now depend on the readlink module.
* modules/lchmod (Depends-on): Depend on readlink.
Paul Eggert [Mon, 20 Jun 2022 04:29:07 +0000 (23:29 -0500)]
fchmodat: pacify gcc -Wunused-variable
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
* lib/fchmodat.c (fchmodat): Remove unused local.
Bruno Haible [Sun, 19 Jun 2022 14:14:19 +0000 (16:14 +0200)]
getlogin, getlogin_r tests: Really avoid test failure.
Reported by Letu Ren <fantasquex@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00037.html>.
* tests/test-getlogin.h (test_getlogin_result): Parse the contents of
/proc/self/loginuid as an unsigned integer.
Paul Eggert [Sun, 12 Jun 2022 20:46:52 +0000 (13:46 -0700)]
fchmodat: port better to MS-Windows etc.
MS-Windows problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00041.html
Although I don’t use MS-Windows I see some related fstatat etc.
problems and am trying to fix them with this further patch.
* lib/fchmodat.c (fchmodat):
* lib/lchmod.c (lchmod):
* lib/lchown.c (lchown)
[!HAVE_LCHOWN && HAVE_CHOWN && !CHOWN_MODIFIES_SYMLINK]:
* lib/renameatu.c (renameatu)
[HAVE_RENAME && RENAME_TRAILING_SLASH_SOURCE_BUG]:
Use readlinkat/readlink instead of fstatat/lstat to test merely
whether a string names a symlink, as this avoids problems
with EOVERFLOW. Also, I hope it works around the MS-Windows
issues that Bruno noted.
* m4/fchmodat.m4 (gl_PREREQ_FCHMODAT):
Check for readlinkat, not lchmod.
* m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not require AC_CANONICAL_HOST
or check for lstat.
(gl_PREREQ_LCHMOD): Check for readlink.
* modules/lchown (Depends-on): Add readlink. Do not depend on
lstat merely because !HAVE_LCHOWN.
* modules/renameatu (Depends-on): Add fstatat, readlinkat.
Bruno Haible [Sun, 12 Jun 2022 14:52:30 +0000 (16:52 +0200)]
doc: Update O_PATH platforms list.
* doc/posix-headers/fcntl.texi: Update O_PATH platforms list.
Paul Eggert [Sat, 11 Jun 2022 23:59:12 +0000 (16:59 -0700)]
fcntl: document O_PATH
* doc/posix-headers/fcntl.texi: Mention O_PATH.
Paul Eggert [Sat, 11 Jun 2022 23:58:25 +0000 (16:58 -0700)]
fchmodat: port to old Linux kernel + newer headers
Problem reported by Lance Fredrickson in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00038.html
* lib/fchmodat.c (fchmodat):
* lib/lchmod.c (lchmod): Do not rely on AT_EMPTY_PATH as to
whether syscalls work on ""; instead, if a call fails with
ENOENT assume that those syscalls do not work.
Do not use fstatat to determine whether a file is a symlink,
as this has problems with EOVERFLOW. Use readlinkat instead,
and if it fails with EINVAL then the file is not a symlink.
Remove #if tests on __linux__ || __ANDROID__ || __CYGWIN__
as this has been a maintenance hassle and it’s unlikely
these days that a new platform would #define O_PATH without also
either supporting /proc or keeping it absent.
* modules/fchmodat (Depends-on): Remove fstatat.
There should be no need for either fchmodat or lchmod to depend on
readlinkat, since they use readlinkat only in contexts where it
should work without Gnulib intervention.
Bruno Haible [Mon, 6 Jun 2022 14:34:48 +0000 (16:34 +0200)]
fopen-gnu: Make this module work again (regression 2022-01-03).
Reported by Nelson H. F. Beebe <beebe@math.utah.edu> in
<https://lists.gnu.org/archive/html/platform-testers/2022-04/msg00005.html>.
* modules/fopen-gnu (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
Bruno Haible [Mon, 6 Jun 2022 09:55:04 +0000 (11:55 +0200)]
getlogin, getlogin_r tests: Avoid test failure in specific environments.
Reported by Letu Ren <fantasquex@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00001.html>.
* modules/getlogin-tests (Depends-on): Add stdbool.
* modules/getlogin_r-tests (Depends-on): Likewise.
* tests/test-getlogin.h: Include stdbool.h.
(test_getlogin_result): On Linux, skip the test if /proc/self/loginuid
contains "-1".
Bruno Haible [Sun, 5 Jun 2022 22:03:30 +0000 (00:03 +0200)]
doc: Add section to attract more people towards the GNU project.
Inspired by a suggestion from José E. Marchesi <jemarch@gnu.org> on
the gnu-prog-discuss mailing list.
* doc/join-gnu.texi: New file.
* doc/gnulib-readme.texi: Include it.
Bruno Haible [Sun, 5 Jun 2022 17:21:43 +0000 (19:21 +0200)]
doc: Add section to attract more people towards the GNU project.
Inspired by a suggestion from José E. Marchesi <jemarch@gnu.org> on
the gnu-prog-discuss mailing list.
* doc/join-gnu.texi: New file.
* doc/gnulib-readme.texi: Include it.
Bruno Haible [Sun, 5 Jun 2022 17:09:15 +0000 (19:09 +0200)]
doc: Fix warnings about regex chapter structure (regression 2022-05-15).
* doc/regex.texi (GNU Operators): Fix menu.
Paul Eggert [Sat, 4 Jun 2022 16:55:28 +0000 (09:55 -0700)]
regex-quote: \} -> } in EREs
* lib/regex-quote.c (ere_special): Don’t use \} in EREs,
as POSIX says the interpretation is undefined.
* tests/test-regex-quote.c (test_bre, test_ere):
Add tests for }.
Paul Eggert [Sat, 4 Jun 2022 01:46:37 +0000 (18:46 -0700)]
dfa: do not warn about \] and \}
* lib/dfa.c (lex): Do not warn about \] and \}, since they’re
surely universally supported even though POSIX says their
interpretation is undefined.
Paul Eggert [Sat, 4 Jun 2022 00:52:19 +0000 (17:52 -0700)]
regex-quote: \] -> ] in EREs and BREs
* build-aux/bootstrap:
* build-aux/bootstrap.conf (gettext_external):
* check-AC_LIBOBJ:
* lib/regex-quote.c (bre_special, ere_special):
* gnulib-tool (func_modules_transitive_closure)
(func_emit_autoconf_snippet, func_import, func_create_testdir):
* tests/test-regex-quote.c (test_bre, test_ere):
* top/maint.mk (longopt_re, gpg_key_ID):
Don’t use \] in BREs and EREs, as POSIX says the interpretation is
undefined.
Paul Eggert [Sat, 4 Jun 2022 00:27:44 +0000 (17:27 -0700)]
filevercmp: don’t treat entire filename as suffix
Problem reported by Artém S. Tashkinóv in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00012.html
* lib/filevercmp.c (file_prefixlen): When stripping
(\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes, do not strip
the entire file name.
* tests/test-filevercmp.c (examples): Adjust to match new behavior.
Bruno Haible [Fri, 3 Jun 2022 15:46:27 +0000 (17:46 +0200)]
setlocale: Update after Turkey changed its name.
* lib/setlocale.c: Update comments.
Karl Berry [Thu, 26 May 2022 14:24:56 +0000 (07:24 -0700)]
autoupdate
Karl Berry [Wed, 25 May 2022 14:55:36 +0000 (07:55 -0700)]
GNU Emacs Operator node deleted from regex.texi
Karl Berry [Wed, 25 May 2022 14:54:30 +0000 (07:54 -0700)]
autoupdate
Karl Berry [Wed, 25 May 2022 14:53:56 +0000 (07:53 -0700)]
autoupdate
Paul Eggert [Tue, 24 May 2022 23:03:29 +0000 (16:03 -0700)]
dfa: new options DFA_STAR_WARN, DFA_PLUS_WARN
This lets ‘grep -E '(*a|+b)'’ warn about the * and the +.
* lib/dfa.h (DFA_STAR_WARN, DFA_PLUS_WARN): New flags.
* lib/dfa.c (lex): Support them.
Paul Eggert [Mon, 23 May 2022 19:17:49 +0000 (12:17 -0700)]
dfa: '\n' is not governed by RE_LIMITED_OPS
* lib/dfa.c (lex): Pay no attention to RE_LIMITED_OPS when
deciding how to parse '\n', since regcomp.c doesn’t.
Paul Eggert [Mon, 23 May 2022 19:05:14 +0000 (12:05 -0700)]
dfa: new option DFA_STRAY_BACKSLASH_WARN
This is for grep, which wants to warn about stray backslashes that
lead to unspecified behavior. For example, "grep -oi '\a'"
surprisingly is not equivalent to "grep -oi 'a'", so the stray
backslash should be warned about.
* lib/dfa.c: Include wctype.h, for iswprint and iswspace.
(lex): Add support for DFA_STRAY_BACKSLASH_WARN.
* lib/dfa.h (DFA_STRAY_BACKSLASH_WARN): New constant.
Paul Eggert [Mon, 23 May 2022 17:04:18 +0000 (10:04 -0700)]
dfa: new option DFA_CONFUSING_BRACKETS_ERROR
This is for grep, which wants [:alpha:] to be an error
at the top level.
* lib/dfa.c (struct regex_syntax): New member dfaopts,
replacing anchor. All uses changed.
(parse_bracket_exp): Error, not warn, if DFA_CONFUSING_BRACKETS_ERROR.
* lib/dfa.h (DFA_CONFUSING_BRACKETS_ERROR): New constant.