Hi Paul,

On Wed, Sep 17, 2025 at 12:30:35PM -0700, Paul Eggert wrote:
> Thanks for all the followup fixes people have made to Gnulib's stringeq
> module. I installed into GNU coreutils a patch to use the result; this
> should test the module more.

Thanks!  This certainly should be counting as prior art in major users
for glibc and WG14.

> One amusing howler was fixed by this patch, in coreutils/src/rm.c:
> 
>   #define STREQ(a, b) (strcmp (a, b) == 0)
>   ...
>               if STREQ (optarg, "all")
>                 x.preserve_all_root = true;
> 
> That's valid C code, if somewhat ... unorthodox. It reminds me of Steve
> Bourne's use of C macros back in the 1970s. And that unparenthesized if has
> been there since 2018 without my noticing.

:D

> Anyway, I fixed it by surrounding the replacement streq call with
> parentheses.


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature

Reply via email to