Re: cvs commit: src/lib/libc/locale utf8.c

[ Available lists | Index of cvs-src | Month of Oct 2007 | Week of 27 Oct 2007 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Andrey Chernov <ache@nagual.pp.ru>
Date
27 Oct 2007 09:22:26
Subject
Re: cvs commit: src/lib/libc/locale utf8.c
Message-ID
20071027092213.GA53271@nagual.pp.ru

In reply to

[ Hide this part ]
On Sat, Oct 27, 2007 at 04:30:30PM +0800, 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
>
> Let me describe this patch in more details. Fist, we actually
> compile those inline functions as real functions in
> lib/libc/locale/nomacro.c if _EXTERNAL_CTYPE_INLINES_ is defined.
> I make 4 inline functions that use the __mb_sb_limit symbol,
> which break the compatibility, always compiled as real functions.
> I also considered that moving those inlined function in another
> C file, but I think it would make the source codes diverse
> among 6 and 7/8.

As a small improvement, we can skip __isctype() from this list too and
just hardcode 128 there, i.e.: return (_c < 0 || _c >= 128) ...
since default locale never define anything above 128.

--
http://ache.pp.ru/


Elapsed time: 0.287 seconds