[RFC v4 2/4] string: Add streq,memeq,wcseq,wmemeq,strcaseeq[_l],wcscaseeq[_l] APIs

Paul Eggert eggert@cs.ucla.edu
Sun Sep 14 15:04:12 GMT 2025


On 2025-09-13 23:01, Alejandro Colomar wrote:
> +#ifdef __USE_GNU
> +/* Compare N bytes of M1 and M2 for equality.  */
> +#define memeq(m1, m2, n)  ((__bool) !__memcmpeq(m1, m2, n))
> +#endif

I doubt whether the standardization committee would bless this. It's 
fine to have a macro, but there should also be a function, which need 
not be inline. Yes, they haven't standardized it yet so we can do 
whatever we like as an extension, but why implement something that 
surely won't match what would be in a future standard?


More information about the Libc-alpha mailing list