Re: updating gnulib-tool.py
Today's changes: 2022-08-05 Bruno Haible gnulib-tool.py: Don't initialize local variables too early. * gnulib-tool.py (main): Initialize each local variable in one place. I prefer to have pylint tell me about uninitialized variables than to get the value None at runtime. gnulib-tool.py: Finish implementing option --po-domain. * gnulib-tool.py (main): Accept option --po-domain. * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable reference. * pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in from the gnulib directory. Don't require a shell when invoking wget. After invoking wget, restore the current directory. gnulib-tool.py: Finish implementing option --macro-prefix. * gnulib-tool.py (main): Accept option --macro-prefix. gnulib-tool.py: Refactor --makefile-name option. * gnulib-tool.py (main): Handle option --makefile-name like all other string-valued options. gnulib-tool.py: Implement option --no-libtool. * gnulib-tool.py (main): Accept option --no-libtool. gnulib-tool.py: Remove redundant type checks. * pygnulib/GLConfig.py (GLConfig.__init__): Remove redundant type checks, left over from 2022-08-04. (GLConfig.getIncludeGuardPrefix): Improve comment. (GLConfig.resetMacroPrefix): Optimize. gnulib-tool.py: Refactor --makefile-name option. * gnulib-tool.py (main): Rename variable 'makefile' to 'makefile_name'. * pygnulib/GLConfig.py: Rename attribute 'makefile' to 'makefile_name'. * pygnulib/GLMakefileTable.py: Update. * pygnulib/GLEmiter.py: Likewise. * pygnulib/GLImport.py: Likewise. * pygnulib/GLFileSystem.py (GLFileAssistant): Remove unused assignment. gnulib-tool.py: Fix link_if_changed function. * pygnulib/constants.py (joinpath): Fix comment. (as_link_value_at_dest): New function, extracted from link_relative. (link_relative): Use it. (link_if_changed): Really don't replace the symbolic link if it does not need to change. gnulib-tool.py: Fix 'Unused import' warnings. * gnulib-tool.py: Remove unused imports. * pygnulib/*.py: Likewise. gnulib-tool.py: Fix 'Undefined variable' errors. * pygnulib/constants.py: Import codecs. * pygnulib/GLConfig.py (GLConfig.setLibName): Fix local variable reference. * pygnulib/GLFileSystem.py (GLFileSystem.lookup, GLFileAssistant.update): Fix local variable references. * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix reference. * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Define missing local variables. gnulib-tool.py: Make option --version work. * pygnulib/constants.py (__copyright__): Bump copyright year. * pygnulib/GLInfo.py (GLInfo.authors): Add a comma after the second-to-last author. (GLInfo.copyright): Show only the last modification year. (GLInfo.date): Check whether git and GNU date are available. Use 'git log ChangeLog', not 'git log'. Run 'git log' in the gnulib directory, not in the current directory. Search for 'Date:' only at the beginning of a line. As a fallback, look at the first ChangeLog entry. (GLInfo.version): Check whether git is available. Run git-version-gen in the gnulib directory, not in the current directory. Replace '-dirty' with '-modified'. As a fallback, return the empty string. * gnulib-tool.py (main) [--version]: Add a space before the version. gnulib-tool.py: Simplify. * pygnulib/constants.py (compiler): Remove function. * gnulib-tool.py: Use re.compile directly instead. * pygnulib/*.py: Likewise. >From 276725c4e2c8e06e3cec36472adb0be7d99b709d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 5 Aug 2022 04:05:04 +0200 Subject: [PATCH 01/12] gnulib-tool.py: Simplify. * pygnulib/constants.py (compiler): Remove function. * gnulib-tool.py: Use re.compile directly instead. * pygnulib/*.py: Likewise. --- ChangeLog | 7 +++ gnulib-tool.py | 3 +-- pygnulib/GLEmiter.py | 25 pygnulib/GLImport.py | 17 - pygnulib/GLModuleSystem.py | 39 +++--- pygnulib/GLTestDir.py | 25 pygnulib/constants.py | 10 ++ 7 files changed, 61 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1abeb15271..e504d85215 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-08-05 Bruno Haible + + gnulib-tool.py: Simplify. + * pygnulib/constants.py (compiler): Remove function. + * gnulib-tool.py: Use re.compile directly instead. + * pygnulib/*.py: Likewise. + 2022-08-04 Bruno Haible gnulib-tool.py: Fix
Re: cnd_timedout returns immediately when built with MinGW
Hi Tim, > I am at switching wget2 multithreading from C99+glthreads to C11 > (threads.h). I hope that you have considered the Gnulib documentation on this topic: https://www.gnu.org/software/gnulib/manual/html_node/Choosing-a-multithreading-API.html > The tests work well on Linux (amd64) (Debian unstable/testing/stable, > Fedora 35, Arch, Alpine/muslc) with native builds (gcc or clang). > > But they completely fail when cross-building with MinGW64 (on Debian > bookworm). And what's the execution environment? Is it Windows or is it wine? wine is not supported; I've had enough work making it work on Windows. Also, are you configuring with --enable-threads=windows? If yes, then it should work (on Windows). If not, then if the winpthreads library is found, it will be used; but since this library is broken, some of the tests will hang, crash, or fail. To avoid using this broken library, add this macro invocation to your configure.ac: gl_AVOID_WINPTHREAD Bruno
cnd_timedout returns immediately when built with MinGW
Hi, I am at switching wget2 multithreading from C99+glthreads to C11 (threads.h). The tests work well on Linux (amd64) (Debian unstable/testing/stable, Fedora 35, Arch, Alpine/muslc) with native builds (gcc or clang). But they completely fail when cross-building with MinGW64 (on Debian bookworm). It looks like cnd_timedwait() always immediately returns with 1, no matter what timeout is specified. The cond is initialized and the mutex is locked. Using cnd_wait() instead of cnd_timedwait() works well, but I'd prefer having using a timeout to catch some corner cases. Is this a known issue ? Regards, Tim OpenPGP_signature Description: OpenPGP digital signature
Re: [PATCH] Fix typos: prefer US spelling
Bruno Haible writes: > The patch you sent is for texinfo.tex; the upstream location for it > is the texinfo package. You need to write to bug-texinfo instead. Thanks.
Re: [PATCH] Fix typos: prefer US spelling
Stefan Kangas wrote: > The attached patch fixes some minor typos, to prefer US spelling to > British. We have that policy in Emacs, so it would be useful if the > files we merge from you follow that convention too. The patch you sent is for texinfo.tex; the upstream location for it is the texinfo package. You need to write to bug-texinfo instead. > There are many more places where US spelling is not preferred in gnulib; > I did not change all of them. For the code and doc that originates in Gnulib, the author decides on the wording and on the spelling. So, your patches to force US conventions on everyone would have been rejected. Bruno
[PATCH] Fix typos: prefer US spelling
The attached patch fixes some minor typos, to prefer US spelling to British. We have that policy in Emacs, so it would be useful if the files we merge from you follow that convention too. There are many more places where US spelling is not preferred in gnulib; I did not change all of them. Thanks. From 204ed345736d05619937f291c3e3863e2f001bc4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 5 Aug 2022 11:18:59 +0200 Subject: [PATCH] doc: Fix typos. * build-aux/texinfo.tex: Fix typos. --- ChangeLog | 5 + build-aux/texinfo.tex | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1abeb15271..32d0717d88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2022-08-05 Stefan Kangas + + doc: Fix typos. + * build-aux/texinfo.tex: Fix typos. + 2022-08-04 Bruno Haible gnulib-tool.py: Fix typo. diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index 8872e5e055..1d5b63ec93 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -1002,7 +1002,7 @@ where each line of input produces a line of output.} \global\everypar = {}% } -% leave vertical mode without cancelling any first paragraph indent +% leave vertical mode without canceling any first paragraph indent \gdef\imageindent{% \toks0=\everypar \everypar={}% @@ -7651,7 +7651,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % If SUBTOPIC is present, precede it with a space, and call \doind. % (At some time during the 20th century, this made a two-level entry in an % index such as the operation index. Nobody seemed to notice the change in -% behaviour though.) +% behavior though.) \def\dosubind#1#2#3{% \def\thirdarg{#3}% \ifx\thirdarg\empty -- 2.30.2