msvc6 compatibility

svn path=/trunk/; revision=17493
This commit is contained in:
Royce Mitchell III 2005-08-23 23:06:58 +00:00
parent 431f66d687
commit 07b11a6760
3 changed files with 17 additions and 5 deletions

View file

@ -376,11 +376,12 @@ AutomaticDependency::GetIncludeDirectories ( vector<Include*>& includes,
Include& currentDirectory,
bool searchCurrentDirectory )
{
size_t i;
if ( searchCurrentDirectory )
includes.push_back( &currentDirectory );
for ( size_t i = 0; i < module.non_if_data.includes.size (); i++ )
for ( i = 0; i < module.non_if_data.includes.size (); i++ )
includes.push_back( module.non_if_data.includes[i] );
for ( size_t i = 0; i < module.project.non_if_data.includes.size (); i++ )
for ( i = 0; i < module.project.non_if_data.includes.size (); i++ )
includes.push_back( module.project.non_if_data.includes[i] );
}
@ -469,11 +470,12 @@ void
AutomaticDependency::CheckAutomaticDependenciesForModule ( Module& module,
bool verbose )
{
size_t mi;
vector<const Module*> modules;
GetModulesToCheck ( module, modules );
for ( size_t mi = 0; mi < modules.size (); mi++ )
for ( mi = 0; mi < modules.size (); mi++ )
ParseFiles ( *modules[mi] );
for ( size_t mi = 0; mi < modules.size (); mi++ )
for ( mi = 0; mi < modules.size (); mi++ )
CheckAutomaticDependencies ( *modules[mi], verbose );
}

View file

@ -19,7 +19,9 @@
#include "mingw.h"
#include <assert.h>
#ifndef _MSC_VER
#include <dirent.h>
#endif//_MSC_VER
#include "modulehandler.h"
#ifdef WIN32
@ -88,6 +90,7 @@ Directory::Add ( const char* subdir )
bool
Directory::mkdir_p ( const char* path )
{
#ifndef _MSC_VER
DIR *directory;
directory = opendir ( path );
if ( directory != NULL )
@ -95,9 +98,16 @@ Directory::mkdir_p ( const char* path )
closedir ( directory );
return false;
}
#endif//_MSC_VER
if ( MKDIR ( path ) != 0 )
{
#ifdef _MSC_VER
if ( errno == EEXIST )
return false;
#endif//_MSC_VER
throw AccessDeniedException ( string ( path ) );
}
return true;
}

View file

@ -107,7 +107,7 @@ StubbedSymbol::StripSymbol ( string symbol )
size_t end = symbol.length () - 1;
while ( end > 0 && isdigit ( symbol[end] ) )
end--;
if ( end > 0 and symbol[end] == '@' )
if ( end > 0 && symbol[end] == '@' )
end--;
if ( end > 0 )
return symbol.substr ( start, end - start + 1 );