Skip to content

Commit 402a77e

Browse files
committed
Merge pull request opencv#9237 from alalek:fix_winrt_build
2 parents 2ca561f + 1081cee commit 402a77e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+142
-147
lines changed

3rdparty/openvx/hal/openvx_hal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ inline ivx::Context& getOpenVXHALContext()
5959
static thread_local ivx::Context instance = ivx::Context::create();
6060
#else //__cplusplus >= 201103L || _MSC_VER >= 1800
6161
//CXX98
62-
#ifdef WIN32
62+
#ifdef _WIN32
6363
static __declspec(thread) ivx::Context instance = ivx::Context::create();
6464
#else
6565
static __thread ivx::Context instance = ivx::Context::create();

cmake/checks/cpu_neon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <stdio.h>
22

3-
#if (defined WIN32 || defined _WIN32) && defined(_M_ARM)
3+
#if defined _WIN32 && defined(_M_ARM)
44
# include <Intrin.h>
55
# include <arm_neon.h>
66
# define CV_NEON 1

modules/core/include/opencv2/core/cv_cpu_dispatch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
# define CV_FMA3 1
8787
#endif
8888

89-
#if (defined WIN32 || defined _WIN32) && defined(_M_ARM)
89+
#if defined _WIN32 && defined(_M_ARM)
9090
# include <Intrin.h>
9191
# include <arm_neon.h>
9292
# define CV_NEON 1
@@ -128,7 +128,7 @@ struct VZeroUpperGuard {
128128
# define CV_MMX 1
129129
# define CV_SSE 1
130130
# define CV_SSE2 1
131-
#elif (defined WIN32 || defined _WIN32) && defined(_M_ARM)
131+
#elif defined _WIN32 && defined(_M_ARM)
132132
# include <Intrin.h>
133133
# include <arm_neon.h>
134134
# define CV_NEON 1

modules/core/include/opencv2/core/cvdef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Cv64suf;
244244
# define DISABLE_OPENCV_24_COMPATIBILITY
245245
#endif
246246

247-
#if (defined WIN32 || defined _WIN32 || defined WINCE || defined __CYGWIN__) && defined CVAPI_EXPORTS
247+
#if (defined _WIN32 || defined WINCE || defined __CYGWIN__) && defined CVAPI_EXPORTS
248248
# define CV_EXPORTS __declspec(dllexport)
249249
#elif defined __GNUC__ && __GNUC__ >= 4
250250
# define CV_EXPORTS __attribute__ ((visibility ("default")))

modules/core/include/opencv2/core/opencl/runtime/opencl_clamdblas.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#ifdef HAVE_CLAMDBLAS
4646

4747
#ifndef CL_RUNTIME_EXPORT
48-
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
48+
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
4949
#define CL_RUNTIME_EXPORT __declspec(dllimport)
5050
#else
5151
#define CL_RUNTIME_EXPORT

modules/core/include/opencv2/core/opencl/runtime/opencl_clamdfft.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#ifdef HAVE_CLAMDFFT
4646

4747
#ifndef CL_RUNTIME_EXPORT
48-
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
48+
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
4949
#define CL_RUNTIME_EXPORT __declspec(dllimport)
5050
#else
5151
#define CL_RUNTIME_EXPORT

modules/core/include/opencv2/core/opencl/runtime/opencl_core.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#else // HAVE_OPENCL_STATIC
5656

5757
#ifndef CL_RUNTIME_EXPORT
58-
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
58+
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
5959
#define CL_RUNTIME_EXPORT __declspec(dllimport)
6060
#else
6161
#define CL_RUNTIME_EXPORT

modules/core/include/opencv2/core/types_c.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
#ifdef HAVE_IPL
4848
# ifndef __IPL_H__
49-
# if defined WIN32 || defined _WIN32
49+
# if defined _WIN32
5050
# include <ipl.h>
5151
# else
5252
# include <ipl/ipl.h>
@@ -65,7 +65,7 @@
6565
#include <float.h>
6666
#endif // SKIP_INCLUDES
6767

68-
#if defined WIN32 || defined _WIN32
68+
#if defined _WIN32
6969
# define CV_CDECL __cdecl
7070
# define CV_STDCALL __stdcall
7171
#else

modules/core/src/alloc.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static void* OutOfMemoryError(size_t size)
5555

5656
#if CV_USE_SYSTEM_MALLOC
5757

58-
#if defined WIN32 || defined _WIN32
58+
#if defined _WIN32
5959
void deleteThreadAllocData() {}
6060
#endif
6161

@@ -93,7 +93,7 @@ void fastFree(void* ptr)
9393

9494
#define STAT(stmt)
9595

96-
#ifdef WIN32
96+
#ifdef _WIN32
9797
#if (_WIN32_WINNT >= 0x0602)
9898
#include <synchapi.h>
9999
#endif
@@ -126,7 +126,7 @@ void SystemFree(void* ptr, size_t)
126126
{
127127
free(ptr);
128128
}
129-
#else //WIN32
129+
#else //_WIN32
130130

131131
#include <sys/mman.h>
132132

@@ -155,7 +155,7 @@ void SystemFree(void* ptr, size_t size)
155155
{
156156
munmap(ptr, size);
157157
}
158-
#endif //WIN32
158+
#endif //_WIN32
159159

160160
struct AutoLock
161161
{
@@ -399,7 +399,7 @@ struct ThreadData
399399

400400
Block* bins[MAX_BIN+1][3];
401401

402-
#ifdef WIN32
402+
#ifdef _WIN32
403403
#ifdef WINCE
404404
# define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
405405
#endif //WINCE
@@ -418,7 +418,7 @@ struct ThreadData
418418
}
419419
return data;
420420
}
421-
#else //WIN32
421+
#else //_WIN32
422422
static void deleteData(void* data)
423423
{
424424
delete (ThreadData*)data;
@@ -438,10 +438,10 @@ struct ThreadData
438438
}
439439
return data;
440440
}
441-
#endif //WIN32
441+
#endif //_WIN32
442442
};
443443

444-
#ifdef WIN32
444+
#ifdef _WIN32
445445
DWORD ThreadData::tlsKey = TLS_OUT_OF_INDEXES;
446446

447447
void deleteThreadAllocData()
@@ -450,9 +450,9 @@ void deleteThreadAllocData()
450450
delete (ThreadData*)TlsGetValue( ThreadData::tlsKey );
451451
}
452452

453-
#else //WIN32
453+
#else //_WIN32
454454
pthread_key_t ThreadData::tlsKey = 0;
455-
#endif //WIN32
455+
#endif //_WIN32
456456

457457
#if 0
458458
static void checkList(ThreadData* tls, int idx)

modules/core/src/glob.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
#include "precomp.hpp"
4444

45-
#if defined WIN32 || defined _WIN32 || defined WINCE
45+
#if defined _WIN32 || defined WINCE
4646
# include <windows.h>
4747
const char dir_separators[] = "/\\";
4848
const char native_separator = '\\';
@@ -139,7 +139,7 @@ const char native_separator = '/';
139139

140140
static bool isDir(const cv::String& path, DIR* dir)
141141
{
142-
#if defined WIN32 || defined _WIN32 || defined WINCE
142+
#if defined _WIN32 || defined WINCE
143143
DWORD attributes;
144144
BOOL status = TRUE;
145145
if (dir)

0 commit comments

Comments
 (0)