From: Danny S. <dan...@cl...> - 2007-06-14 07:12:02
|
> > in mingw's include dir: > winbase.h declares InterlockedIncrement as: > LONG WINAPI InterlockedIncrement(LPLONG); > > but in > http://msdn2.microsoft.com/en-us/library/ms683614.aspx > it is declared as > LONG __cdecl InterlockedIncrement( > LONG volatile* Addend > ); > > The code which follows the MS declarations (i.e. passes a pointer to > volatile int) does no build by default on mingw (cannot coerce > "pointer to int" to "pointer to volatile int")... > > anyway - am wondering why is there a difference in prototyping between > mingw and MS ? > Because the volatile qual in MS declaration wasn't always there in docs. MS changed the prototype, mingw hasn't yet. If you look at STLport archives, you will see that this API change has caused problems there too. Danny |