Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2007 09:09:32 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Rong-en Fan <grafan@gmail.com>
Cc:        Scott Long <scottl@samsco.org>, src-committers@freebsd.org, d@delphij.net, John Baldwin <jhb@freebsd.org>, Andrey Chernov <ache@nagual.pp.ru>, Robert Watson <rwatson@freebsd.org>, cvs-src@freebsd.org, imp@freebsd.org
Subject:   Re: cvs commit: src/lib/libc/locale utf8.c
Message-ID:  <Pine.GSO.4.64.0710270901500.8500@sea.ntplx.net>
In-Reply-To: <6eb82e0710270130o5557efew95f62aef8035d209@mail.gmail.com>
References:  <200710150951.l9F9pUm7026506@repoman.freebsd.org>  <20071025233536.B99770@fledge.watson.org> <472120E8.90504@samsco.org>  <200710261144.34645.jhb@freebsd.org> <472217C2.8020800@samsco.org>  <6eb82e0710260954m73b3f17bq2c72a4cdb597640e@mail.gmail.com> <6eb82e0710270130o5557efew95f62aef8035d209@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 27 Oct 2007, Rong-en Fan wrote:

> On 10/27/07, Rong-en Fan <grafan@gmail.com> wrote:
> [...]
>> I admit that I really did a very bad abi damage on libc. I have been
>> working on it and
>> removing those inline __* functions in _ctype.h help. It can be upgraded and
>> also downgraded without problems. Without those inline stuffs,
>> buildworld+installworld
>> time difference is less than 60 seconds, which looks good. I will post the
>> patch after some more tests.
>>
>> As for RELENG_7 and HEAD, I'm not 100% sure whether we should restore
>> the compatibility as 1) 7.0 is not released yet, 2) we don't promise
>> anything in
>> HEAD branch. However, if most people think get rid of inline stuffs and
>> have libc compatibility are nice, then we do the same for those two branches.
>
> After some tests, the patch is at
>
> http://people.freebsd.org/~rafan/ctype-abi-fix-6.diff

Why do we need to expose __mb_sb_limit at all even in 7.x or HEAD?
It doesn't seem like it can be anything greater than _CACHED_RUNES,
so why don't we always just ensure that __runetype, __maplower,
etc are all sized appropriately.  In the error case (_c >= 
__mb_sb_limit), we just return 0 anyways, so if unused __runetype[]
were initialized to 0 in the implementation for unused entries, this 
__sbmaskrune() could become:

 	__sbmaskrune(__ct_rune_t _c, unsigned long _f)
 	{
 		return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
 		    _CurrentRuneLocale->__runetype[_c] & _f;
 	}

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0710270901500.8500>