Commit 763bf34e authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #981 from evoskuil/master

Add gssapi files to msvc, use Windows Unicode APIs.
parents e37c2062 e97bed37
......@@ -189,6 +189,9 @@
<ClInclude Include="..\..\..\..\src\err.hpp" />
<ClInclude Include="..\..\..\..\src\fd.hpp" />
<ClInclude Include="..\..\..\..\src\fq.hpp" />
<ClInclude Include="..\..\..\..\src\gssapi_client.hpp" />
<ClInclude Include="..\..\..\..\src\gssapi_mechanism_base.hpp" />
<ClInclude Include="..\..\..\..\src\gssapi_server.hpp" />
<ClInclude Include="..\..\..\..\src\i_engine.hpp" />
<ClInclude Include="..\..\..\..\src\i_poll_events.hpp" />
<ClInclude Include="..\..\..\..\src\io_object.hpp" />
......@@ -265,6 +268,9 @@
<ClCompile Include="..\..\..\..\src\epoll.cpp" />
<ClCompile Include="..\..\..\..\src\err.cpp" />
<ClCompile Include="..\..\..\..\src\fq.cpp" />
<ClCompile Include="..\..\..\..\src\gssapi_client.cpp" />
<ClCompile Include="..\..\..\..\src\gssapi_mechanism_base.cpp" />
<ClCompile Include="..\..\..\..\src\gssapi_server.cpp" />
<ClCompile Include="..\..\..\..\src\io_object.cpp" />
<ClCompile Include="..\..\..\..\src\io_thread.cpp" />
<ClCompile Include="..\..\..\..\src\ip.cpp" />
......
......@@ -205,6 +205,15 @@
<ClCompile Include="..\..\..\..\src\curve_server.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\gssapi_mechanism_base.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\gssapi_server.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\gssapi_client.cpp">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\include\zmq_utils.h">
......@@ -456,6 +465,15 @@
<ClInclude Include="..\..\..\..\src\curve_server.hpp">
<Filter>src\include</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\gssapi_mechanism_base.hpp">
<Filter>src\include</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\gssapi_server.hpp">
<Filter>src\include</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\gssapi_client.hpp">
<Filter>src\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="include">
......
......@@ -54,7 +54,6 @@
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#include <tchar.h>
#else
#include <unistd.h>
#include <netinet/tcp.h>
......@@ -301,29 +300,27 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
if (signaler_port == event_signaler_port) {
# if !defined _WIN32_WCE
sync = CreateEvent (&sa, FALSE, TRUE, TEXT ("Global\\zmq-signaler-port-sync"));
sync = CreateEventW (&sa, FALSE, TRUE, L"Global\\zmq-signaler-port-sync");
# else
sync = CreateEvent (NULL, FALSE, TRUE, TEXT ("Global\\zmq-signaler-port-sync"));
sync = CreateEventW (NULL, FALSE, TRUE, L"Global\\zmq-signaler-port-sync");
# endif
if (sync == NULL && GetLastError () == ERROR_ACCESS_DENIED)
sync = OpenEvent (SYNCHRONIZE | EVENT_MODIFY_STATE,
FALSE, TEXT ("Global\\zmq-signaler-port-sync"));
FALSE, L"Global\\zmq-signaler-port-sync");
win_assert (sync != NULL);
}
else if (signaler_port != 0) {
TCHAR mutex_name[64];
/* VC++ v120 swprintf has been changed to conform with the
ISO C standard, adding an extra character count parameter. */
_stprintf (mutex_name, TEXT ("Global\\zmq-signaler-port-%d"), signaler_port);
wchar_t mutex_name[MAX_PATH];
swprintf(mutex_name, MAX_PATH, L"Global\\zmq-signaler-port-%d", signaler_port);
# if !defined _WIN32_WCE
sync = CreateMutex (&sa, FALSE, mutex_name);
sync = CreateMutexW (&sa, FALSE, mutex_name);
# else
sync = CreateMutex (NULL, FALSE, mutex_name);
sync = CreateMutexW (NULL, FALSE, mutex_name);
# endif
if (sync == NULL && GetLastError () == ERROR_ACCESS_DENIED)
sync = OpenMutex (SYNCHRONIZE, FALSE, mutex_name);
sync = OpenMutexW (SYNCHRONIZE, FALSE, mutex_name);
win_assert (sync != NULL);
}
......
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