fixes for libunistring related recent changes

2023-08-04 Thread Bruno Haible
In a testdir of all modules, compiled in an environment where libunistring is installed, I see this compilation error: In file included from ../../gltests/unistr/test-u16-pcpy.c:28: ../../gltests/unistr/test-pcpy.h:34:15: error: call to undeclared function 'u16_pcpy'; ISO C99 and later do not sup

Re: mbcel module for Gnulib?, incomplete multibyte sequences

2023-08-04 Thread Bruno Haible
Paul Eggert wrote in : > Here are the results: > > noop mbiterf mbuiterfmbcel mbucel > a1.5462.0381.9311.6391.968 > b1.5452.0161.9361.7051.969 > c2.1538.160

Re: bug#64937: "who" reports funny dates

2023-08-04 Thread Bruno Haible
Paul Eggert wrote: > Thanks for doing all that work. I looked into it, and found a problem: a > command like "who /var/log/wtmp" stops working because the systemd > emulation of read_utmp only supports plain "who" (roughly equivalent to > "who /var/run/utmp" on Fedora). Probably the FILE argume

Re: bug#64937: "who" reports funny dates

2023-08-04 Thread Bruno Haible
Paul Eggert wrote: > 0002-readutmp-go-back-to-simple-free.patch When I run this on a Fedora Rawhide machine, I see that the ut_host field's contents is now botched. See: I added a printout of the ut_host field, surrounded by |...|. Previously, I got ==

Re: bug#64937: "who" reports funny dates

2023-08-04 Thread Bruno Haible
Paul Eggert wrote: > 0006-readutmp-switch-new-struct-to-struct-timespec.patch > get_boot_time (void) > { > - static int cached; > - static struct timeval boot_time; > + static bool cached; > + static struct timespec boot_time; > >if (!cached) > { > + cached = true; >

Re: bug#64937: "who" reports funny dates

2023-08-04 Thread Bruno Haible
Paul Eggert wrote: > 0001-maint-Update-after-gnulib-module-readutmp-changed.patch > +/* Work around , > + triggered by STREQ_LEN with a negative length. */ > +#if 11 <= __GNUC__ > +# pragma GCC diagnostic ignored "-Wstringop-overread" > +#end

Re: bug#64937: "who" reports funny dates

2023-08-04 Thread Bruno Haible
Paul Eggert wrote: > 0003-readutmp-fix-idx_t-FIXME-in-API.patch This causes a warning in the unit test: ../../gltests/test-readutmp.c:45:29: warning: pointer targets in passing argument 2 of ‘read_utmp’ differ in signedness [-Wpointer-sign] This patch fixes it. 2023-08-04 Bruno Haible

printf and INT_MAX

2023-08-04 Thread Bruno Haible
In coreutils, Paul Eggert did: > Don’t use printf if the output might in theory be longer than INT_MAX. It sounds like I should put the planned printf-without-INT_MAX-limitation changes [1] higher on my priority list... Bruno [1] https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00020.htm

Re: Including config.h emits warnings from -Wundef

2023-08-04 Thread Tim Rühsen
On 8/3/23 20:56, Jeffrey Walton wrote: My personal opinion is, there's nothing to fix. That is exactly how macros are supposed to work. Anything undefined evaluates to 0. It has been that way since the early days of C and C++. If there's a fix, then it is that you don't use -Wundef. -Wundef h