From acb825ea72b4697c15c4152b9080fba0809f1da7 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Tue, 17 May 2022 09:42:03 -0700
Subject: [PATCH] build/link with xpdev_mt

Build using WinXP-compatible toolset.
---
 src/vdmodem/vdmodem.sln     |  6 ++++++
 src/vdmodem/vdmodem.vcxproj | 15 +++++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/vdmodem/vdmodem.sln b/src/vdmodem/vdmodem.sln
index ef3ad4cb38..c2af461c76 100644
--- a/src/vdmodem/vdmodem.sln
+++ b/src/vdmodem/vdmodem.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.32106.194
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdmodem", "vdmodem.vcxproj", "{20051597-6298-4098-8F26-E408C2880FE4}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xpdev_mt", "..\xpdev\xpdev_mt.vcxproj", "{AEED3A81-3A47-4953-BE51-FD5E08283890}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|x86 = Debug|x86
@@ -15,6 +17,10 @@ Global
 		{20051597-6298-4098-8F26-E408C2880FE4}.Debug|x86.Build.0 = Debug|Win32
 		{20051597-6298-4098-8F26-E408C2880FE4}.Release|x86.ActiveCfg = Release|Win32
 		{20051597-6298-4098-8F26-E408C2880FE4}.Release|x86.Build.0 = Release|Win32
+		{AEED3A81-3A47-4953-BE51-FD5E08283890}.Debug|x86.ActiveCfg = Debug|Win32
+		{AEED3A81-3A47-4953-BE51-FD5E08283890}.Debug|x86.Build.0 = Debug|Win32
+		{AEED3A81-3A47-4953-BE51-FD5E08283890}.Release|x86.ActiveCfg = Release|Win32
+		{AEED3A81-3A47-4953-BE51-FD5E08283890}.Release|x86.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/src/vdmodem/vdmodem.vcxproj b/src/vdmodem/vdmodem.vcxproj
index c743c01f16..f5a92b9a92 100644
--- a/src/vdmodem/vdmodem.vcxproj
+++ b/src/vdmodem/vdmodem.vcxproj
@@ -29,26 +29,26 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v141_xp</PlatformToolset>
     <CharacterSet>NotSet</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v141_xp</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>NotSet</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v141_xp</PlatformToolset>
     <CharacterSet>NotSet</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v141_xp</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>NotSet</CharacterSet>
   </PropertyGroup>
@@ -156,10 +156,13 @@
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="..\sbbs3\telnet.c" />
-    <ClCompile Include="..\xpdev\genwrap.c" />
-    <ClCompile Include="..\xpdev\sockwrap.c" />
     <ClCompile Include="vdmodem.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\xpdev\xpdev_mt.vcxproj">
+      <Project>{aeed3a81-3a47-4953-be51-fd5e08283890}</Project>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-- 
GitLab