From: Kai T. <kti...@go...> - 2010-08-17 11:24:56
|
2010/8/17 Pete Batard <pb...@gm...>: > For 32 bit, the current MinGW-w64 winbase has: > > LONG InterlockedIncrement(LONG volatile *lpAddend); > LONG InterlockedDecrement(LONG volatile *lpAddend); > LONG InterlockedExchange(LONG volatile *Target,LONG Value); > > However, MinGW32 uses: > > LONG WINAPI InterlockedDecrement(LONG volatile *); > LONG WINAPI InterlockedExchange(LONG volatile *,LONG); > LONG WINAPI InterlockedIncrement(LONG volatile *); > > The lack of WINAPI qualifier in MinGW-w64 results in MinGW-w64 32 bit > objects lacking the __stdcall decoration (eg. '_InterlockedExchange@8'), > which means that a 32 bit MinGW-w64 generated library using any of the > Interlocked calls above cannot be used with MinGW32 environment. > > You might also want to note the following from the MinGW32 header > regarding the Interlocked API section: > > /* CAREFUL: These are exported from ntoskrnl.exe and declared in > winddk.h as __fastcall functions, but are exported from kernel32.dll as > __stdcall */ > > Regards, > > /Pete Thank you Pete for noticing that. We are aware of this and we solved things here a bit different, but maybe we could add here the stdcall decoration, too. Our Interlocked API is treated in our libmingwex and has here (as intrinsic) the __cdecl decoration. Therefore it shouldn't produce for you in general issues. Do you have here found issues while building? Regards, Kai -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | (")_(") him gain world domination |