The inclusion of Windows.h would cause the Shims to depend on WinSDK, which
would in turn depend on MSVCRT. However, the SwiftShims are using in MSVCRT
causing a circular dependency between WinSDK and MSVCRT preventing a clean build
from succeeding. Break the dependency by only including libc headers in the
shims header.
Revert #20194, which seems to be more trouble than it's worth. Instead, move the functions that SwiftPrivate needs back into LibcShims.h/cpp as SPI.
rdar://problem/45817565
When this header is used to create a module, it is used in a "C" environment,
which means that we cannot use the C++ style casts. Switch to the
old-style-cast. If we need to, we can always use `-Wno-old-style-casts` to
silence the warnings in C++ mode.