[PATCH 1/2] alloca-opt-tests: add a ‘volatile’

2024-05-16 Thread Paul Eggert
* tests/test-alloca-opt.c (func) [HAVE_ALLOCA]: Now volatile, to foil whole-program optimization. --- ChangeLog | 6 ++ tests/test-alloca-opt.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6436ddfb81..a8ed30c4ae 100644 ---

[PATCH 2/2] putenv-tests: pacify gcc -Wdiscarded-qualifiers

2024-05-16 Thread Paul Eggert
* tests/test-putenv.c (main): Don’t pass a string literal to a function expecting ‘char *’. --- ChangeLog | 4 tests/test-putenv.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8ed30c4ae..5238067cf9 100644 --- a/ChangeLog

Re: byteswap: Use inline functions instead of macros.

2024-05-16 Thread Paul Eggert
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\ + || (defined __has_builtin && __has_builtin (__builtin_bswap32)) Unfortunately this usage is not portable, not for __has_builtin or for any of the other __has_XX primitives. This is because older compilers will

byteswap: Use inline functions instead of macros.

2024-05-16 Thread Collin Funk
I've applied the two attached patches. The first uses inline functions for byteswap.h and improves the configure check. I now see what Paul was saying about floating-point arguments [1]. With the following program: === #define bswap_16(x) x) &

Re: gnulib-tool Python tracebacks after control-C

2024-05-16 Thread Collin Funk
Hi Bruno, On 5/16/24 5:52 AM, Bruno Haible wrote: > Yes, that's what I meant. Instead of "*** Stop." maybe "*** Interrupted." > (I don't know which of the two, in English, more clearly indicates that it > cannot be continued. On one hand, a program which received a SIGSTOP > can be continued via

Re: doc: Mention gnulib putenv module?

2024-05-16 Thread Bruno Haible
> Done in the two attached patches. I ran the following in Coreutils: > > ./bootstrap --no-git --skip-po --gnulib-srcdir="$GNULIB_SRCDIR" > > and everything worked fine. Thanks a lot! Bruno

Re: doc: Mention gnulib putenv module?

2024-05-16 Thread Collin Funk
Hi Bruno, On 5/16/24 1:54 PM, Bruno Haible wrote: >> Thanks for the guide. > > And also update doc/posix-functions/putenv.texi. > >> Should I update occurrences of 'putenv' to >> 'putenv-gnu' in dependencies > > Yes. (But this can come in a second commit.) > >> and then mark 'putenv' with the

Re: doc: Mention gnulib putenv module?

2024-05-16 Thread Bruno Haible
Hi Collin, > On 5/16/24 5:45 AM, Bruno Haible wrote: > > The way to deal with it, that is most consistent with the rest of Gnulib, > > is as follows: > > > > - Rename the 'putenv' module to 'putenv-gnu'. > > > > - Also change its description from: > > putenv() function: change or add an

Re: doc: Mention gnulib putenv module?

2024-05-16 Thread Collin Funk
Hi Bruno, On 5/16/24 5:45 AM, Bruno Haible wrote: > The way to deal with it, that is most consistent with the rest of Gnulib, > is as follows: > > - Rename the 'putenv' module to 'putenv-gnu'. > > - Also change its description from: > putenv() function: change or add an environment

Re: gnulib-tool Python tracebacks after control-C

2024-05-16 Thread Bruno Haible
Collin Funk wrote: > executing aclocal -I glm4 > ^C/home/collin/.local/src/gnulib/gnulib-tool.py: *** Stop. > $ echo $? > 1 > > Is that similar to what you were thinking of? I'm not sure what to put > for the error message. Feel free to commit something if this works for you. Yes, that's what I

Re: doc: Mention gnulib putenv module?

2024-05-16 Thread Bruno Haible
Hi Collin, > > But maybe something could be clarified: > > - Does POSIX still not allow to remove an environment variable using > > this function? > > I don't think that POSIX Issue 7 disallows it [1]. It appears that the > behavior when '=' is not in the string is up for the

Re: doc: Mention gnulib putenv module?

2024-05-16 Thread Collin Funk
Hi Bruno, On 5/16/24 3:19 AM, Bruno Haible wrote: >> Is there a reason why the Gnulib putenv module isn't mentioned on this >> line or can I apply this diff with a ChangeLog entry? > > It is mentioned at the end of this file. I saw. I was thinking maybe it should be mentioned on that line

Re: doc: Mention gnulib putenv module?

2024-05-16 Thread Bruno Haible
Hi Collin, > Is there a reason why the Gnulib putenv module isn't mentioned on this > line or can I apply this diff with a ChangeLog entry? It is mentioned at the end of this file. But maybe something could be clarified: - Does POSIX still not allow to remove an environment variable using

Re: [PATCH] putenv: Add tests.

2024-05-16 Thread Bruno Haible
Hi Collin, > * tests/test-putenv.c: New file. > * modules/putenv-tests: New file. Thanks; looks good to me. Bruno

[PATCH] putenv: Add tests.

2024-05-16 Thread Collin Funk
* tests/test-putenv.c: New file. * modules/putenv-tests: New file. --- ChangeLog| 6 + modules/putenv-tests | 13 ++ tests/test-putenv.c | 61 3 files changed, 80 insertions(+) create mode 100644 modules/putenv-tests create

doc: Mention gnulib putenv module?

2024-05-16 Thread Collin Funk
Is there a reason why the Gnulib putenv module isn't mentioned on this line or can I apply this diff with a ChangeLog entry? diff --git a/doc/posix-functions/putenv.texi b/doc/posix-functions/putenv.texi index b0ca4ab8b5..d9e15f5e38 100644 --- a/doc/posix-functions/putenv.texi +++