[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH xenbus] Fix build with later WDKs:



From: Paul Durrant <pdurrant@xxxxxxxxxx>

- Adds alias for GetProjectInfoForReference target to version.vcxproj
  Later kits seemed to have renamed the build target, and will fail without
  this alias target.
- Adds "/fd sha256" to signtool command line
  WDK 20344 and later require binaries signed with a SHA256 file digest, or
  the build outputs are deleted.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Re-worked from Owen's original patch:

- Squashes warnings 4061 and 26052.
- Casts XENBUS_STORE_PERMISSION_MASK to ULONG in switch statement to avoid
  complaint about case using '|'.

Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
 src/xenbus/store.c                           | 2 +-
 vs2019/package/package.vcxproj               | 5 +++++
 vs2019/version/version.vcxproj               | 6 ++++++
 vs2019/xen/xen.vcxproj                       | 5 ++++-
 vs2019/xenbus/xenbus.vcxproj                 | 5 ++++-
 vs2019/xenbus_coinst/xenbus_coinst.vcxproj   | 5 ++++-
 vs2019/xenbus_monitor/xenbus_monitor.vcxproj | 5 ++++-
 vs2019/xenfilt/xenfilt.vcxproj               | 5 ++++-
 8 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/src/xenbus/store.c b/src/xenbus/store.c
index ce4c755f1d58..5ffea1fe4859 100644
--- a/src/xenbus/store.c
+++ b/src/xenbus/store.c
@@ -1945,7 +1945,7 @@ StorePermissionToString(
 
     ASSERT(BufferSize > 1);
 
-    switch (Permission->Mask) {
+    switch ((ULONG)Permission->Mask) {
     case XENBUS_STORE_PERM_NONE:
         *Buffer = 'n';
         break;
diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj
index 2a83c90335f8..e10717a61efe 100644
--- a/vs2019/package/package.vcxproj
+++ b/vs2019/package/package.vcxproj
@@ -32,6 +32,11 @@
     <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
     <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
   </PropertyGroup>
+  <ItemDefinitionGroup>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
+  </ItemDefinitionGroup>
   <PropertyGroup Condition="'$(Platform)'=='Win32'">
     <ArchiveDir>..\..\$(SolutionName)\x86</ArchiveDir>
   </PropertyGroup>
diff --git a/vs2019/version/version.vcxproj b/vs2019/version/version.vcxproj
index 9d149d0f10dd..b6ec6f3ecb0c 100644
--- a/vs2019/version/version.vcxproj
+++ b/vs2019/version/version.vcxproj
@@ -13,4 +13,10 @@
   <Target Name="Build">
     <Exec Command="powershell.exe -ExecutionPolicy Bypass -NoProfile 
-NonInteractive -File $(Script) $(Platform) $(SolutionDir) $(IncludeDir) 
$(SourceDir)" />
   </Target>
+  <Target Name="GetProjectInfoForReference"
+          Returns="@(ProjectInfoForReference)">
+    <ItemGroup>
+      <ProjectInfoForReference Include="@(LibFullPath)" />
+    </ItemGroup>
+  </Target>
 </Project>
diff --git a/vs2019/xen/xen.vcxproj b/vs2019/xen/xen.vcxproj
index 39b5bda87eb6..bccef34d2b0a 100644
--- a/vs2019/xen/xen.vcxproj
+++ b/vs2019/xen/xen.vcxproj
@@ -24,7 +24,7 @@
       
<PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4061;4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
     </ClCompile>
@@ -37,6 +37,9 @@
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
       <ModuleDefinitionFile>../../src/xen/xen.def</ModuleDefinitionFile>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xenbus/xenbus.vcxproj b/vs2019/xenbus/xenbus.vcxproj
index ff40c43c45cc..eac2f7eb4767 100644
--- a/vs2019/xenbus/xenbus.vcxproj
+++ b/vs2019/xenbus/xenbus.vcxproj
@@ -24,7 +24,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       
<AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4061;4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
     </ClCompile>
@@ -36,6 +36,9 @@
       
<AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;$(DDK_LIB_PATH)/rtlver.lib;%(AdditionalDependencies)</AdditionalDependencies>
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xenbus_coinst/xenbus_coinst.vcxproj 
b/vs2019/xenbus_coinst/xenbus_coinst.vcxproj
index df3cc0405fb3..2e7a6e74cc62 100644
--- a/vs2019/xenbus_coinst/xenbus_coinst.vcxproj
+++ b/vs2019/xenbus_coinst/xenbus_coinst.vcxproj
@@ -21,7 +21,7 @@
       
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       
<PreprocessorDefinitions>PROJECT=$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4127;4711;4548;4820;4668;4255;5045;6001;6054;28196;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4127;4711;4548;4820;4668;4255;5045;6001;6054;26052;28196;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
       <RuntimeLibrary 
Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
@@ -35,6 +35,9 @@
     <ResourceCompile>
       
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xenbus_monitor/xenbus_monitor.vcxproj 
b/vs2019/xenbus_monitor/xenbus_monitor.vcxproj
index 8703bb5c57b0..8652ac439a9e 100644
--- a/vs2019/xenbus_monitor/xenbus_monitor.vcxproj
+++ b/vs2019/xenbus_monitor/xenbus_monitor.vcxproj
@@ -25,7 +25,7 @@
       
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       
<PreprocessorDefinitions>PROJECT=$(ProjectName);WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4127;4711;4548;4820;4668;4255;5045;6001;6054;28196;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4127;4711;4548;4820;4668;4255;5045;6001;6054;26052;28196;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
       <RuntimeLibrary 
Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
@@ -37,6 +37,9 @@
     <ResourceCompile>
       
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xenfilt/xenfilt.vcxproj b/vs2019/xenfilt/xenfilt.vcxproj
index b3ce00f3fc67..620e3a6aaa79 100644
--- a/vs2019/xenfilt/xenfilt.vcxproj
+++ b/vs2019/xenfilt/xenfilt.vcxproj
@@ -24,7 +24,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       
<AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4061;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
     </ClCompile>
@@ -36,6 +36,9 @@
       
<AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.