removed "#include "windows.h"" from core headers
This commit is contained in:
parent
5199cd9c95
commit
fa2f1c036a
@ -73,27 +73,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined WIN32 || defined _WIN32
|
#elif defined WIN32 || defined _WIN32
|
||||||
|
#define CV_XADD(addr,delta) _InterlockedExchangeAdd((long volatile*)(addr), (delta))
|
||||||
#if defined _MSC_VER && defined _M_IX86
|
|
||||||
static inline int CV_XADD( int* addr, int delta )
|
|
||||||
{
|
|
||||||
int tmp;
|
|
||||||
__asm
|
|
||||||
{
|
|
||||||
mov edx, addr
|
|
||||||
mov eax, delta
|
|
||||||
lock xadd [edx], eax
|
|
||||||
mov tmp, eax
|
|
||||||
}
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#include "windows.h"
|
|
||||||
#undef min
|
|
||||||
#undef max
|
|
||||||
#define CV_XADD(addr,delta) InterlockedExchangeAdd((LONG volatile*)(addr), (delta))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
template<typename _Tp> static inline _Tp CV_XADD(_Tp* addr, _Tp delta)
|
template<typename _Tp> static inline _Tp CV_XADD(_Tp* addr, _Tp delta)
|
||||||
|
@ -179,6 +179,8 @@ static LRESULT CALLBACK MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LP
|
|||||||
static void icvUpdateWindowPos( CvWindow* window );
|
static void icvUpdateWindowPos( CvWindow* window );
|
||||||
|
|
||||||
static CvWindow* hg_windows = 0;
|
static CvWindow* hg_windows = 0;
|
||||||
|
|
||||||
|
typedef int (CV_CDECL * CvWin32WindowCallback)(HWND, UINT, WPARAM, LPARAM, int*);
|
||||||
static CvWin32WindowCallback hg_on_preprocess = 0, hg_on_postprocess = 0;
|
static CvWin32WindowCallback hg_on_preprocess = 0, hg_on_postprocess = 0;
|
||||||
static HINSTANCE hg_hinstance = 0;
|
static HINSTANCE hg_hinstance = 0;
|
||||||
|
|
||||||
@ -1671,8 +1673,6 @@ CV_IMPL const char* cvGetWindowName( void* window_handle )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef int (CV_CDECL * CvWin32WindowCallback)(HWND, UINT, WPARAM, LPARAM, int*);
|
|
||||||
|
|
||||||
CV_IMPL void
|
CV_IMPL void
|
||||||
cvSetPreprocessFuncWin32_(const void* callback)
|
cvSetPreprocessFuncWin32_(const void* callback)
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#if defined WIN32 || defined _WIN32
|
#if defined WIN32 || defined _WIN32
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
#include "sys/types.h"
|
#include "sys/types.h"
|
||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user