mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
- Get back to using deprecated functions (because of linux...).
- Disable warning 4996. svn path=/trunk/; revision=38301
This commit is contained in:
parent
9a27812344
commit
f0ad8ee641
14 changed files with 42 additions and 40 deletions
|
@ -60,7 +60,7 @@ SourceFile::Open ()
|
||||||
if ( !f )
|
if ( !f )
|
||||||
throw FileNotFoundException ( filename );
|
throw FileNotFoundException ( filename );
|
||||||
|
|
||||||
if ( fstat ( _fileno ( f ), &statbuf ) != 0 )
|
if ( fstat ( fileno ( f ), &statbuf ) != 0 )
|
||||||
{
|
{
|
||||||
fclose ( f );
|
fclose ( f );
|
||||||
throw AccessDeniedException ( filename );
|
throw AccessDeniedException ( filename );
|
||||||
|
|
|
@ -32,7 +32,7 @@ Backend::Factory::ref = 0;
|
||||||
Backend::Factory::Factory ( const std::string& name_, const std::string& description_ )
|
Backend::Factory::Factory ( const std::string& name_, const std::string& description_ )
|
||||||
{
|
{
|
||||||
string name(name_);
|
string name(name_);
|
||||||
_strlwr ( &name[0] );
|
strlwr ( &name[0] );
|
||||||
if ( !ref++ )
|
if ( !ref++ )
|
||||||
factories = new map<string,Factory*>;
|
factories = new map<string,Factory*>;
|
||||||
(*factories)[name] = this;
|
(*factories)[name] = this;
|
||||||
|
@ -55,7 +55,7 @@ Backend::Factory::Create ( const string& name,
|
||||||
Configuration& configuration )
|
Configuration& configuration )
|
||||||
{
|
{
|
||||||
string sname ( name );
|
string sname ( name );
|
||||||
_strlwr ( &sname[0] );
|
strlwr ( &sname[0] );
|
||||||
if ( !factories || !factories->size () )
|
if ( !factories || !factories->size () )
|
||||||
throw InvalidOperationException ( __FILE__,
|
throw InvalidOperationException ( __FILE__,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
|
|
|
@ -268,7 +268,7 @@ CBBackend::_get_object_files ( const Module& module, vector<string>& out) const
|
||||||
string::size_type pos = file.find_last_of (sSep);
|
string::size_type pos = file.find_last_of (sSep);
|
||||||
if ( pos != string::npos )
|
if ( pos != string::npos )
|
||||||
file.erase ( 0, pos+1 );
|
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" );
|
file = ReplaceExtension ( file, ".res" );
|
||||||
else
|
else
|
||||||
file = ReplaceExtension ( file, ".obj" );
|
file = ReplaceExtension ( file, ".obj" );
|
||||||
|
@ -429,7 +429,7 @@ CBBackend::_generate_cbproj ( const Module& module )
|
||||||
string fullpath = files[i]->file.relative_path + sSep + files[i]->file.name;
|
string fullpath = files[i]->file.relative_path + sSep + files[i]->file.name;
|
||||||
string file = string(".") + &fullpath[cbproj_path.size()];
|
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 );
|
resource_files.push_back ( file );
|
||||||
else
|
else
|
||||||
source_files.push_back ( file );
|
source_files.push_back ( file );
|
||||||
|
|
|
@ -621,7 +621,7 @@ MingwBackend::GenerateXmlBuildFilesMacro() const
|
||||||
if ( !f )
|
if ( !f )
|
||||||
throw FileNotFoundException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) );
|
throw FileNotFoundException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) );
|
||||||
|
|
||||||
if ( fstat ( _fileno ( f ), &statbuf ) != 0 )
|
if ( fstat ( fileno ( f ), &statbuf ) != 0 )
|
||||||
{
|
{
|
||||||
fclose ( f );
|
fclose ( f );
|
||||||
throw AccessDeniedException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) );
|
throw AccessDeniedException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) );
|
||||||
|
@ -1064,7 +1064,7 @@ MingwBackend::DetectPipeSupport ()
|
||||||
{
|
{
|
||||||
usePipe = (exitcode == 0);
|
usePipe = (exitcode == 0);
|
||||||
fclose ( f );
|
fclose ( f );
|
||||||
_unlink ( pipe_detectionObjectFilename.c_str () );
|
unlink ( pipe_detectionObjectFilename.c_str () );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
usePipe = false;
|
usePipe = false;
|
||||||
|
@ -1097,7 +1097,7 @@ MingwBackend::DetectPCHSupport ()
|
||||||
{
|
{
|
||||||
use_pch = true;
|
use_pch = true;
|
||||||
fclose ( f );
|
fclose ( f );
|
||||||
_unlink ( path.c_str () );
|
unlink ( path.c_str () );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
use_pch = false;
|
use_pch = false;
|
||||||
|
|
|
@ -63,7 +63,7 @@ string
|
||||||
GetTargetMacro ( const Module& module, bool with_dollar )
|
GetTargetMacro ( const Module& module, bool with_dollar )
|
||||||
{
|
{
|
||||||
string s ( module.name );
|
string s ( module.name );
|
||||||
_strupr ( &s[0] );
|
strupr ( &s[0] );
|
||||||
s += "_TARGET";
|
s += "_TARGET";
|
||||||
if ( with_dollar )
|
if ( with_dollar )
|
||||||
return ssprintf ( "$(%s)", s.c_str() );
|
return ssprintf ( "$(%s)", s.c_str() );
|
||||||
|
@ -2399,13 +2399,13 @@ MingwAddCRTLibrary( Module &module )
|
||||||
const char * crtAttr = module.CRT.c_str ();
|
const char * crtAttr = module.CRT.c_str ();
|
||||||
const char * crtLib = NULL;
|
const char * crtLib = NULL;
|
||||||
|
|
||||||
if ( _stricmp ( crtAttr, "libc" ) == 0 )
|
if ( stricmp ( crtAttr, "libc" ) == 0 )
|
||||||
crtLib = "crt";
|
crtLib = "crt";
|
||||||
else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 )
|
else if ( stricmp ( crtAttr, "msvcrt" ) == 0 )
|
||||||
crtLib = "msvcrt";
|
crtLib = "msvcrt";
|
||||||
else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 )
|
else if ( stricmp ( crtAttr, "libcntpr" ) == 0 )
|
||||||
crtLib = "libcntpr";
|
crtLib = "libcntpr";
|
||||||
else if ( _stricmp ( crtAttr, "ntdll" ) == 0 )
|
else if ( stricmp ( crtAttr, "ntdll" ) == 0 )
|
||||||
crtLib = "ntdll";
|
crtLib = "ntdll";
|
||||||
|
|
||||||
if ( crtLib )
|
if ( crtLib )
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning ( disable : 4786 )
|
#pragma warning ( disable : 4786 )
|
||||||
|
#pragma warning ( disable : 4996 )
|
||||||
#endif//_MSC_VER
|
#endif//_MSC_VER
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -340,7 +341,7 @@ MSVCBackend::_get_object_files ( const Module& module, vector<string>& out) cons
|
||||||
string::size_type pos = file.find_last_of (DEF_SSEP);
|
string::size_type pos = file.find_last_of (DEF_SSEP);
|
||||||
if ( pos != string::npos )
|
if ( pos != string::npos )
|
||||||
file.erase ( 0, pos+1 );
|
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" );
|
file = ReplaceExtension ( file, ".res" );
|
||||||
else
|
else
|
||||||
file = ReplaceExtension ( file, ".obj" );
|
file = ReplaceExtension ( file, ".obj" );
|
||||||
|
|
|
@ -108,11 +108,11 @@ MSVCBackend::_generate_dsp ( const Module& module )
|
||||||
string file = path + std::string("\\") + files[i]->file.name;
|
string file = path + std::string("\\") + files[i]->file.name;
|
||||||
|
|
||||||
source_files.push_back ( file );
|
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 );
|
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 );
|
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 );
|
resource_files.push_back ( file );
|
||||||
}
|
}
|
||||||
const vector<Include*>& incs = data.includes;
|
const vector<Include*>& incs = data.includes;
|
||||||
|
|
|
@ -159,9 +159,9 @@ MSVCBackend::_generate_vcproj ( const Module& module )
|
||||||
module.output->relative_path );
|
module.output->relative_path );
|
||||||
string file = path + std::string("\\") + files[i]->file.name;
|
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 );
|
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 );
|
header_files.push_back ( file );
|
||||||
else
|
else
|
||||||
source_files.push_back ( file );
|
source_files.push_back ( file );
|
||||||
|
|
|
@ -88,7 +88,7 @@ CompilationUnit::HasFileWithExtension ( const std::string& extension ) const
|
||||||
{
|
{
|
||||||
const File& file = *files[i];
|
const File& file = *files[i];
|
||||||
string fileExtension = GetExtension ( file.file );
|
string fileExtension = GetExtension ( file.file );
|
||||||
if ( !_stricmp ( fileExtension.c_str (), extension.c_str () ) )
|
if ( !stricmp ( fileExtension.c_str (), extension.c_str () ) )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#endif//_MSC_VER
|
#endif//_MSC_VER
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define MKDIR(s) _mkdir(s)
|
#define MKDIR(s) mkdir(s)
|
||||||
#else
|
#else
|
||||||
#define MKDIR(s) mkdir(s, 0755)
|
#define MKDIR(s) mkdir(s, 0755)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -238,9 +238,9 @@ bool Module::GetBooleanAttribute ( const XMLElement& moduleNode, const char * na
|
||||||
if ( att != NULL )
|
if ( att != NULL )
|
||||||
{
|
{
|
||||||
const char* p = att->value.c_str();
|
const char* p = att->value.c_str();
|
||||||
if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) )
|
if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) )
|
||||||
return true;
|
return true;
|
||||||
else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) )
|
else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) )
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -358,26 +358,26 @@ Module::Module ( const Project& project,
|
||||||
{
|
{
|
||||||
CRT = att->value;
|
CRT = att->value;
|
||||||
|
|
||||||
if ( _stricmp ( CRT.c_str (), "auto" ) == 0 )
|
if ( stricmp ( CRT.c_str (), "auto" ) == 0 )
|
||||||
CRT = GetDefaultModuleCRT ();
|
CRT = GetDefaultModuleCRT ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CRT = GetDefaultModuleCRT ();
|
CRT = GetDefaultModuleCRT ();
|
||||||
|
|
||||||
const char * crtAttr = CRT.c_str ();
|
const char * crtAttr = CRT.c_str ();
|
||||||
if ( crtAttr == NULL || _stricmp ( crtAttr, "none" ) == 0 )
|
if ( crtAttr == NULL || stricmp ( crtAttr, "none" ) == 0 )
|
||||||
dynamicCRT = false;
|
dynamicCRT = false;
|
||||||
else if ( _stricmp ( crtAttr, "libc" ) == 0 )
|
else if ( stricmp ( crtAttr, "libc" ) == 0 )
|
||||||
dynamicCRT = false;
|
dynamicCRT = false;
|
||||||
else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 )
|
else if ( stricmp ( crtAttr, "msvcrt" ) == 0 )
|
||||||
dynamicCRT = true;
|
dynamicCRT = true;
|
||||||
else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 )
|
else if ( stricmp ( crtAttr, "libcntpr" ) == 0 )
|
||||||
dynamicCRT = false;
|
dynamicCRT = false;
|
||||||
else if ( _stricmp ( crtAttr, "ntdll" ) == 0 )
|
else if ( stricmp ( crtAttr, "ntdll" ) == 0 )
|
||||||
dynamicCRT = true;
|
dynamicCRT = true;
|
||||||
else if ( _stricmp ( crtAttr, "static" ) == 0 )
|
else if ( stricmp ( crtAttr, "static" ) == 0 )
|
||||||
dynamicCRT = false;
|
dynamicCRT = false;
|
||||||
else if ( _stricmp ( crtAttr, "dll" ) == 0 )
|
else if ( stricmp ( crtAttr, "dll" ) == 0 )
|
||||||
dynamicCRT = true;
|
dynamicCRT = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -609,9 +609,9 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
|
||||||
const XMLAttribute* att = e.GetAttribute ( "first", false );
|
const XMLAttribute* att = e.GetAttribute ( "first", false );
|
||||||
if ( att != NULL )
|
if ( att != NULL )
|
||||||
{
|
{
|
||||||
if ( !_stricmp ( att->value.c_str(), "true" ) )
|
if ( !stricmp ( att->value.c_str(), "true" ) )
|
||||||
first = true;
|
first = true;
|
||||||
else if ( _stricmp ( att->value.c_str(), "false" ) )
|
else if ( stricmp ( att->value.c_str(), "false" ) )
|
||||||
{
|
{
|
||||||
throw XMLInvalidBuildFileException (
|
throw XMLInvalidBuildFileException (
|
||||||
e.location,
|
e.location,
|
||||||
|
@ -626,11 +626,11 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
|
||||||
{
|
{
|
||||||
// check for c++ file
|
// check for c++ file
|
||||||
string ext = GetExtension ( e.value );
|
string ext = GetExtension ( e.value );
|
||||||
if ( !_stricmp ( ext.c_str(), ".cpp" ) )
|
if ( !stricmp ( ext.c_str(), ".cpp" ) )
|
||||||
cplusplus = true;
|
cplusplus = true;
|
||||||
else if ( !_stricmp ( ext.c_str(), ".cc" ) )
|
else if ( !stricmp ( ext.c_str(), ".cc" ) )
|
||||||
cplusplus = true;
|
cplusplus = true;
|
||||||
else if ( !_stricmp ( ext.c_str(), ".cxx" ) )
|
else if ( !stricmp ( ext.c_str(), ".cxx" ) )
|
||||||
cplusplus = true;
|
cplusplus = true;
|
||||||
}
|
}
|
||||||
File* pFile = new File ( directory,
|
File* pFile = new File ( directory,
|
||||||
|
@ -1857,9 +1857,9 @@ Property::Property ( const XMLElement& node_,
|
||||||
if ( att != NULL )
|
if ( att != NULL )
|
||||||
{
|
{
|
||||||
const char* p = att->value.c_str();
|
const char* p = att->value.c_str();
|
||||||
if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) )
|
if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) )
|
||||||
isInternal = true;
|
isInternal = true;
|
||||||
else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) )
|
else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) )
|
||||||
isInternal = false;
|
isInternal = false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information
|
#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information
|
||||||
|
#pragma warning ( disable : 4996 ) // CRT deprecate
|
||||||
#endif//_MSC_VER
|
#endif//_MSC_VER
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..,../../lib/inflib,../../include/reactos;../../include"
|
AdditionalIncludeDirectories="..,../../lib/inflib,../../include/reactos;../../include"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS;_CRT_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
DefaultCharIsUnsigned="true"
|
DefaultCharIsUnsigned="true"
|
||||||
|
|
|
@ -293,7 +293,7 @@ TestSupportCode::GetTestDispatcherName ( string filename )
|
||||||
bool
|
bool
|
||||||
TestSupportCode::IsTestFile ( string& filename ) const
|
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 false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue