From 0f4411d2731be4dd1f284955f97de7828636a26c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 10 Sep 2010 07:35:58 +0000 Subject: [PATCH] Added support for operator != (not equal to). Undefine CONFIG_SUSE_KERNEL. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2084 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/specialize-patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 25b1cd99a..cdef92484 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -68,6 +68,8 @@ function evaluate(stmnt) { gsub("defined\\(BACKPORT_LINUX_WORKQUEUE_TO_2_6_19\\)", "0", stmnt) + gsub("defined\\(CONFIG_SUSE_KERNEL\\)", "0", stmnt) + if (RHEL_MAJOR == "") { gsub("defined\\(RHEL_MAJOR\\)", "0", stmnt) @@ -170,7 +172,7 @@ function evaluate(stmnt) { sub(pattern, result, stmnt) } - pattern="(-*[0-9]+) *(<|<=|>|>=|==) *(-*[0-9]+)" + pattern="(-*[0-9]+) *(<|<=|>|>=|==|!=) *(-*[0-9]+)" while (match(stmnt, pattern, op) != 0) { result="error" @@ -179,6 +181,7 @@ function evaluate(stmnt) { else if (op[2] == ">" ) result = op[1] > op[3] else if (op[2] == ">=") result = op[1] >= op[3] else if (op[2] == "==") result = op[1] == op[3] + else if (op[2] == "!=") result = op[1] != op[3] sub(pattern, result, stmnt) }