This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [SPATCH] Use __glibc_likely and __glibc_unlikely.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 30 May 2013 12:38:56 +0200
- Subject: Re: [SPATCH] Use __glibc_likely and __glibc_unlikely.
- References: <20130520192853 dot GA4462 at domone dot kolej dot mff dot cuni dot cz> <Pine dot LNX dot 4 dot 64 dot 1305202227110 dot 18212 at digraph dot polyomino dot org dot uk> <20130521072500 dot GA3426 at domone dot kolej dot mff dot cuni dot cz> <201305220200 dot 00703 dot vapier at gentoo dot org>
On Wed, May 22, 2013 at 01:59:59AM -0400, Mike Frysinger wrote:
> On Tuesday 21 May 2013 03:25:00 OndÅej BÃlka wrote:
> > On Mon, May 20, 2013 at 10:30:11PM +0000, Joseph S. Myers wrote:
> > > On Mon, 20 May 2013, Ondï~Yej BÃlka wrote:
> > > > http://kam.mff.cuni.cz/~ondra/expect.patch
> > >
> > > This appears to be consistently missing a space before the open
> > > parenthesis, "__glibc_likely(". It also appears to have produced
> > > too-long lines, losing newlines inside the calls when instead the
> > > multiline call contents should be reindented appropriately and only move
> > > onto a single line when the change makes the contents short enough to do
> > > so.
> >
> > It is by coccinette design. Choices are:
> >
> > 1. Ignore formating now and fix later. (it is too much to format manualy.)
> > 2. Ask coccinette team to add flag that does formating in gnu style.
> > 3. Use formatter.
>
> i don't think it's that much trouble. just do:
> (1) run coccinette to convert everything to new __glibc_likely helpers
> (2) run `git diff > f`
> (3) run `patch -p1 -R < f`
> (4) run `sed -i -r 's:(__glibc_(un)?likely)[(]:\1 (:' f`
> (5) run `patch -p1 < f`
> (6) run `git commit -a`
> -mike
I wrote a simple patch that will solve this generaly. I will post it
separately.