From owner-freebsd-current@FreeBSD.ORG Fri May 11 01:46:05 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32D941065670 for ; Fri, 11 May 2012 01:46:05 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id D86F48FC0A for ; Fri, 11 May 2012 01:46:04 +0000 (UTC) Received: from [192.168.14.46] ([24.114.252.244]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q4B1k0nP071801 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 11 May 2012 01:46:01 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120511.104242.19192035427185902.okuno.kohji@jp.panasonic.com> Date: Thu, 10 May 2012 21:46:00 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120510.180247.93202495593231609.okuno.kohji@jp.panasonic.com> <4FAB9289.8060808@FreeBSD.org> <59B6B059-ED46-4C1B-B72D-D6DFA906BFFB@cederstrand.dk> <20120511.104242.19192035427185902.okuno.kohji@jp.panasonic.com> To: Kohji Okuno X-Mailer: Apple Mail (2.1257) Cc: freebsd-current@FreeBSD.org, erik@cederstrand.dk Subject: Re: The current libc/locale/toupper.c is mistaken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 01:46:05 -0000 If you have a test case, I can commit it to the libc++ test suite. David On 10 May 2012, at 21:42, Kohji Okuno wrote: > Hi Eric, >=20 >> 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/lo= cale.convenience/conversions/conversions.character/toupper.pass.cpp >=20 > This test suite checks only popular characters. > __mapupper_ext is used in case of special characters. >=20 > For example, Turkish 'i' (0x0131) should convert 'I' (0x49). >=20 > Regards, > Kohji Okuno >=20 >=20 >> Den 10/05/2012 kl. 12.03 skrev Dimitry Andric: >>=20 >>> On 2012-05-10 11:02, Kohji Okuno wrote: >>>> I think that libc/locale/toupper.c is mistaken. >>>> Could you check it? >>>>=20 >>>> @@ -51,7 +51,7 @@ ___toupper_l(c, l) >>>> { >>>> size_t lim; >>>> FIX_LOCALE(l); >>>> - _RuneRange *rr =3D = &XLOCALE_CTYPE(l)->runes->__maplower_ext; >>>> + _RuneRange *rr =3D = &XLOCALE_CTYPE(l)->runes->__mapupper_ext; >>>> _RuneEntry *base, *re; >>>>=20 >>>> if (c < 0 || c =3D=3D EOF) >>>=20 >>> Yes, this definitely looks like a copy/paste error, introduced here: >>>=20 >>> = http://svnweb.freebsd.org/base/head/lib/libc/locale/toupper.c?r1=3D165903&= r2=3D227753 >>>=20 >>> I'll commit the fix tonight (CEST), if David isn't faster than me. = :) >>=20 >> 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/lo= cale.convenience/conversions/conversions.character/toupper.pass.cpp >>=20 >> Thanks, >> Erik_______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org"