made opencv headers windows.h-less (Bug #2122)

This commit is contained in:
Vadim Pisarevsky
2012-10-09 17:12:42 +04:00
parent df8364ce63
commit a135e862c1
3 changed files with 13 additions and 10 deletions

View File

@@ -947,6 +947,15 @@ struct Mutex::Impl
CRITICAL_SECTION cs;
int refcount;
};
int _interlockedExchangeAdd(int* addr, int delta)
{
#if defined _MSC_VER && _MSC_VER >= 1500
return (int)_InterlockedExchangeAdd((long volatile*)addr, delta);
#else
return (int)InterlockedExchangeAdd((long volatile*)addr, delta);
#endif
}
#elif defined __APPLE__