Skip to content

Commit

Permalink
move to WindowsTargetPlatformVersion 10.x for x64 build targets and e…
Browse files Browse the repository at this point in the history
…nabled permissive- where possible.
  • Loading branch information
janwilmans committed Jul 12, 2018
1 parent b8c3f35 commit 358ddb5
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 21 deletions.
8 changes: 5 additions & 3 deletions CobaltFusion/CobaltFusion.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
<ProjectGuid>{218AB179-4C19-4264-BD55-DF89A9F321CA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CobaltFusion</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
Expand All @@ -42,7 +42,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
Expand Down Expand Up @@ -108,6 +108,7 @@
<AdditionalIncludeDirectories>../include;../libsnappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -144,6 +145,7 @@
<AdditionalIncludeDirectories>../include;../libsnappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
4 changes: 3 additions & 1 deletion CobaltFusionTest/CobaltFusionTest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectGuid>{30E249B7-F460-4FD3-9C45-58C55AEF7EF6}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CobaltFusionTest</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -108,6 +108,7 @@
<AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -146,6 +147,7 @@
<AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
4 changes: 3 additions & 1 deletion DbgMsgSrc/DbgMsgSrc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectGuid>{722E0592-E026-4D51-87EC-6ACA85B385F4}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>DbgMsgSrc</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -112,6 +112,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -154,6 +155,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
4 changes: 2 additions & 2 deletions DbgMsgSrc/dbgstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ class basic_debugbuf : public std::basic_streambuf<Elem, Tr>
using int_type = std::basic_streambuf<Elem, Tr>::int_type;
virtual int_type overflow(int_type c) override
{
if (c == traits_type::eof())
if (c == std::basic_streambuf<Elem, Tr>::traits_type::eof())
return 0;

m_buf += traits_type::to_char_type(c);
m_buf += std::basic_streambuf<Elem, Tr>::traits_type::to_char_type(c);
if (c == '\n')
sync();
return c;
Expand Down
4 changes: 3 additions & 1 deletion DebugView++/DebugView++.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{E37BA0C9-8A2F-4F2E-BBF8-839F3429D3A7}</ProjectGuid>
<Keyword>AtlProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -157,6 +157,7 @@
<AdditionalOptions>-Zm250 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
Expand Down Expand Up @@ -260,6 +261,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
Expand Down
4 changes: 3 additions & 1 deletion DebugView++Lib/DebugView++Lib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>DebugViewPPLib</RootNamespace>
<ProjectName>DebugView++Lib</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -110,6 +110,7 @@
<AdditionalIncludeDirectories>..\Libraries\TabbingFramework;..\Libraries\PropertyGrid;..\CobaltFusion;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zm250 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -152,6 +153,7 @@
<AdditionalIncludeDirectories>..\Libraries\TabbingFramework;..\Libraries\PropertyGrid;..\CobaltFusion;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zm250 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
4 changes: 3 additions & 1 deletion DebugView++Test/DebugView++Test.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>DebugViewPPTest</RootNamespace>
<ProjectName>DebugView++Test</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -115,6 +115,7 @@
<AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -155,6 +156,7 @@
<AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
4 changes: 3 additions & 1 deletion DebugViewConsole/DebugViewConsole.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>DebugViewConsole</RootNamespace>
<ProjectName>DebugViewConsole</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -119,6 +119,7 @@
<AdditionalIncludeDirectories>../include;../Libraries/docopt</AdditionalIncludeDirectories>
<AdditionalOptions>-Zm250 /Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -159,6 +160,7 @@
<AdditionalIncludeDirectories>../include;../Libraries/docopt</AdditionalIncludeDirectories>
<AdditionalOptions>-Zm250 /Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
4 changes: 3 additions & 1 deletion GDIGraphicsPOC/GDIGraphicsPOC.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectGuid>{77DB6FEA-B721-4C03-A151-763ECF4A80DB}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>GDIGraphicsPOC</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -114,6 +114,7 @@
<AdditionalIncludeDirectories>TabbingFramework;..\include</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -152,6 +153,7 @@
<AdditionalIncludeDirectories>TabbingFramework;..\include</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>false</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
4 changes: 3 additions & 1 deletion IndexedStorageLib/IndexedStorageLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectGuid>{69756714-C1EB-47AF-B852-FF253D8DDDA8}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>IndexedStorageLib</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -105,6 +105,7 @@
<AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
<AdditionalOptions>/permissive- %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -143,6 +144,7 @@
<AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
<AdditionalOptions>/permissive- %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
4 changes: 3 additions & 1 deletion Win32Lib/Win32Lib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectGuid>{7AA3A43A-F0CD-4BD8-BC04-5A30F7260C38}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Win32Lib</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -105,6 +105,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -143,6 +144,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
12 changes: 6 additions & 6 deletions include/CobaltFusion/hstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class basic_handlebuf : public std::basic_streambuf<Elem, Tr>
{
DWORD written;
if (!WriteFile(m_handle, m_writeBuffer.data(), static_cast<DWORD>(m_writeBuffer.size()), &written, nullptr))
return traits_type::eof();
return std::basic_streambuf<Elem, Tr>::traits_type::eof();

m_writeBuffer.clear();
}
Expand All @@ -41,10 +41,10 @@ class basic_handlebuf : public std::basic_streambuf<Elem, Tr>

virtual int_type overflow(int_type c) override
{
if (c == traits_type::eof())
if (c == std::basic_streambuf<Elem, Tr>::traits_type::eof())
return c;

m_writeBuffer.push_back(traits_type::to_char_type(c));
m_writeBuffer.push_back(std::basic_streambuf<Elem, Tr>::traits_type::to_char_type(c));
if (c == '\n')
sync();
return c;
Expand All @@ -53,7 +53,7 @@ class basic_handlebuf : public std::basic_streambuf<Elem, Tr>
virtual int_type underflow() override
{
if (gptr() < egptr()) // buffer not exhausted
return traits_type::to_int_type(*gptr());
return std::basic_streambuf<Elem, Tr>::traits_type::to_int_type(*gptr());

Elem* base = &m_readBuffer.front();
Elem* start = base;
Expand All @@ -69,12 +69,12 @@ class basic_handlebuf : public std::basic_streambuf<Elem, Tr>
// Read from m_handle in to the provided buffer
DWORD read;
if (!ReadFile(m_handle, start, static_cast<DWORD>((m_readBuffer.size() - (start - base))*sizeof(Elem)), &read, nullptr) || read == 0)
return traits_type::eof();
return std::basic_streambuf<Elem, Tr>::traits_type::eof();

// Set buffer pointers
setg(base, start, start + read/sizeof(Elem));

return traits_type::to_int_type(*gptr());
return std::basic_streambuf<Elem, Tr>::traits_type::to_int_type(*gptr());
}

private:
Expand Down
2 changes: 2 additions & 0 deletions include/Win32/Win32Lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ void SetEvent(HANDLE hEvent);

Handle CreateMutex(const SECURITY_ATTRIBUTES* pMutexAttributes, bool initialOwner, const wchar_t* pName);

#ifdef DACL_MODIFY
void SetSecurityInfo(HANDLE hObject, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, const PSID psidOwner, const PSID psidGroup, const PACL pDacl, const PACL pSacl);
void DeleteObjectDACL(HANDLE hObject);
void AdjustObjectDACL(HANDLE hObject);
#endif

void SetPrivilege(const wchar_t* privilege, bool enablePrivilege);
void SetPrivilege(HANDLE hToken, const wchar_t* privilege, bool enablePrivilege);
Expand Down
4 changes: 3 additions & 1 deletion libsnappy/libsnappy.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectGuid>{B1AEE15F-4CAF-4ACA-B5DC-756EC3AFA77A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libsnappy</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -107,6 +107,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/permissive- %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -143,6 +144,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/permissive- %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down

0 comments on commit 358ddb5

Please sign in to comment.