From 07b11a67602744d619ef014268aa794ae7928b15 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Tue, 23 Aug 2005 23:06:58 +0000 Subject: [PATCH] msvc6 compatibility svn path=/trunk/; revision=17493 --- reactos/tools/rbuild/automaticdependency.cpp | 10 ++++++---- reactos/tools/rbuild/backend/mingw/mingw.cpp | 10 ++++++++++ reactos/tools/rbuild/stubbedcomponent.cpp | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/reactos/tools/rbuild/automaticdependency.cpp b/reactos/tools/rbuild/automaticdependency.cpp index 10c9553d496..93e31076adb 100644 --- a/reactos/tools/rbuild/automaticdependency.cpp +++ b/reactos/tools/rbuild/automaticdependency.cpp @@ -376,11 +376,12 @@ AutomaticDependency::GetIncludeDirectories ( vector& includes, Include& currentDirectory, bool searchCurrentDirectory ) { + size_t i; if ( searchCurrentDirectory ) includes.push_back( ¤tDirectory ); - 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 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 ); } diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 9ea313783ee..c56e5300ebf 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -19,7 +19,9 @@ #include "mingw.h" #include +#ifndef _MSC_VER #include +#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; } diff --git a/reactos/tools/rbuild/stubbedcomponent.cpp b/reactos/tools/rbuild/stubbedcomponent.cpp index abd69fc68e5..ce6d7f20856 100644 --- a/reactos/tools/rbuild/stubbedcomponent.cpp +++ b/reactos/tools/rbuild/stubbedcomponent.cpp @@ -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 );