Commit d897f8ef authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1466 from egorpugin:patch-1

parents d47288db e878ea95
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
#define cvLIB(name) "opencv_" name CV_VERSION_ID #define cvLIB(name) "opencv_" name CV_VERSION_ID
#endif #endif
#ifdef WIN32 #ifdef _WIN32
/* windows stuff */ /* windows stuff */
#else #else
typedef unsigned long DWORD; typedef unsigned long DWORD;
...@@ -78,7 +78,10 @@ typedef void *HANDLE; ...@@ -78,7 +78,10 @@ typedef void *HANDLE;
#ifndef _MSC_VER #ifndef _MSC_VER
typedef unsigned char BYTE; typedef unsigned char BYTE;
#else #else
#define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#undef min
#undef max
#endif #endif
typedef std::vector<int> vecI; typedef std::vector<int> vecI;
......
...@@ -43,7 +43,7 @@ static void sincos(double x, double *sinx, double *cosx) { ...@@ -43,7 +43,7 @@ static void sincos(double x, double *sinx, double *cosx) {
# endif # endif
#endif // !__MINGW64__ #endif // !__MINGW64__
#if (defined(WIN32) || defined(WIN64)) && !defined(__MINGW32__) #if (defined(_WIN32)) && !defined(__MINGW32__)
inline long lround(double d) { inline long lround(double d) {
return (long)(d>0 ? d+0.5 : ceil(d-0.5)); return (long)(d>0 ? d+0.5 : ceil(d-0.5));
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <memory> #include <memory>
#include <functional> #include <functional>
#if defined WIN32 || defined _WIN32 #ifdef _WIN32
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#undef min #undef min
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment