Re: beta-tester call draft

2024-04-19 Thread Paul Eggert
On 2024-04-19 17:22, Bruno Haible wrote: Hi, 2. Update your gnulib checkout. (For some packages, it comes as a git submodule named 'gnulib'.) Like this: $ git pull Set the environment variable GNULIB_SRCDIR, pointing to this checkout. Might help to spell out what to

Re: beta-tester call draft

2024-04-19 Thread Bruno Haible
Collin Funk wrote: > But would this work on stable branches? It would not work, no. Also it would not work in submodules (which fix a certain commit of gnulib). That's why in step 2 we need a $ git checkout master Bruno

wcsstr: Update doc

2024-04-19 Thread Bruno Haible
glibc now has a worst-case O(n) wcsstr() function, see https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=cf11e74b0d81d389bcad5cdbba020ba475f0ac4b 2024-04-19 Bruno Haible wcsstr: Update doc. * doc/posix-functions/wcsstr.texi: Update glibc version. diff --git

Re: beta-tester call draft

2024-04-19 Thread Collin Funk
On 4/19/24 5:22 PM, Bruno Haible wrote: > 5. Regenerate the fetched and generated files of your package. > Depending on the packge, this may be a command such as >$ ./bootstrap --no-git --gnulib-srcdir=$GNULIB_SRCDIR Forgive me if this is a silly question, I have focused on

Re: beta-tester call draft

2024-04-19 Thread Bruno Haible
PS: > 2. Update your gnulib checkout. (For some packages, it comes as a > git submodule named 'gnulib'.) Like this: >$ git pull That should be: $ git checkout master $ git pull

beta-tester call draft

2024-04-19 Thread Bruno Haible
Hi, It's now time to call for beta-testers of the Python gnulib-tool. I plan to post the same text to info-gnu and to planet.gnu.org. Here is a draft. Please comment! - GNU gnulib: calling for beta-testers If you are

Re: gnulib-tool.py: Simplify data structures for dependencies.

2024-04-19 Thread Collin Funk
On 4/19/24 2:37 PM, Bruno Haible wrote: > You're right. Maybe Dmitry wanted to have the full data structure > available somewhere; but since the 'conditionals' and 'unconditionals' > tables contain the same info in a different way, it's redundant. > > I would leave it in, for possible future

getlogin_r tests: Fix compilation error on some OpenSolaris derivatives

2024-04-19 Thread Bruno Haible
Building a testdir on Solaris 11 SmartOS (with CC="clang -O2 -D_XOPEN_SOURCE=700"), I see a compilation error: ../../gltests/test-getlogin_r.c:24:1: error: incompatible function pointer types initializing 'int (*)(char *, size_t)' (aka 'int (*)(char *, unsigned long)') with an expression of

memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-19 Thread Bruno Haible
Compiling a testdir for 'memset_explicit' on Solaris 11 SmartOS with clang as compiler, I get an error: clang -O2 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I../../gllib -I.. -DGNULIB_STRICT_CHECKING=1 -I/root/prefix64clang/include -I/opt/tools/include -Wall

Re: gnulib-tool.py: Simplify data structures for dependencies.

2024-04-19 Thread Bruno Haible
Hi Collin, > Patch 0001 does the same but uses a set instead of checking for > membership in a list. Thanks; applied. > Also, am I missing something or are the sets/lists at > self.dependers[str(module)] unused? You're right. Maybe Dmitry wanted to have the full data structure available

Re: bug#70411: [bug] install(1) fails to read /dev/stdin on Darwin

2024-04-19 Thread Sergei Trofimovich
On Fri, 19 Apr 2024 00:33:52 -0700 Paul Eggert wrote: > On 2024-04-18 14:52, Sergei Trofimovich wrote: > > $ clang simple.c -o simple && echo 42 | ./simple > > 1: ino=3009428657538693161 > > 2: ino=3009428657538693161 > > 3: ino=1568241705 > > > > Note how stat() and fstat() don't agree on

gnulib-tool.py: Simplify data structures for dependencies.

2024-04-19 Thread Collin Funk
Hi Bruno, Previously I suggested using defaultdict to remove the base initialization case for dictionaries. But you noted a mistake I made in my patch [1]: > It's a nice Python class. But the use of defaultdict(list) makes only > the two lines > > if str(module) not in

Re: gnulib-tool.py: Update authors list

2024-04-19 Thread Bruno Haible
Hi Collin, > If I am remembering how __init__.py works correctly, > we should be able to remove the __copyright__, __author__, and > __license__ definitions from constants.py and the rest of the files. Yeah, it seems redundant. You will surely find out whether doing so triggers some warnings

Re: gnulib-tool.py: Fix pylint 'attribute-defined-outside-init' warnings.

2024-04-19 Thread Bruno Haible
Collin Funk wrote: > I submitted a feature request here since I think a configuration > option would probably be the best fix: > > https://github.com/pylint-dev/pylint/issues/9555 Thank you! > When I say obvious in GLModule we have (comments are added): > > # Cache for the getter

Re: gnulib-tool.py: Simplify running some commands in a given directory

2024-04-19 Thread Collin Funk
On 4/19/24 9:24 AM, Bruno Haible wrote: > This patch optimizes some subprocess invocations. > > I did not change the os.chdir calls around larger blocks of code. Looks good. I had a look at doing this previously but in GLTestDir for example, we use 'constants.execute' to deal with the:

Re: gnulib-tool.py: Update authors list

2024-04-19 Thread Collin Funk
Hi Bruno, On 4/19/24 8:49 AM, Bruno Haible wrote: > This patch changes the './gnulib-tool.py --version' output to end like this: > > Written by Bruno Haible, Paul Eggert, Simon Josefsson, Dmitry Selyutin, and > Collin Funk. Thanks. I think I can consider myself famous now. :) > Also, in

gnulib-tool.py: Simplify running some commands in a given directory

2024-04-19 Thread Bruno Haible
This patch optimizes some subprocess invocations. I did not change the os.chdir calls around larger blocks of code. 2024-04-19 Bruno Haible gnulib-tool.py: Simplify running some commands in a given directory. * pygnulib/GLImport.py (GLImport.execute): Use sp.call with a cwd

gnulib-tool.py: Update authors list

2024-04-19 Thread Bruno Haible
This patch changes the './gnulib-tool.py --version' output to end like this: Written by Bruno Haible, Paul Eggert, Simon Josefsson, Dmitry Selyutin, and Collin Funk. Also, in pygnulib/__init__.py, the authors list and copyright years need to include the authors of the gnulib-tool shell

Re: getpayload* tests: Don't assume that '-' works as expected on NaN

2024-04-19 Thread Bruno Haible
I wrote: > The patch below fixes the failures, by introducing a specific function, rather > than unary minus, for negating the sign of NaNs. This function should also be used for the getpayload* tests (although this has not caused a test failure, because getpayload (- x) == getpayload (x)).

Re: signed-nan: Don't assume that '-' works as expected on NaN values

2024-04-19 Thread Bruno Haible
Jeffrey Walton wrote: > > +/* Returns - x, implemented by inverting the sign bit, > > + so that it works also on 'float' NaN values. */ > > +_GL_UNUSED static float > > +minus_NaNf (float x) > > +{ > > +#if defined __mips__ > > + /* The mips instruction neg.s may have no effect on NaNs. > > +

Re: signed-nan: Don't assume that '-' works as expected on NaN values

2024-04-19 Thread Jeffrey Walton
On Fri, Apr 19, 2024 at 8:06 AM Bruno Haible wrote: > ... > > +/* Returns - x, implemented by inverting the sign bit, > + so that it works also on 'float' NaN values. */ > +_GL_UNUSED static float > +minus_NaNf (float x) > +{ > +#if defined __mips__ > + /* The mips instruction neg.s may have

signed-nan: Don't assume that '-' works as expected on NaN values

2024-04-19 Thread Bruno Haible
On an OpenBSD 7.4/mips64 machine, I'm seeing these test failures: FAIL: test-signbit FAIL: test-totalorder FAIL: test-totalorderf More details about the 'test-signbit' failure: Each of these assertions fails. ASSERT (signbit (negative_NaNf ())); ASSERT (signbit (negative_SNaNf ()));

Re: [PATCH] Fix wchar_h.m4 serial number

2024-04-19 Thread Sam James
Bruno Haible writes: > Hi Sam, > Hi Bruno, >> * m4/wchar_h.m4: Remove duplicate serial number specification and increment >> serial. > > Thanks, applied. > >> (It's easier for some work I'm doing if each serial maps to one checksum >> of the macro, and serial #s are free.) > > We cannot

Re: gnulib-tool.py: Add a comment about coding style.

2024-04-19 Thread Bruno Haible
Thanks, Collin. Both patches applied. Bruno

Re: bug#70411: [bug] install(1) fails to read /dev/stdin on Darwin

2024-04-19 Thread Paul Eggert
On 2024-04-18 14:52, Sergei Trofimovich wrote: $ clang simple.c -o simple && echo 42 | ./simple 1: ino=3009428657538693161 2: ino=3009428657538693161 3: ino=1568241705 Note how stat() and fstat() don't agree on inode. Apparently it's documented in