Broken out of #30454.
When using CMake, the user can select the MSVC runtime library to be:
- Statically-linked (with the corresponding
x64-windows-static
vcpkg triplet) or - Dynamically-linked (with the corresponding
x64-windows
vcpkg triplet)
In the latter case, the compiler emits the C4273 warning.
As the “Necessary on some platforms” comment does not apply to MSVC, skip the declaration for MSVC.
The MSVC build system in the master branch supports the statically-linked runtime only: https://github.com/bitcoin/bitcoin/blob/ed739d14b58b5e772a65b85bb421703963b06852/build_msvc/common.init.vcxproj.in#L65