[libvirt] [PATCH] build: Fix prohibit_int_ijk (and iijjkk) on RHEL 5

Claudio Bley cbley at av-test.de
Wed Oct 23 10:02:49 UTC 2013


At Wed, 23 Oct 2013 10:46:46 +0100,
Eric Blake wrote:
> 
> On 10/23/2013 09:33 AM, Claudio Bley wrote:
> 
> > Seems \s is buggy in this grep version with a non UTF-8 locale
> > setting. Observe:
> > 
> > $ LANG=en_US.UTF-8 grep -nE '\<(int|unsigned) ([^(]* )*(i|j|k)(\s|,|;)' src/conf/interface_conf.h
> > $ LANG=C grep -nE '\<(int|unsigned) ([^(]* )*(i|j|k)(\s|,|;)' src/conf/interface_conf.h
> 
> But 'syntax-check' should be already using grep in the C locale (if not,
> that's a bug upstream in gnulib).

But that's the point, the bug manifests itself with LANG=C, NOT with
LANG=*.UTF-8

> > According to grep's info pages \s should be equivalent to [[:space:]],
> > but it is not, as the latter works alright:
> > 
> > $ LANG=C grep -nE '\<(int|unsigned) ([^(]*)*(i|j|k)([[:space:]]|,|;)' src/conf/interface_conf.h 
> 
> If we go this route, we could simplify even further:
> 
> $ LANG=C grep -nE '\<(int|unsigned) ([^(] *)*[ijk][:space:],:]'
> src/conf/interface_conf.h
> 
> > 
> > So, I think the right fix would be to avoid \s altogether and use
> > [[:space:]] instead.
> 
> The \s usage was good enough to work around the grep bug

I'm confused. Which bug are you talking about?

> which is all the more we need to get the build working on RHEL 5

So, what does \s match with, when using LANG=C ?

Claudio
-- 
AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany
Phone: +49 341 265 310 19
Web:<http://www.av-test.org>

Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076)
Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern




More information about the libvir-list mailing list