]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: Fix prohibit_int_ijk (and iijjkk) on RHEL 5
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 22 Oct 2013 16:09:57 +0000 (17:09 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 22 Oct 2013 22:01:18 +0000 (23:01 +0100)
On RHEL 5, make syntax-check was failing because even strings like
'int isTempChain' matched the 'int i' rule.  To be honest, I haven't
found the root cause, but the change added makes it work as expected
and keeps the proper behavior on newer systems as well.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 56821e249d953a6ac16e085ede62964ce2b269a2..e9da28210d5baa707ca90a95bf9bfb7897c1a7c8 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -555,12 +555,12 @@ sc_avoid_attribute_unused_in_header:
          $(_sc_search_regexp)
 
 sc_prohibit_int_ijk:
-       @prohibit='\<(int|unsigned) ([^(]* )*(i|j|k)(\s|,|;)'           \
+       @prohibit='\<(int|unsigned) ([^(]* )*(i|j|k)\>(\s|,|;)'         \
        halt='use size_t, not int/unsigned int for loop vars i, j, k'   \
          $(_sc_search_regexp)
 
 sc_prohibit_loop_iijjkk:
-       @prohibit='\<(int|unsigned) ([^=]+ )*(ii|jj|kk)(\s|,|;)'        \
+       @prohibit='\<(int|unsigned) ([^=]+ )*(ii|jj|kk)\>(\s|,|;)'      \
        halt='use i, j, k for loop iterators, not ii, jj, kk'           \
          $(_sc_search_regexp)