- Remove the line "+#define SCSI_EXEC_REQ_FIFO_DEFINED" from the generated
authorbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 13 Aug 2009 18:29:59 +0000 (18:29 +0000)
committerbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 13 Aug 2009 18:29:59 +0000 (18:29 +0000)
  patch.
- Substitute "defined(SCSI_EXEC_REQ_FIFO_DEFINED)" by "1" in preprocessor
  statements.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1045 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scripts/specialize-patch

index cb25c06..fce6920 100755 (executable)
@@ -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
   }