Subject: Re: bug#11786: Use c_strcasecmp for portable ASCII case-insensitive comparison

From: Paul Eggert <[email-masked]>
Date: Tue, 26 Jun 2012 10:25:17 -0700

On 06/26/2012 09:31 AM, Eli Zaretskii wrote:
> I think having a custom replacement for tolower, perhaps using
> the code of c_tolower from gnulib or its equivalent, will resolve
> this.

Yes, that's right, and that's why Emacs should use
gnulib c_strcasecmp.  c_strcasecmp does what
you're saying (it uses c_tolower), and it's
off-the-shelf code, so it means Emacs can get rid of
etags_strcasecmp, lwlib_strcasecmp, and xstrcasecmp
(all of which do essentially the same thing).  This
shrinks and simplifies the source code of Emacs proper.

This change was prompted by Dmitry's recent change to use
strcasecmp.  That change simplified Emacs
but introduced portability problems.  This new change
further simplifies Emacs proper and also fixes
portability problems.