I just imported parts of the mingw-w64 CRT into the ReactOS tree and hit several minor problems when doing that:
- _DLL being redefined
Our current build system already defines _DLL and
according to MSDN, MSVC also defines it through the
compiler and not by a special header.
So I put an #ifndef around every #define _DLL
- InterlockedExchangePointer returning a result
Some GCC warning settings complain that the result of
InterlockedExchangePointer is not used. Adding a
(VOID) before the call fixes the problem.
- Unused variables in __report_gsfailure
When compiling for Win32, __report_gsfailure has some
uninitialized variables. I moved the already existing
#ifdef _WIN64 around them.
- __mingw_get_crt_info needing the mingw-w64 tree
As that function is entirely custom for mingw-w64 and
needs the "revstamp.h" from the mingw-w64 tree, it's
not suitable for an import into another tree.
Therefore I put it into an extra file
"mingw_custom.c", which could just be skipped, when
importing the files into our tree.
I'd already be glad if just some of these fixes could be applied to make further synchronizations easier.