Re: The current libc/locale/toupper.c is mistaken

From: Erik Cederstrand <erik_at_cederstrand.dk>
Date: Thu, 10 May 2012 13:41:17 +0200
Den 10/05/2012 kl. 12.03 skrev Dimitry Andric:

> On 2012-05-10 11:02, Kohji Okuno wrote:
>> I think that libc/locale/toupper.c is mistaken.
>> Could you check it?
>> 
>> _at__at_ -51,7 +51,7 _at__at_ ___toupper_l(c, l)
>> {
>>        size_t lim;
>>        FIX_LOCALE(l);
>> -       _RuneRange *rr = &XLOCALE_CTYPE(l)->runes->__maplower_ext;
>> +       _RuneRange *rr = &XLOCALE_CTYPE(l)->runes->__mapupper_ext;
>>        _RuneEntry *base, *re;
>> 
>>        if (c < 0 || c == EOF)
> 
> Yes, this definitely looks like a copy/paste error, introduced here:
> 
> http://svnweb.freebsd.org/base/head/lib/libc/locale/toupper.c?r1=165903&r2=227753
> 
> I'll commit the fix tonight (CEST), if David isn't faster than me. :)

I'm left wondering how this was not caught by the libc++ test suite. The current toupper.c shouldn't pass http://llvm.org/svn/llvm-project/libcxx/trunk/test/localization/locales/locale.convenience/conversions/conversions.character/toupper.pass.cpp

Thanks,
Erik
Received on Thu May 10 2012 - 09:41:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:26 UTC