rsc/source/prj/start.cxx | 15 ++++++++++++++- rsc/source/rsc/rsc.cxx | 15 ++++++++++++++- rsc/source/rscpp/cpp3.c | 14 +++++++++++++- 3 files changed, 41 insertions(+), 3 deletions(-)
New commits: commit 7c5a21dd4142c414de4e5925533e8cfbb6f329b0 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jun 26 22:32:13 2014 +0200 rsc: ignore -isystem args Change-Id: Ic46b84d740159826542ead857d15230d54547d88 diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 46c62a7..7c7cc32 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -235,7 +235,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) bool bSetSrs = false; while( ppStr && i < (aCmdLine.GetCount() -1) ) { - if( '-' == **ppStr ) + if (strcmp(*ppStr, "-isystem") == 0) + { + // ignore "-isystem" and following arg + if (i < aCmdLine.GetCount() - 1) + { + ++ppStr; + ++i; + } + } + else if (strncmp(*ppStr, "-isystem", strlen("-isystem")) == 0) + { + // ignore args starting with "-isystem" + } + else if( '-' == **ppStr ) { if( !rsc_stricmp( (*ppStr) + 1, "p" ) || !rsc_stricmp( (*ppStr) + 1, "l" ) ) diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 0fac410..e5a7228 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -100,7 +100,20 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "CmdLineArg: \"%s\"\n", *ppStr ); #endif - if( '-' == **ppStr ) + if (strcmp(*ppStr, "-isystem") == 0) + { + // ignore "-isystem" and following arg + if (i < aCmdLine.GetCount() - 1) + { + ++ppStr; + ++i; + } + } + else if (strncmp(*ppStr, "-isystem", strlen("-isystem")) == 0) + { + // ignore args starting with "-isystem" + } + else if( '-' == **ppStr ) { if( !rsc_stricmp( (*ppStr) + 1, "h" ) || !strcmp( (*ppStr) + 1, "?" ) ) diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 287b2a5..02361649 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -217,7 +217,19 @@ dooptions(int argc, char** argv) for (i = j = 1; i < argc; i++) { arg = ap = argv[i]; - if (*ap++ != '-' || *ap == EOS) + 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) { argv[j++] = argv[i]; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits