ON :
- aggiunte delle modifiche per poter compilare con LLVM su windows. - reindirizzamento alla nostra zlib.
This commit is contained in:
+10
-10
@@ -131,7 +131,7 @@ bool ON_CompressStream::In( ON__UINT64 size, const void* uncompressed_buffer )
|
||||
// compressed output in m_zlib.strm.next_out[], or do both.
|
||||
|
||||
// provide storage for compressed stream output
|
||||
strm.next_out = (z_Bytef*)out_buffer;
|
||||
strm.next_out = (Bytef*)out_buffer;
|
||||
strm.avail_out = sizeof_out_buffer;
|
||||
|
||||
if ( strm.avail_in <= 0 )
|
||||
@@ -145,7 +145,7 @@ bool ON_CompressStream::In( ON__UINT64 size, const void* uncompressed_buffer )
|
||||
ON__UINT64 sz = (size > max_sz) ? max_sz : size;
|
||||
m_in_size += sz;
|
||||
m_in_crc = ON_CRC32(m_in_crc,(size_t)sz,uncompressed_buffer); // (size_t) cast is safe because sz <= max_sz = 0x7FFFFFF0
|
||||
strm.next_in = (z_Bytef*)uncompressed_buffer;
|
||||
strm.next_in = (Bytef*)uncompressed_buffer;
|
||||
strm.avail_in = (ON__UINT32)sz;
|
||||
uncompressed_buffer = ((const unsigned char*)uncompressed_buffer) + sz;
|
||||
size -= sz;
|
||||
@@ -155,7 +155,7 @@ bool ON_CompressStream::In( ON__UINT64 size, const void* uncompressed_buffer )
|
||||
// calculate compression
|
||||
ON__UINT32 avail_in0 = strm.avail_in;
|
||||
ON__UINT32 avail_out0 = strm.avail_out;
|
||||
zrc = z_deflate( &strm, Z_NO_FLUSH );
|
||||
zrc = deflate( &strm, Z_NO_FLUSH );
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
@@ -238,11 +238,11 @@ bool ON_CompressStream::End()
|
||||
// provide storage for compressed stream output
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = 0;
|
||||
strm.next_out = (z_Bytef*)out_buffer;
|
||||
strm.next_out = (Bytef*)out_buffer;
|
||||
strm.avail_out = sizeof_out_buffer;
|
||||
|
||||
// finish compression calculation
|
||||
zrc = z_deflate( &strm, Z_FINISH );
|
||||
zrc = deflate( &strm, Z_FINISH );
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
@@ -449,7 +449,7 @@ bool ON_UncompressStream::In( ON__UINT64 size, const void* compressed_buffer )
|
||||
// uncompressed output in strm.next_out[], or do both.
|
||||
|
||||
// provide storage for uncompressed stream output
|
||||
strm.next_out = (z_Bytef*)out_buffer;
|
||||
strm.next_out = (Bytef*)out_buffer;
|
||||
strm.avail_out = sizeof_out_buffer;
|
||||
|
||||
if ( strm.avail_in <= 0 )
|
||||
@@ -463,7 +463,7 @@ bool ON_UncompressStream::In( ON__UINT64 size, const void* compressed_buffer )
|
||||
ON__UINT64 sz = (size > max_sz) ? max_sz : size;
|
||||
m_in_size += sz;
|
||||
m_in_crc = ON_CRC32(m_in_crc,(size_t)sz,compressed_buffer); // (size_t) cast is safe because sz <= max_sz = 0x7FFFFFF0
|
||||
strm.next_in = (z_Bytef*)compressed_buffer;
|
||||
strm.next_in = (Bytef*)compressed_buffer;
|
||||
strm.avail_in = (ON__UINT32)sz;
|
||||
compressed_buffer = ((const unsigned char*)compressed_buffer) + sz;
|
||||
size -= sz;
|
||||
@@ -473,7 +473,7 @@ bool ON_UncompressStream::In( ON__UINT64 size, const void* compressed_buffer )
|
||||
// calculate compression
|
||||
ON__UINT32 avail_in0 = strm.avail_in;
|
||||
ON__UINT32 avail_out0 = strm.avail_out;
|
||||
zrc = z_inflate( &strm, Z_NO_FLUSH );
|
||||
zrc = inflate( &strm, Z_NO_FLUSH );
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
@@ -556,11 +556,11 @@ bool ON_UncompressStream::End()
|
||||
// provide storage for compressed stream output
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = 0;
|
||||
strm.next_out = (z_Bytef*)out_buffer;
|
||||
strm.next_out = (Bytef*)out_buffer;
|
||||
strm.avail_out = sizeof_out_buffer;
|
||||
|
||||
// finish compression calculation
|
||||
zrc = z_inflate( &strm, Z_FINISH );
|
||||
zrc = inflate( &strm, Z_FINISH );
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
|
||||
@@ -1343,7 +1343,7 @@ public:
|
||||
|
||||
static bool Validate_sprintf_l()
|
||||
{
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
|
||||
#if (defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)) && !defined( ON_COMPILER_MSC)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
// Test formatted printing
|
||||
char buffer[64] = { 0 };
|
||||
@@ -1368,7 +1368,7 @@ public:
|
||||
|
||||
static bool Validate_sprintf_s_l()
|
||||
{
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
|
||||
#if (defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)) && !defined( ON_COMPILER_MSC)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
// Test formatted printing
|
||||
char buffer[64] = { 0 };
|
||||
@@ -1422,7 +1422,7 @@ public:
|
||||
|
||||
static bool Validate_sscanf_l()
|
||||
{
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
|
||||
#if (defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)) && !defined( ON_COMPILER_MSC)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
// Test formatted scanning
|
||||
double a = ON_UNSET_VALUE;
|
||||
@@ -1447,7 +1447,7 @@ public:
|
||||
|
||||
static bool Validate_sscanf_s_l()
|
||||
{
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
|
||||
#if (defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)) && !defined( ON_COMPILER_MSC)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
// Test formatted scanning
|
||||
double a = ON_UNSET_VALUE;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2020
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{7B90C09F-DC78-42B2-AD34-380F6D466B29}"
|
||||
EndProject
|
||||
@@ -32,9 +32,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_write", "example_wr
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opennurbs_public", "opennurbs_public.vcxproj", "{1356641D-0B22-4123-B519-A69EE5CDC7F8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{7B90C09F-DC78-42B2-AD34-380F6D466B29} = {7B90C09F-DC78-42B2-AD34-380F6D466B29}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opennurbs_public_staticlib", "opennurbs_public_staticlib.vcxproj", "{23288C65-E3EB-4D09-A648-22E1636EB40F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
|
||||
@@ -69,15 +69,28 @@
|
||||
<Import Project="opennurbs_msbuild.Cpp.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>C:\;$(LLVMInstallDir)\lib\clang\$(LLVMIncludeVersion)\include;$(IncludePath)</IncludePath>
|
||||
<TargetName>$(ProjectName)D$(PlatformArchitecture)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IncludePath>C:\;$(LLVMInstallDir)\lib\clang\$(LLVMIncludeVersion)\include;$(IncludePath)</IncludePath>
|
||||
<TargetName>$(ProjectName)R$(PlatformArchitecture)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>C:\;$(LLVMInstallDir)\lib\clang\$(LLVMIncludeVersion)\include;$(IncludePath)</IncludePath>
|
||||
<TargetName>$(ProjectName)D$(PlatformArchitecture)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IncludePath>C:\;$(LLVMInstallDir)\lib\clang\$(LLVMIncludeVersion)\include;$(IncludePath)</IncludePath>
|
||||
<TargetName>$(ProjectName)R$(PlatformArchitecture)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>opennurbs.h</PrecompiledHeaderFile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OPENNURBS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OPENNURBS_EXPORTS;ON_COMPILER_CLANG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
</ClCompile>
|
||||
@@ -86,6 +99,11 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Usp10.lib;Shlwapi.lib;Rpcrt4.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetDir)$(TargetName).pdb \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetDir)$(TargetName).lib \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetPath) \EgtProg\DllD32</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@@ -94,7 +112,7 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OPENNURBS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OPENNURBS_EXPORTS;ON_COMPILER_CLANG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -102,6 +120,11 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Usp10.lib;Shlwapi.lib;Rpcrt4.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetDir)$(TargetName).pdb \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetDir)$(TargetName).lib \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetPath) \EgtProg\Dll32</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
@@ -111,13 +134,20 @@
|
||||
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;OPENNURBS_EXPORTS;__clang;ON_COMPILER_CLANG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<AdditionalOptions>-Wunknown-pragmas %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Usp10.lib;Shlwapi.lib;Rpcrt4.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Usp10.lib;Shlwapi.lib;Rpcrt4.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;C:\EgtDev\Extern\zlib\Lib\zlibD64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetDir)$(TargetName).pdb \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetDir)$(TargetName).lib \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetPath) \EgtProg\DllD64</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@@ -126,7 +156,7 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;OPENNURBS_EXPORTS;OPENNURBS_ZLIB_LIB_DIR="C:/EgtDev/Extern/zlib/Lib";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;OPENNURBS_EXPORTS;OPENNURBS_ZLIB_LIB_DIR="C:/EgtDev/Extern/zlib/Lib";ON_COMPILER_CLANG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
@@ -137,6 +167,11 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Usp10.lib;Shlwapi.lib;Rpcrt4.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetDir)$(TargetName).pdb \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetDir)$(TargetName).lib \EgtDev\Extern\opennurbs\Lib\
|
||||
copy $(TargetPath) \EgtProg\Dll64</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="opennurbs.h" />
|
||||
|
||||
@@ -803,7 +803,7 @@ int ON_String::FormatVargsIntoBuffer(
|
||||
if (0 == buffer || buffer_capacity <= 0)
|
||||
return -1;
|
||||
buffer[0] = 0;
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
|
||||
#if (defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)) && !defined( ON_COMPILER_MSC)
|
||||
// CLang modifies args so a copy is required
|
||||
va_list args_copy;
|
||||
va_copy (args_copy, args);
|
||||
@@ -854,7 +854,7 @@ int ON_String::FormatVargsOutputCount(
|
||||
if ( nullptr == format || 0 == format[0] )
|
||||
return 0;
|
||||
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
|
||||
#if ( defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)) && !defined(ON_COMPILER_MSC)
|
||||
// CLang modifies args so a copy is required
|
||||
va_list args_copy;
|
||||
va_copy (args_copy, args);
|
||||
|
||||
@@ -85,7 +85,7 @@ int ON_String::ScanBufferVargs(
|
||||
va_list args
|
||||
)
|
||||
{
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
|
||||
#if (defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)) && !defined(ON_COMPILER_MSC)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
if (nullptr == buffer || nullptr == format)
|
||||
return -1;
|
||||
@@ -398,7 +398,7 @@ const char* ON_String::ToNumber(
|
||||
local_buffer[local_buffer_count++] = 0;
|
||||
|
||||
double x = value_on_failure;
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
|
||||
#if (defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)) && ! defined(ON_COMPILER_MSC)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
if (1 == sscanf(local_buffer, "%lg", &x))
|
||||
{
|
||||
@@ -660,7 +660,7 @@ const wchar_t* ON_wString::ToNumber(
|
||||
local_buffer[local_buffer_count++] = 0;
|
||||
|
||||
double x = value_on_failure;
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
|
||||
#if ( defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)) && ! defined(ON_COMPILER_MSC)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
if (1 == sscanf(local_buffer, "%lg", &x))
|
||||
{
|
||||
|
||||
+1
-1
@@ -522,7 +522,7 @@ typedef ON__UINT32 wchar_t;
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(ON_COMPILER_CLANG)
|
||||
#if defined(ON_COMPILER_CLANG) && !defined( ON_COMPILER_MSC)
|
||||
#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
|
||||
#include <sys/types.h>
|
||||
#pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
...
|
||||
#pragma ON_PRAGMA_WARNING_POP
|
||||
*/
|
||||
#if !defined(__clang__) & !defined( __clang) & !defined(ON_COMPILER_CLANG)
|
||||
#define ON_PRAGMA_WARNING_PUSH warning( push )
|
||||
#define ON_PRAGMA_WARNING_POP warning( pop )
|
||||
#define ON_PRAGMA_WARNING_DISABLE_MSC(ON_PRAGMA_WARNING_DISABLE_param) warning( disable : ON_PRAGMA_WARNING_DISABLE_param ) // Microsoft CL warning disable
|
||||
@@ -94,6 +95,17 @@
|
||||
// Microsoft, Freetype, and other external header files issue warnings we can't do anything about
|
||||
#define ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE warning( push, 1 )
|
||||
#define ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE warning( pop )
|
||||
#else
|
||||
#define ON_PRAGMA_WARNING_PUSH clang diagnostic push
|
||||
#define ON_PRAGMA_WARNING_POP clang diagnostic pop
|
||||
#define ON_PRAGMA_WARNING_DISABLE_CLANG(ON_PRAGMA_WARNING_DISABLE_param) clang diagnostic ignored ON_PRAGMA_WARNING_DISABLE_param // Microsoft CL warning disable
|
||||
|
||||
// Opennurbs warning level is /Wall
|
||||
// Microsoft, Freetype, and other external header files issue warnings we can't do anything about
|
||||
#define ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE warning( push, 1 )
|
||||
#define ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE warning( pop )
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(_CRT_SECURE_NO_DEPRECATE)
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
@@ -170,6 +182,7 @@
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_MSC(4456)
|
||||
#endif
|
||||
|
||||
#if !defined( ON_COMPILER_CLANG)
|
||||
// C4100 '...': unreferenced formal parameter ...
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_MSC(4100)
|
||||
|
||||
@@ -184,6 +197,22 @@
|
||||
|
||||
// C4820 '...' bytes padding added after construct '...'
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_MSC(4820)
|
||||
#else
|
||||
// C4100 '...': unreferenced formal parameter ...
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_CLANG(4100)
|
||||
|
||||
// C4061 enumerator '...' in switch of enum '...' is not explicitly handled by a case label
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_CLANG(4061)
|
||||
|
||||
// C4062 enumerator '...' in switch of enum '...' is not handled
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_CLANG(4062)
|
||||
|
||||
// C4711 function '...' selected for inline expansion
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_CLANG(4711)
|
||||
|
||||
// C4820 '...' bytes padding added after construct '...'
|
||||
#pragma ON_PRAGMA_WARNING_DISABLE_CLANG(4820)
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
+8
-6
@@ -49,8 +49,10 @@
|
||||
#pragma comment(lib, "\"" OPENNURBS_ZLIB_LIB_DIR "/" "zlib_mt.lib" "\"")
|
||||
#else
|
||||
// using Microsoft DLL C-runtime
|
||||
#pragma message ( "Linking with zlib.lib in " OPENNURBS_PP2STR(OPENNURBS_ZLIB_LIB_DIR) )
|
||||
#pragma comment(lib, "\"" OPENNURBS_ZLIB_LIB_DIR "/" "zlib.lib" "\"")
|
||||
//#pragma message ( "Linking with zlib.lib in " OPENNURBS_PP2STR(OPENNURBS_ZLIB_LIB_DIR) )
|
||||
//#pragma comment(lib, "\"" OPENNURBS_ZLIB_LIB_DIR "/" "zlib.lib" "\"")
|
||||
//#pragma comment(lib, "\"" OPENNURBS_ZLIB_LIB_DIR "/" "zlib" "\"")
|
||||
//#pragma comment(lib, "C:\\EgtDev\\Extern\\zlib\\Lib\\zlibD64.lib")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -313,7 +315,7 @@ size_t ON_BinaryArchive::WriteDeflate( // returns number of bytes written
|
||||
// no uncompressed input is left - switch to finish mode
|
||||
flush = Z_FINISH;
|
||||
}
|
||||
zrc = z_deflate(&m_zlib.m_strm, flush);
|
||||
zrc = deflate(&m_zlib.m_strm, flush);
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
@@ -513,7 +515,7 @@ bool ON_BinaryArchive::ReadInflate(
|
||||
// no compressed input is left - switch to finish mode
|
||||
flush = Z_FINISH;
|
||||
}
|
||||
zrc = z_inflate( &m_zlib.m_strm, flush );
|
||||
zrc = inflate( &m_zlib.m_strm, flush );
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
@@ -1183,7 +1185,7 @@ size_t ON_CompressedBuffer::DeflateHelper( // returns number of bytes written
|
||||
// no uncompressed input is left - switch to finish mode
|
||||
flush = Z_FINISH;
|
||||
}
|
||||
zrc = z_deflate( &m_zlib.m_strm, flush );
|
||||
zrc = deflate( &m_zlib.m_strm, flush );
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
@@ -1316,7 +1318,7 @@ bool ON_CompressedBuffer::InflateHelper(
|
||||
// no compressed input is left - switch to finish mode
|
||||
flush = Z_FINISH;
|
||||
}
|
||||
zrc = z_inflate( &m_zlib.m_strm, flush );
|
||||
zrc = inflate( &m_zlib.m_strm, flush );
|
||||
if ( zrc < 0 )
|
||||
{
|
||||
// Something went haywire - bail out.
|
||||
|
||||
+12
-9
@@ -29,23 +29,26 @@
|
||||
// header files are included by opennurbs.h.
|
||||
|
||||
|
||||
#if !defined(Z_PREFIX)
|
||||
/* decorates zlib functions with a "z_" prefix to prevent symbol collision. */
|
||||
#define Z_PREFIX
|
||||
#endif
|
||||
//#if !defined(Z_PREFIX)
|
||||
///* decorates zlib functions with a "z_" prefix to prevent symbol collision. */
|
||||
//#define Z_PREFIX
|
||||
//#endif
|
||||
|
||||
#if !defined(MY_ZCALLOC)
|
||||
/* have zlib use oncalloc() and onfree() for memory managment*/
|
||||
#define MY_ZCALLOC
|
||||
#endif
|
||||
|
||||
#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
|
||||
#include "./zlib/zlib.h"
|
||||
#pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE
|
||||
//#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
|
||||
//#include "./zlib/zlib.h"
|
||||
#include "C:\\EgtDev\\Extern\\zlib\\Include\\zlib.h"
|
||||
//#pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE
|
||||
|
||||
ON_BEGIN_EXTERNC
|
||||
//ON_BEGIN_EXTERNC
|
||||
extern "C" {
|
||||
voidpf zcalloc(voidpf, unsigned, unsigned);
|
||||
void zcfree(voidpf, voidpf);
|
||||
ON_END_EXTERNC
|
||||
}
|
||||
//ON_END_EXTERNC
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user