Commit bbdd8662 authored by somdoron's avatar somdoron

thread safety - supporting windows

parent 6749c9b3
...@@ -423,6 +423,7 @@ set(cxx-sources ...@@ -423,6 +423,7 @@ set(cxx-sources
kqueue.cpp kqueue.cpp
lb.cpp lb.cpp
mailbox.cpp mailbox.cpp
mailbox_safe.cpp
mechanism.cpp mechanism.cpp
metadata.cpp metadata.cpp
msg.cpp msg.cpp
......
...@@ -86,5 +86,14 @@ ...@@ -86,5 +86,14 @@
#cmakedefine ZMQ_HAVE_WINDOWS #cmakedefine ZMQ_HAVE_WINDOWS
#ifdef ZMQ_HAVE_WINDOWS
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
#undef _WIN32_WINNT
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif
#endif
#endif #endif
\ No newline at end of file
...@@ -29,4 +29,13 @@ ...@@ -29,4 +29,13 @@
#define ZMQ_HAVE_WINDOWS #define ZMQ_HAVE_WINDOWS
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
#undef _WIN32_WINNT
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif
#endif #endif
...@@ -29,4 +29,12 @@ ...@@ -29,4 +29,12 @@
#define ZMQ_HAVE_WINDOWS #define ZMQ_HAVE_WINDOWS
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
#undef _WIN32_WINNT
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif
#endif #endif
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<ClInclude Include="..\..\..\..\src\client.hpp" /> <ClInclude Include="..\..\..\..\src\client.hpp" />
<ClInclude Include="..\..\..\..\src\clock.hpp" /> <ClInclude Include="..\..\..\..\src\clock.hpp" />
<ClInclude Include="..\..\..\..\src\command.hpp" /> <ClInclude Include="..\..\..\..\src\command.hpp" />
<ClInclude Include="..\..\..\..\src\condition_variable.hpp" />
<ClInclude Include="..\..\..\..\src\config.hpp" /> <ClInclude Include="..\..\..\..\src\config.hpp" />
<ClInclude Include="..\..\..\..\src\ctx.hpp" /> <ClInclude Include="..\..\..\..\src\ctx.hpp" />
<ClInclude Include="..\..\..\..\src\curve_client.hpp" /> <ClInclude Include="..\..\..\..\src\curve_client.hpp" />
...@@ -103,6 +104,7 @@ ...@@ -103,6 +104,7 @@
<ClInclude Include="..\..\..\..\src\lb.hpp" /> <ClInclude Include="..\..\..\..\src\lb.hpp" />
<ClInclude Include="..\..\..\..\src\likely.hpp" /> <ClInclude Include="..\..\..\..\src\likely.hpp" />
<ClInclude Include="..\..\..\..\src\mailbox.hpp" /> <ClInclude Include="..\..\..\..\src\mailbox.hpp" />
<ClInclude Include="..\..\..\..\src\mailbox_safe.hpp" />
<ClInclude Include="..\..\..\..\src\msg.hpp" /> <ClInclude Include="..\..\..\..\src\msg.hpp" />
<ClInclude Include="..\..\..\..\src\mtrie.hpp" /> <ClInclude Include="..\..\..\..\src\mtrie.hpp" />
<ClInclude Include="..\..\..\..\src\mutex.hpp" /> <ClInclude Include="..\..\..\..\src\mutex.hpp" />
...@@ -183,6 +185,7 @@ ...@@ -183,6 +185,7 @@
<ClCompile Include="..\..\..\..\src\kqueue.cpp" /> <ClCompile Include="..\..\..\..\src\kqueue.cpp" />
<ClCompile Include="..\..\..\..\src\lb.cpp" /> <ClCompile Include="..\..\..\..\src\lb.cpp" />
<ClCompile Include="..\..\..\..\src\mailbox.cpp" /> <ClCompile Include="..\..\..\..\src\mailbox.cpp" />
<ClCompile Include="..\..\..\..\src\mailbox_safe.cpp" />
<ClCompile Include="..\..\..\..\src\mechanism.cpp" /> <ClCompile Include="..\..\..\..\src\mechanism.cpp" />
<ClCompile Include="..\..\..\..\src\metadata.cpp" /> <ClCompile Include="..\..\..\..\src\metadata.cpp" />
<ClCompile Include="..\..\..\..\src\msg.cpp" /> <ClCompile Include="..\..\..\..\src\msg.cpp" />
......
...@@ -232,6 +232,9 @@ ...@@ -232,6 +232,9 @@
<ClCompile Include="..\..\..\..\src\client.cpp"> <ClCompile Include="..\..\..\..\src\client.cpp">
<Filter>src</Filter> <Filter>src</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\..\..\src\mailbox_safe.cpp">
<Filter>src</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\..\include\zmq_utils.h"> <ClInclude Include="..\..\..\..\include\zmq_utils.h">
...@@ -504,6 +507,12 @@ ...@@ -504,6 +507,12 @@
<ClInclude Include="..\..\..\..\src\client.hpp"> <ClInclude Include="..\..\..\..\src\client.hpp">
<Filter>src\include</Filter> <Filter>src\include</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\..\..\src\mailbox_safe.hpp">
<Filter>src\include</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\condition_variable.hpp">
<Filter>src\include</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Filter Include="include"> <Filter Include="include">
......
...@@ -45,6 +45,8 @@ set(tests ...@@ -45,6 +45,8 @@ set(tests
test_connect_rid test_connect_rid
test_xpub_nodrop test_xpub_nodrop
test_pub_invert_matching test_pub_invert_matching
test_thread_safe
test_client_server
) )
if(NOT WIN32) if(NOT WIN32)
list(APPEND tests list(APPEND tests
......
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