Author: fireball
Date: Tue Dec 23 08:19:19 2008
New Revision: 38300
URL:
http://svn.reactos.org/svn/reactos?rev=38300&view=rev
Log:
- Replace all deprecated functions with underscored names.
- Add _CRT_SECURE_NO_DEPRECATE to VC project file to suppress security warnings.
Modified:
trunk/reactos/tools/rbuild/automaticdependency.cpp
trunk/reactos/tools/rbuild/backend/backend.cpp
trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp
trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp
trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp
trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
trunk/reactos/tools/rbuild/compilationunit.cpp
trunk/reactos/tools/rbuild/directory.cpp
trunk/reactos/tools/rbuild/module.cpp
trunk/reactos/tools/rbuild/rbuild.vcproj
trunk/reactos/tools/rbuild/testsupportcode.cpp
Modified: trunk/reactos/tools/rbuild/automaticdependency.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/automaticdepe…
==============================================================================
--- trunk/reactos/tools/rbuild/automaticdependency.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/automaticdependency.cpp [iso-8859-1] Tue Dec 23 08:19:19
2008
@@ -60,7 +60,7 @@
if ( !f )
throw FileNotFoundException ( filename );
- if ( fstat ( fileno ( f ), &statbuf ) != 0 )
+ if ( fstat ( _fileno ( f ), &statbuf ) != 0 )
{
fclose ( f );
throw AccessDeniedException ( filename );
Modified: trunk/reactos/tools/rbuild/backend/backend.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/backe…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/backend.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/backend.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008
@@ -32,7 +32,7 @@
Backend::Factory::Factory ( const std::string& name_, const std::string&
description_ )
{
string name(name_);
- strlwr ( &name[0] );
+ _strlwr ( &name[0] );
if ( !ref++ )
factories = new map<string,Factory*>;
(*factories)[name] = this;
@@ -55,7 +55,7 @@
Configuration& configuration )
{
string sname ( name );
- strlwr ( &sname[0] );
+ _strlwr ( &sname[0] );
if ( !factories || !factories->size () )
throw InvalidOperationException ( __FILE__,
__LINE__,
Modified: trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/codeb…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] Tue Dec 23
08:19:19 2008
@@ -268,7 +268,7 @@
string::size_type pos = file.find_last_of (sSep);
if ( pos != string::npos )
file.erase ( 0, pos+1 );
- if ( !stricmp ( Right(file,3).c_str(), ".rc" ) )
+ if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) )
file = ReplaceExtension ( file, ".res" );
else
file = ReplaceExtension ( file, ".obj" );
@@ -429,7 +429,7 @@
string fullpath = files[i]->file.relative_path + sSep + files[i]->file.name;
string file = string(".") + &fullpath[cbproj_path.size()];
- if ( !stricmp ( Right(file,3).c_str(), ".rc" ) )
+ if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) )
resource_files.push_back ( file );
else
source_files.push_back ( file );
Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Tue Dec 23 08:19:19
2008
@@ -621,7 +621,7 @@
if ( !f )
throw FileNotFoundException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) );
- if ( fstat ( fileno ( f ), &statbuf ) != 0 )
+ if ( fstat ( _fileno ( f ), &statbuf ) != 0 )
{
fclose ( f );
throw AccessDeniedException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename )
);
@@ -1064,7 +1064,7 @@
{
usePipe = (exitcode == 0);
fclose ( f );
- unlink ( pipe_detectionObjectFilename.c_str () );
+ _unlink ( pipe_detectionObjectFilename.c_str () );
}
else
usePipe = false;
@@ -1097,7 +1097,7 @@
{
use_pch = true;
fclose ( f );
- unlink ( path.c_str () );
+ _unlink ( path.c_str () );
}
else
use_pch = false;
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Tue Dec 23
08:19:19 2008
@@ -63,7 +63,7 @@
GetTargetMacro ( const Module& module, bool with_dollar )
{
string s ( module.name );
- strupr ( &s[0] );
+ _strupr ( &s[0] );
s += "_TARGET";
if ( with_dollar )
return ssprintf ( "$(%s)", s.c_str() );
@@ -2399,13 +2399,13 @@
const char * crtAttr = module.CRT.c_str ();
const char * crtLib = NULL;
- if ( stricmp ( crtAttr, "libc" ) == 0 )
+ if ( _stricmp ( crtAttr, "libc" ) == 0 )
crtLib = "crt";
- else if ( stricmp ( crtAttr, "msvcrt" ) == 0 )
+ else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 )
crtLib = "msvcrt";
- else if ( stricmp ( crtAttr, "libcntpr" ) == 0 )
+ else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 )
crtLib = "libcntpr";
- else if ( stricmp ( crtAttr, "ntdll" ) == 0 )
+ else if ( _stricmp ( crtAttr, "ntdll" ) == 0 )
crtLib = "ntdll";
if ( crtLib )
Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] Tue Dec 23 08:19:19
2008
@@ -340,7 +340,7 @@
string::size_type pos = file.find_last_of (DEF_SSEP);
if ( pos != string::npos )
file.erase ( 0, pos+1 );
- if ( !stricmp ( Right(file,3).c_str(), ".rc" ) )
+ if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) )
file = ReplaceExtension ( file, ".res" );
else
file = ReplaceExtension ( file, ".obj" );
Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp [iso-8859-1] Tue Dec 23 08:19:19
2008
@@ -108,11 +108,11 @@
string file = path + std::string("\\") + files[i]->file.name;
source_files.push_back ( file );
- if ( !stricmp ( Right(file,2).c_str(), ".c" ) )
+ if ( !_stricmp ( Right(file,2).c_str(), ".c" ) )
c_srcs.push_back ( file );
- if ( !stricmp ( Right(file,2).c_str(), ".h" ) )
+ if ( !_stricmp ( Right(file,2).c_str(), ".h" ) )
header_files.push_back ( file );
- if ( !stricmp ( Right(file,3).c_str(), ".rc" ) )
+ if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) )
resource_files.push_back ( file );
}
const vector<Include*>& incs = data.includes;
Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] Tue Dec 23
08:19:19 2008
@@ -159,9 +159,9 @@
module.output->relative_path );
string file = path + std::string("\\") + files[i]->file.name;
- if ( !stricmp ( Right(file,3).c_str(), ".rc" ) )
+ if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) )
resource_files.push_back ( file );
- else if ( !stricmp ( Right(file,2).c_str(), ".h" ) )
+ else if ( !_stricmp ( Right(file,2).c_str(), ".h" ) )
header_files.push_back ( file );
else
source_files.push_back ( file );
Modified: trunk/reactos/tools/rbuild/compilationunit.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/compilationun…
==============================================================================
--- trunk/reactos/tools/rbuild/compilationunit.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/compilationunit.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008
@@ -88,7 +88,7 @@
{
const File& file = *files[i];
string fileExtension = GetExtension ( file.file );
- if ( !stricmp ( fileExtension.c_str (), extension.c_str () ) )
+ if ( !_stricmp ( fileExtension.c_str (), extension.c_str () ) )
return true;
}
return false;
Modified: trunk/reactos/tools/rbuild/directory.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/directory.cpp…
==============================================================================
--- trunk/reactos/tools/rbuild/directory.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/directory.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008
@@ -26,7 +26,7 @@
#endif//_MSC_VER
#ifdef WIN32
-#define MKDIR(s) mkdir(s)
+#define MKDIR(s) _mkdir(s)
#else
#define MKDIR(s) mkdir(s, 0755)
#endif
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008
@@ -238,9 +238,9 @@
if ( att != NULL )
{
const char* p = att->value.c_str();
- if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) )
+ if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) )
return true;
- else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) )
+ else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) )
return false;
else
{
@@ -358,26 +358,26 @@
{
CRT = att->value;
- if ( stricmp ( CRT.c_str (), "auto" ) == 0 )
+ if ( _stricmp ( CRT.c_str (), "auto" ) == 0 )
CRT = GetDefaultModuleCRT ();
}
else
CRT = GetDefaultModuleCRT ();
const char * crtAttr = CRT.c_str ();
- if ( crtAttr == NULL || stricmp ( crtAttr, "none" ) == 0 )
+ if ( crtAttr == NULL || _stricmp ( crtAttr, "none" ) == 0 )
dynamicCRT = false;
- else if ( stricmp ( crtAttr, "libc" ) == 0 )
+ else if ( _stricmp ( crtAttr, "libc" ) == 0 )
dynamicCRT = false;
- else if ( stricmp ( crtAttr, "msvcrt" ) == 0 )
+ else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 )
dynamicCRT = true;
- else if ( stricmp ( crtAttr, "libcntpr" ) == 0 )
+ else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 )
dynamicCRT = false;
- else if ( stricmp ( crtAttr, "ntdll" ) == 0 )
+ else if ( _stricmp ( crtAttr, "ntdll" ) == 0 )
dynamicCRT = true;
- else if ( stricmp ( crtAttr, "static" ) == 0 )
+ else if ( _stricmp ( crtAttr, "static" ) == 0 )
dynamicCRT = false;
- else if ( stricmp ( crtAttr, "dll" ) == 0 )
+ else if ( _stricmp ( crtAttr, "dll" ) == 0 )
dynamicCRT = true;
else
{
@@ -609,9 +609,9 @@
const XMLAttribute* att = e.GetAttribute ( "first", false );
if ( att != NULL )
{
- if ( !stricmp ( att->value.c_str(), "true" ) )
+ if ( !_stricmp ( att->value.c_str(), "true" ) )
first = true;
- else if ( stricmp ( att->value.c_str(), "false" ) )
+ else if ( _stricmp ( att->value.c_str(), "false" ) )
{
throw XMLInvalidBuildFileException (
e.location,
@@ -626,11 +626,11 @@
{
// check for c++ file
string ext = GetExtension ( e.value );
- if ( !stricmp ( ext.c_str(), ".cpp" ) )
+ if ( !_stricmp ( ext.c_str(), ".cpp" ) )
cplusplus = true;
- else if ( !stricmp ( ext.c_str(), ".cc" ) )
+ else if ( !_stricmp ( ext.c_str(), ".cc" ) )
cplusplus = true;
- else if ( !stricmp ( ext.c_str(), ".cxx" ) )
+ else if ( !_stricmp ( ext.c_str(), ".cxx" ) )
cplusplus = true;
}
File* pFile = new File ( directory,
@@ -1857,9 +1857,9 @@
if ( att != NULL )
{
const char* p = att->value.c_str();
- if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) )
+ if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) )
isInternal = true;
- else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) )
+ else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) )
isInternal = false;
else
{
Modified: trunk/reactos/tools/rbuild/rbuild.vcproj
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.vcproj…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.vcproj [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/rbuild.vcproj [iso-8859-1] Tue Dec 23 08:19:19 2008
@@ -133,7 +133,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..,../../lib/inflib,../../include/reactos;../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
DefaultCharIsUnsigned="true"
Modified: trunk/reactos/tools/rbuild/testsupportcode.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/testsupportco…
==============================================================================
--- trunk/reactos/tools/rbuild/testsupportcode.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/testsupportcode.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008
@@ -293,7 +293,7 @@
bool
TestSupportCode::IsTestFile ( string& filename ) const
{
- if ( stricmp ( GetFilename ( filename ).c_str (), "setup.c" ) == 0 )
+ if ( _stricmp ( GetFilename ( filename ).c_str (), "setup.c" ) == 0 )
return false;
return true;
}