The `RTL_SRWLOCK_INIT` declaration got reformatted and doesn't exactly
match what's in `windows.h`, so we're getting warnings during builds.
Fix to match what it says in the system header.
rdar://105400572
Declaring _RTL_SRWLOCK ourselves causes clashes with <windows.h>.
Rather than doing that, declare an equivalent struct, and some overloads.
rdar://90776105
We can't safely include <windows.h> because it defines a large number
of macros, some of which clash with things in the Swift source tree,
and others of which clash with things in the LLVM source tree. Sadly
we *also* can't just include the Windows headers we need, because they
pull in some of the problematic macros.
In this instance, the best thing seems to be to grab the definitions
for the types and functions we are going to use and put them in their
own header file. If we define them correctly, then #including
<windows.h> before or after this header won't have any adverse effects.
rdar://90776105
Declaring _RTL_SRWLOCK ourselves causes clashes with <windows.h>.
Rather than doing that, declare an equivalent struct, and some overloads.
rdar://90776105
We can't safely include <windows.h> because it defines a large number
of macros, some of which clash with things in the Swift source tree,
and others of which clash with things in the LLVM source tree. Sadly
we *also* can't just include the Windows headers we need, because they
pull in some of the problematic macros.
In this instance, the best thing seems to be to grab the definitions
for the types and functions we are going to use and put them in their
own header file. If we define them correctly, then #including
<windows.h> before or after this header won't have any adverse effects.
rdar://90776105