From owner-freebsd-current@FreeBSD.ORG Fri May 11 01:42:50 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 EB6C2106566B; Fri, 11 May 2012 01:42:50 +0000 (UTC) (envelope-from okuno.kohji@jp.panasonic.com) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by mx1.freebsd.org (Postfix) with ESMTP id 74C1E8FC08; Fri, 11 May 2012 01:42:50 +0000 (UTC) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id q4B1gjTF009610; Fri, 11 May 2012 10:42:45 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili12) with ESMTP id q4B1gjG07636; Fri, 11 May 2012 10:42:45 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi15) id q4B1gj0b025771; Fri, 11 May 2012 10:42:45 +0900 Received: from localhost by lomi15.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id q4B1gir7025746; Fri, 11 May 2012 10:42:44 +0900 Date: Fri, 11 May 2012 10:42:42 +0900 (JST) Message-Id: <20120511.104242.19192035427185902.okuno.kohji@jp.panasonic.com> To: erik@cederstrand.dk From: Kohji Okuno In-Reply-To: <59B6B059-ED46-4C1B-B72D-D6DFA906BFFB@cederstrand.dk> References: <20120510.180247.93202495593231609.okuno.kohji@jp.panasonic.com> <4FAB9289.8060808@FreeBSD.org> <59B6B059-ED46-4C1B-B72D-D6DFA906BFFB@cederstrand.dk> Organization: Panasonic Corporation X-Mailer: Mew version 6.4 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: okuno.kohji@jp.panasonic.com, freebsd-current@freebsd.org, theraven@FreeBSD.org 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:42:51 -0000 Hi Eric, > 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 This test suite checks only popular characters. __mapupper_ext is used in case of special characters. For example, Turkish 'i' (0x0131) should convert 'I' (0x49). Regards, Kohji Okuno > 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? >>> >>> @@ -51,7 +51,7 @@ ___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_______________________________________________ > 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"