Re: Native windows boot-time

2024-05-24 Thread Collin Funk
On 5/24/24 8:56 PM, Bruno Haible wrote: > readutmp now needs a module dependency on gettimetoday, right? Oops, yes. Because readutmp doesn't use boot-time as a dependency, instead it uses the boot-time-aux.h file. I've pushed the attached patch. CollinFrom ff1594abd5d7d4a74bc3f7f089eaf101bcab863

Re: Native windows boot-time

2024-05-24 Thread Bruno Haible
Collin Funk wrote: > I've fixed those in the attached patch and pushed it. Thanks. readutmp now needs a module dependency on gettimetoday, right? Bruno

Re: Native windows boot-time

2024-05-24 Thread Collin Funk
Hi Bruno, On 5/24/24 3:50 PM, Bruno Haible wrote: > - In line 393 the #endif is misindented. > - The readutmp module is a second user of boot-time-aux.h. It should also > make a call to get_windows_boot_time_fallback. Ah, now I see why those functions are in a header file. I've fixed those in t

Re: Native windows boot-time

2024-05-24 Thread Bruno Haible
Hi Collin, > I wrote this patch just now. Any thoughts? - In line 393 the #endif is misindented. - The readutmp module is a second user of boot-time-aux.h. It should also make a call to get_windows_boot_time_fallback. Other than that, it's OK to push. > I've only tested it with a mingw compil

Re: Native windows boot-time

2024-05-24 Thread Collin Funk
Hi Bruno, On 5/24/24 4:44 AM, Bruno Haible wrote: > The longer the API is available, the better. Gnulib supports > Windows XP as the minimum. For modules used by Emacs ('boot-time' in > particular) it should run even on Windows 2000. > > Which means that the code needs to fetch a pointer to the p

Re: Native windows boot-time

2024-05-24 Thread Collin Funk
Hi Bruno, On 5/24/24 4:44 AM, Bruno Haible wrote: >> Does the get_windows_boot_time () not work on Native Windows? The >> Mingw and MSVC actions fail it. > > There's apparently a difference between a full installation of > Windows 10 and the image that they use in the Microsoft Azure cloud. Ah,

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

2024-05-24 Thread Bruno Haible
Paul Eggert wrote: > > It is not spam. It is fully justified, since in > >putenv ((char []) {"TEST_VAR=abc"}) > > the argument is allocated in automatic storage. See ISO C § 6.5.2.5.(12). > > Well, to be fair, the test program removed the string from the > environment before 'main' returned

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

2024-05-24 Thread Paul Eggert
On 2024-05-24 03:55, Bruno Haible wrote: It is not spam. It is fully justified, since in putenv ((char []) {"TEST_VAR=abc"}) the argument is allocated in automatic storage. See ISO C § 6.5.2.5.(12). Well, to be fair, the test program removed the string from the environment before 'main' ret

Re: Native windows boot-time

2024-05-24 Thread Bruno Haible
Hi Collin, > Does the get_windows_boot_time () not work on Native Windows? The > Mingw and MSVC actions fail it. There's apparently a difference between a full installation of Windows 10 and the image that they use in the Microsoft Azure cloud. > I'm thinking that it could be implemented using G

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

2024-05-24 Thread Collin Funk
On 5/24/24 3:55 AM, Bruno Haible wrote: >> I think this change may have uncovered a GCC bug? I noticed lots of >> -Wanalyzer-putenv-of-auto-var spam in testdirs. > > It is not spam. It is fully justified, since in > putenv ((char []) {"TEST_VAR=abc"}) > the argument is allocated in automatic sto

Re: [PATCH] POSIX.1-2024 has been approved

2024-05-24 Thread Bruno Haible
Great news, and thanks for the doc update. Bruno

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

2024-05-24 Thread Bruno Haible
Collin Funk wrote: > The putenv > function places the pointer that it is given into the environment. > When it goes out of scope the behavior is undefined [1]. Yes. Practically this means that the code in the exit() function (which gets executed after main() returns) may call getenv(), and this ca

Re: [PATCH] putenv tests: Silence -Wanalyzer-putenv-of-auto-var.

2024-05-24 Thread Bruno Haible
Collin Funk wrote: > + putenv tests: Silence -Wanalyzer-putenv-of-auto-var. > + * tests/test-putenv.c (main): Declare static variables to pass to > + putenv. While fixing one problem, this patch reintroduced another one. Namely, the argument to putenv needs to be - of unlimited life

Re: mbrtoc32: Work around bug in Cygwin 3.5.3

2024-05-24 Thread Bruno Haible
I did: > 2024-05-23 Bruno Haible > > mbrtoc32: Strengthen tests. > * tests/test-mbrtoc32.c (main): Add tests for one-by-one input in the > UTF-8 and GB18030 encodings. Oops, the new test fails on Solaris 11.4. Fixed as follows: 2024-05-24 Bruno Haible mbrtoc32

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

2024-05-24 Thread Collin Funk
Hi Paul, On 5/16/24 10:42 PM, Paul Eggert wrote: > diff --git a/tests/test-putenv.c b/tests/test-putenv.c > index 1768e7563a..564c86713a 100644 > --- a/tests/test-putenv.c > +++ b/tests/test-putenv.c > @@ -39,7 +39,7 @@ main (void) > >/* Verify adding an environment variable. */ >{ > -