Add new file for fixing dependency issue for 32-bit. git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@5902 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-crt/intrincs/ilockcxch2.c b/mingw-w64-crt/intrincs/ilockcxch2.c new file mode 100644 index 0000000..1385c36 --- /dev/null +++ b/mingw-w64-crt/intrincs/ilockcxch2.c
@@ -0,0 +1,12 @@ +#include <intrin.h> + +#ifdef _WIN32 +__LONG32 __stdcall InterlockedCompareExchange(__LONG32 volatile *Destination, __LONG32 ExChange, __LONG32 Comperand); + +__LONG32 __stdcall InterlockedCompareExchange(__LONG32 volatile *Destination, __LONG32 ExChange, __LONG32 Comperand) +{ + __LONG32 prev; + __asm__ __volatile__("lock ; cmpxchgl %1,%2" : "=a" (prev) : "q" (ExChange),"m" (*Destination), "0" (Comperand) : "memory"); + return prev; +} +#endif