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

View file

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

View file

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