if including this header, some macros aren't compatible on mingw64 compiler Reproducible: Always
Created attachment 81868 [details] a patch to fix this. Since Win64 is LLP64 model, don't cast to unsigned long.
Thanks for the patch. A (slightly modified) version has been applied as r13513. Please verify whether the new version of valgrind.h works fine for you.
I'm assuming that r13513 is OK, and closing.