Commit 05c45f17 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Switch from static C runtime library to runtime DLL

This fixes the stat() issue on Windows XP/2K3 by allowing sbbs to benefit
from the run-time library updates that Microsoft releases periodically
(like https://www.microsoft.com/en-us/download/details.aspx?id=53840).

For more info on the stat() issue which caused all kinds of sbbs errors
(e.g. creating directories initially, but a lot more):
https://stackoverflow.com/questions/32452777/visual-c-2015-express-stat-not-working-on-windows-xp

Since we are using cryptlib which requires the MSVC runtime DLL anyway
(it is the default build behavior of MSVC), we weren't really gaining
anything from statically linking the CRTL (LIBCMT.LIB). And for some reason,
an up-to-date MSVC2019 still has (links-in) a LIBCMT.LIB file that includes
this stat bug. All the online help resources I found just to seem to suggest
updating the CRTL DLLs (on the target system), with no mention of any fixes
available for the static CRTLs on the build system. But with the no gain
from static linking anyway, I figured it was time to switch to DLL CRTLs.

The debug builds are still statically linking the CRTL for no particular
reason.
parent 60dd0f2f
Pipeline #137 passed with stage
in 11 minutes and 44 seconds
......@@ -65,7 +65,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_LIB;LINK_LIST_THREADSAFE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release_mt/conio.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release_mt/</AssemblerListingLocation>
......
......@@ -61,7 +61,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_LIB;LINK_LIST_THREADSAFE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.sdl.release/conio.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.sdl.release/</AssemblerListingLocation>
......
......@@ -70,7 +70,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WRAPPER_EXPORTS;WIN32;_CONSOLE;SBBS_EXPORTS;NO_SOCKET_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\addfiles/addfiles.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\addfiles/</AssemblerListingLocation>
......
......@@ -111,7 +111,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SBBS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\allusers/allusers.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\allusers/</AssemblerListingLocation>
......
......@@ -62,7 +62,7 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\ans2asc/ans2asc.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\ans2asc/</AssemblerListingLocation>
......
......@@ -103,7 +103,7 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\asc2ans/asc2ans.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\asc2ans/</AssemblerListingLocation>
......
......@@ -69,7 +69,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\baja/baja.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\baja/</AssemblerListingLocation>
......
......@@ -69,7 +69,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\chksmb/chksmb.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\chksmb/</AssemblerListingLocation>
......
......@@ -71,7 +71,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SBBS_EXPORTS;NO_SOCKET_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\delfiles/delfiles.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\delfiles/</AssemblerListingLocation>
......
......@@ -71,7 +71,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;NO_SOCKET_SUPPORT;SBBS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\dstsedit/dstsedit.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\dstsedit/</AssemblerListingLocation>
......
......@@ -112,7 +112,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SBBS_EXPORTS;NO_SOCKET_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\dupefind/dupefind.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\dupefind/</AssemblerListingLocation>
......
......@@ -116,7 +116,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SBBS_EXPORTS;NDEBUG;WIN32;_CONSOLE;NO_SOCKET_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\echocfg/echocfg.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\echocfg/</AssemblerListingLocation>
......
......@@ -71,7 +71,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SBBS_EXPORTS;WRAPPER_EXPORTS;NO_SOCKET_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\filelist/filelist.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\filelist/</AssemblerListingLocation>
......
......@@ -110,7 +110,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SBBS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\fixsmb/fixsmb.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\fixsmb/</AssemblerListingLocation>
......
......@@ -81,7 +81,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;FTPSRVR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\ftpsrvr/ftpsrvr.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\ftpsrvr/</AssemblerListingLocation>
......
......@@ -79,7 +79,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\jsexec/jsexec.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\jsexec/</AssemblerListingLocation>
......
......@@ -86,7 +86,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>false</ConformanceMode>
<PreprocessorDefinitions>SBBS_EXPORTS;NO_SOCKET_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
......
......@@ -132,7 +132,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;MAILSRVR_EXPORTS;SMB_IMPORTS;MD5_IMPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\mailsrvr/mailsrvr.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\mailsrvr/</AssemblerListingLocation>
......
......@@ -112,7 +112,7 @@
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SBBS_EXPORTS;NO_SOCKET_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\msvc.win32.release\makeuser/makeuser.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\msvc.win32.release\makeuser/</AssemblerListingLocation>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment