[Click] [PATCH 02/12] Configury: fixincludes update to fix c++ keywords in inline assembly

Joonwoo Park joonwpark81 at gmail.com
Sun Sep 26 01:29:07 EDT 2010


eliminate following build error on linux 2.6.35 arch x86_64
include/click-linuxmodule/include0/asm/uaccess_64.h: In function ‘copy_user_generic’:
include/click-linuxmodule/include0/asm/uaccess_64.h:32: error: undefined named operand ‘new’

Signed-off-by: Joonwoo Park <joonwpark81 at gmail.com>
---
 linuxmodule/fixincludes.pl |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/linuxmodule/fixincludes.pl b/linuxmodule/fixincludes.pl
index 54a0813..a4c9aa7 100755
--- a/linuxmodule/fixincludes.pl
+++ b/linuxmodule/fixincludes.pl
@@ -209,6 +209,11 @@ sub one_includeroot ($$) {
 	    # unquote.
 	    $_ = sunprotect($_);
 
+	    # "new" and other keywords in inline assembler
+	    s{(\basm\b.*)+(".*?[^\\])(\bnew\b)(.*")}{$1$2new_value$4}g;
+	    s{(\basm\b.*)+(".*?[^\\])(\band\b)(.*")}{$1$2and_value$4}g;
+	    s{(\basm\b.*)+(".*?[^\\])(\bswap\b)(.*")}{$1$2swap_value$4}g;
+
 	    # perhaps nothing has changed; avoid changing the timestamp
 	    if (-f "$outputroot$dd/$d") {
 		open(F, "$outputroot$dd/$d");
-- 
1.7.0.4



More information about the click mailing list