From edb8da8616ae0c42f426a86d35462df25891553d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 13 Aug 2009 18:29:59 +0000 Subject: [PATCH] - Remove the line "+#define SCSI_EXEC_REQ_FIFO_DEFINED" from the generated patch. - Substitute "defined(SCSI_EXEC_REQ_FIFO_DEFINED)" by "1" in preprocessor statements. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1045 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/specialize-patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/specialize-patch b/scripts/specialize-patch index cb25c063b..fce6920a7 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -91,6 +91,9 @@ function evaluate(stmnt) { gsub("RHEL_RELEASE_CODE", RHEL_MAJOR * 256 + RHEL_MINOR, stmnt) } + gsub("defined *SCSI_EXEC_REQ_FIFO_DEFINED", "1", stmnt) + gsub("defined *\\( *SCSI_EXEC_REQ_FIFO_DEFINED *\\)", "1", stmnt) + do { last_stmnt = stmnt @@ -234,7 +237,8 @@ function process_preprocessor_statement() { output = output && decision[i] != "+#if 0" } } - if (output && (! condition || condition && matching_if !~ "^+#if [01]")) + if (output && (! condition || condition && matching_if !~ "^+#if [01]") \ + && ! (evaluated ~ "^+#define SCSI_EXEC_REQ_FIFO_DEFINED$")) { line[lines++]=$0 }