winim
winim copied to clipboard
Interlocked* APIs type mismatch on MinGW GCC
The underlying type of LONG should be __LONG32, which is clong on all non-Cygwin MinGW compilers (i686-w64-mingw32-gcc / x86_64-w64-mingw32-gcc). In contrast, int32 might either int or long, depending on your stdint.h.
This generates an incompatible-pointer-types warning although the width of int and long are the same.
See ntdef.h for the canonical definition:
Solution: mark the types as the underlying C type and assert their width instead.
many types' sign are incorrect -- i will fix them in a pr.