rsc/source/prj/start.cxx |   17 +++++++++++++++++
 rsc/source/rscpp/cpp3.c  |   14 +-------------
 2 files changed, 18 insertions(+), 13 deletions(-)

New commits:
commit d75049f9785db101d6ecb043a4576652b71da2a7
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Jun 27 14:04:39 2014 +0200

    rsc: fix how -isystem args are filtered out for the preproc
    
    Change-Id: I7688f3d68be99362e79304bbac041424eee6347a

diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx
index 7c7cc32..7c926f0 100644
--- a/rsc/source/prj/start.cxx
+++ b/rsc/source/prj/start.cxx
@@ -75,6 +75,23 @@ static bool CallPrePro( const OString& rInput,
             bVerbose = true;
             continue;
         }
+        if (strcmp(static_cast<char *>(pCmdLine->GetEntry(i)), "-isystem") == 
0)
+        {
+            // ignore "-isystem" and following arg
+            if (i < int(pCmdLine->GetCount()) - 1)
+            {
+                ++i;
+            }
+            continue;
+        }
+        if (strncmp(
+                static_cast<char *>(pCmdLine->GetEntry(i)), "-isystem",
+                strlen("-isystem"))
+            == 0)
+        {
+            // ignore args starting with "-isystem"
+            continue;
+        }
         if ( !rsc_strnicmp( (char *)pCmdLine->GetEntry( i ), "-u", 2 ) ||
              !rsc_strnicmp( (char *)pCmdLine->GetEntry( i ), "-i", 2 ) ||
              !rsc_strnicmp( (char *)pCmdLine->GetEntry( i ), "-d", 2 ))
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index 02361649..287b2a5 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -217,19 +217,7 @@ dooptions(int argc, char** argv)
         for (i = j = 1; i < argc; i++) {
             arg = ap = argv[i];
 
-            if (strcmp(arg, "-isystem") == 0)
-            {
-                // ignore "-isystem" and following arg
-                if (i < argc)
-                {
-                    ++i;
-                }
-            }
-            else if (strncmp(arg, "-isystem", strlen("-isystem")) == 0)
-            {
-                // ignore args starting with "-isystem"
-            }
-            else if (*ap++ != '-' || *ap == EOS)
+            if (*ap++ != '-' || *ap == EOS)
             {
                     argv[j++] = argv[i];
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to