Patch removes option -wd4996 from VS project settings (which suppresses old deprecation warnings).
Instead, macros _CRT_SECURE_NO_WARNINGS (suppresses 444 warnings) and _CRT_NONSTDC_NO_DEPRECATE (suppresses 17 warnings) have been added.
Deprecation warning on GetVersionEx() has been suppressed locally in OSD_Host.cxx.
In STEPConstruct_AP203Context.cxx, OSD_Host is used instead of low-level system functions.
This eliminates dependency of TKSTEP on winsock32.lib on Windows.
endif()
if (WIN32)
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4996")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4996")
+ add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -fPIC")
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<ResourceCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
<ResourceCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<ResourceCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
<ResourceCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
</ClCompile>
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
EnableEnhancedInstructionSet="2"
/>
<Tool
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
- DisableSpecificWarnings="4996"
EnableEnhancedInstructionSet="2"
/>
<Tool
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__;"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="4"
SuppressStartupBanner="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4996"
EnableEnhancedInstructionSet="2"
/>
<Tool
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__;"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__;"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win32\vc8\obj\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
EnableEnhancedInstructionSet="2"
/>
<Tool
AdditionalOptions="/favor:blend"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="4"
SuppressStartupBanner="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win64\vc8\obj\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win32\vc9\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win64\vc9\obj\__TKNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win32\vc9\obj\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalOptions="-MP"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="4"
SuppressStartupBanner="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="2"
InlineFunctionExpansion="1"
- PreprocessorDefinitions="NDEBUG;No_Exception;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
ProgramDataBaseFileName=".\..\..\..\win64\vc9\obj\__XQTNAM__/"
WarningLevel="4"
SuppressStartupBanner="true"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
AdditionalOptions="-MP -favor:blend"
AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
Optimization="0"
- PreprocessorDefinitions="_DEBUG;$(CSF_DEFINES)__TKDEFS__"
+ PreprocessorDefinitions="_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES)__TKDEFS__"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="4"
SuppressStartupBanner="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
str = myName + TEXT( "=" ) + myValue;
- putenv ( str.ToCString () );
+ _putenv (str.ToCString());
} // end OSD_Environment :: Build
str = myName + TEXT( "=" );
- putenv ( str.ToCString () );
+ _putenv (str.ToCString());
} // end OSD_Environment :: Remove
ZeroMemory (&ms, sizeof(ms));
ZeroMemory ( szHostName, sizeof ( Standard_Character ) * (MAX_COMPUTERNAME_LENGTH + 1) );
+#ifdef _MSC_VER
+ // suppress GetVersionEx() deprecation warning
+ #pragma warning(disable : 4996)
+#endif
if ( !GetVersionEx ( &osVerInfo ) ) {
_osd_wnt_set_error ( myError, OSD_WHost );
GlobalMemoryStatus ( &ms );
} // end else
+#ifdef _MSC_VER
+ #pragma warning(default : 4996)
+#endif
if ( !Failed () ) {
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#if defined(_MSC_VER)
+ // supress "std::Equal1" warning suggesting using msvc "Checked Iterators"
+ #define _SCL_SECURE_NO_WARNINGS
+#endif
+
#include <QANCollection.hxx>
#include <Draw_Interpretor.hxx>
#include <StepRepr_NextAssemblyUsageOccurrence.hxx>
#include <StepShape_ShapeDefinitionRepresentation.hxx>
-#ifndef _WIN32
-# include <pwd.h>
-# include <netdb.h>
-#else
-# include <winsock2.h>
-#endif
-
-#include <stdio.h>
-
+#include <OSD_Host.hxx>
#include <OSD_Process.hxx>
#include <Quantity_Date.hxx>
#include <StepAP203_HArray1OfApprovedItem.hxx>
#include <StepBasic_ProductCategory.hxx>
+#ifndef _WIN32
+# include <pwd.h>
+#endif
+
//=======================================================================
//function : STEPConstruct_AP203Context
//purpose :
{
if ( defPersonAndOrganization.IsNull() ) {
// get IP address as a unique id of organization
-#ifdef _WIN32 // adapted for NT which lacks gethostent()
- char hostname[1024];
- hostname[0] = '\0';
- gethostname ( hostname, 1020 );
- hostname[1020] = '\0';
- struct hostent *he = gethostbyname ( hostname );
-#else // adapted for Sun2.5, which lacks definition of gethostname()
- struct hostent *he = gethostent();
- while ( he && he->h_name && (unsigned char)he->h_addr_list[0][0] == 127 )
- he = gethostent();
-#endif
- Handle(TCollection_HAsciiString) orgId = new TCollection_HAsciiString ( "" );
- if ( he && he->h_addr_list && he->h_length >0 ) {
- char str[100];
- unsigned i1 = (unsigned char)he->h_addr_list[0][0];
- unsigned i2 = (unsigned char)he->h_addr_list[0][1];
- unsigned i3 = (unsigned char)he->h_addr_list[0][2];
- sprintf ( str, "IP%03u.%03u.%03u.000", i1, i2, i3 );
- orgId->AssignCat ( str );
+ Handle(TCollection_HAsciiString) orgId = new TCollection_HAsciiString ( "IP" );
+ OSD_Host aHost;
+ TCollection_AsciiString anIP = aHost.InternetAddress();
+ // cut off last number
+ Standard_Integer aLastDotIndex = anIP.SearchFromEnd (".");
+ if (aLastDotIndex >0)
+ {
+ anIP.Trunc (aLastDotIndex - 1);
+ orgId->AssignCat (anIP.ToCString());
}
// create organization
TKGeomBase
TKGeomAlgo
TKXSBase
-CSF_wsock32