diff -r bdd2944b914b -r a0eee409ff14 apicompatanamdw/compatanalysercmd/headeranalyser/src/Analyser.cpp --- a/apicompatanamdw/compatanalysercmd/headeranalyser/src/Analyser.cpp Mon Sep 20 10:04:46 2010 +0100 +++ b/apicompatanamdw/compatanalysercmd/headeranalyser/src/Analyser.cpp Mon Sep 27 14:51:17 2010 +0530 @@ -882,8 +882,9 @@ } } // END -- Support for multiple header directories - string forcedHeader; + string baseForcedHeader; + string curForcedHeader; char* base = new char[KMaxDirLength+1]; getcwd(base, KMaxDirLength); @@ -942,6 +943,9 @@ const vector& bIncs = iBasePlatformData->IncludesForHeader(baseHdr); forcedHeader.clear(); forcedHeader = baseHdr->CachedForcedInclude(); + // If the component contains all SHAi headers, then no need to include the deafult forced header. + if (forcedHeader == FORCED_SHAI_HDR) + baseForcedHeader = forcedHeader; // Find all include paths that are needed in compilation of this header: const vector& bPaths = iBasePlatformData->IncludePathsForHeader(baseHdr); @@ -1027,6 +1031,10 @@ const vector& cIncs = iProductPlatformData->IncludesForHeader(currHeader, baseHdr); forcedHeader.clear(); forcedHeader =currHeader->CachedForcedInclude(); + // If the component contains all SHAi headers, then no need to include the deafult forced header. + if (forcedHeader == FORCED_SHAI_HDR) + curForcedHeader = forcedHeader; + const vector& cPaths =iProductPlatformData->IncludePathsForHeader(currHeader); // Add include paths to the list, if it does not exist there yet: @@ -1128,9 +1136,16 @@ parser->setTemp(iParams.getParameter(TEMPDIR)); parser2->setTemp(iParams.getParameter(TEMPDIR)); - // Set forced headers - parser->setForcedHeaders(iForcedBaselineHeaders); - parser2->setForcedHeaders(iForcedCurrentHeaders); + // If this bundle is for SHAi headers, then ignore iForcedHeaders + //to solve Kernel Macro related compilation issues. + if(baseForcedHeader.size() == 0 ) + { + parser->setForcedHeaders(iForcedBaselineHeaders); + } + if(curForcedHeader.size() == 0 ) + { + parser2->setForcedHeaders(iForcedCurrentHeaders); + } if (createThread) { @@ -2595,31 +2610,28 @@ for(int j = 0; j < (int)cIncludes.size(); j++) { - bool fileMatched = false; - chdr= curSystemheaders.begin(); - for(;chdr != curSystemheaders.end(); chdr++) + bool fileMatched = false; + if(bString == cIncludes.at(j)) { - pair curHeader = *chdr; - string curFile = curHeader.first + DIR_SEPARATOR + cIncludes.at(j); - int loc = (int)curFile.find_last_of(DIR_SEPARATOR); - string curTemp = curFile.substr(loc+1 ,string::npos); - if(bString == curTemp) + includedHeaderPresent = true; + chdr= curSystemheaders.begin(); + for(;chdr != curSystemheaders.end(); chdr++) { - includedHeaderPresent = true; + pair curHeader = *chdr; + string curFile = curHeader.first + DIR_SEPARATOR + cIncludes.at(j); if(BBCFileUtils::FileExists(curFile) ) { fileMatched = true; // current file found in curr dir includes.at(out).second = curFile; break; - } + } } - } - - if ( fileMatched = false ) - { - // file does not exists in curdir - report.addIssue(baseResource.RHFileName, includes.at(out).first, EIssueIdentityFile, - EIssueTypeRemoval,ESeverityBBCBreak,ESeveritySCNULL, "", 0, "",curResource.RHFileName,""); + if ( fileMatched == false ) + { + // file does not exists in curdir + report.addIssue(baseResource.RHFileName, includes.at(out).first, EIssueIdentityFile, + EIssueTypeRemoval,ESeverityBBCBreak,ESeveritySCNULL, "", 0, "",curResource.RHFileName,""); + } break; } }