Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
a135e862
Commit
a135e862
authored
Oct 09, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made opencv headers windows.h-less (Bug #2122)
parent
df8364ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
internal.hpp
modules/core/include/opencv2/core/internal.hpp
+1
-0
operations.hpp
modules/core/include/opencv2/core/operations.hpp
+3
-10
system.cpp
modules/core/src/system.cpp
+9
-0
No files found.
modules/core/include/opencv2/core/internal.hpp
View file @
a135e862
...
...
@@ -67,6 +67,7 @@
# undef small
# undef min
# undef max
# undef abs
#else
# include <pthread.h>
#endif
...
...
modules/core/include/opencv2/core/operations.hpp
View file @
a135e862
...
...
@@ -75,16 +75,9 @@
#endif
#endif
#elif defined WIN32 || defined _WIN32
#define WIN32_MEAN_AND_LEAN
#ifndef _WIN32_WINNT // This is needed for the declaration of TryEnterCriticalSection in winbase.h with Visual Studio 2005 (and older?)
#define _WIN32_WINNT 0x0400 // http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx
#endif
#include <windows.h>
#undef min
#undef max
#undef abs
#define CV_XADD(addr,delta) InterlockedExchangeAdd((long volatile*)(addr), (delta))
#elif defined WIN32 || defined _WIN32 || defined WINCE
namespace
cv
{
CV_EXPORTS
int
_interlockedExchangeAdd
(
int
*
addr
,
int
delta
);
}
#define CV_XADD cv::_interlockedExchangeAdd
#else
static
inline
int
CV_XADD
(
int
*
addr
,
int
delta
)
...
...
modules/core/src/system.cpp
View file @
a135e862
...
...
@@ -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__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment