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

Eric Blake eblake at redhat.com
Wed Oct 23 10:08:48 UTC 2013


On 10/23/2013 11:02 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

Ah, I see - the bug in RHEL 5 grep is in LANG=C.


>>>
>>> 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?

Oops, I typed one thing but meant another:
the \> fix (that Martin has already pushed) is all the more we need to
work around the RHEL 5 grep.

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

It's supposed to match space, but that's a problem for the RHEL 5 team
to answer.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131023/1ecb2ede/attachment-0001.sig>


More information about the libvir-list mailing list