char **Scanner::makeIncludePathChecks( const char *thisFileName,
const char *fileName, int fnlen )
{
char **Scanner::makeIncludePathChecks( const char *thisFileName,
const char *fileName, int fnlen )
{
- char **checks = new char*[2];
-
- bool caseInsensitive = false;
+ bool caseInsensitive = false;
char *data = prepareLitString( InputLoc(), fileName, fnlen,
length, caseInsensitive );
/* Absolute path? */
char *data = prepareLitString( InputLoc(), fileName, fnlen,
length, caseInsensitive );
/* Absolute path? */
- if ( isAbsolutePath( data ) )
+ if ( isAbsolutePath( data ) ) {
+ checks = new char*[2];
checks[nextCheck++] = data;
checks[nextCheck++] = data;
+ checks = new char*[2 + id.includePaths.length()];
+
/* Search from the the location of the current file. */
const char *lastSlash = strrchr( thisFileName, PATH_SEP );
if ( lastSlash == 0 )
/* Search from the the location of the current file. */
const char *lastSlash = strrchr( thisFileName, PATH_SEP );
if ( lastSlash == 0 )