Commit 16c3884a authored by Martin Sustrik's avatar Martin Sustrik

MSVC build fixed

parent e2f834d2
...@@ -169,6 +169,10 @@ ...@@ -169,6 +169,10 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> >
<File
RelativePath="..\..\..\src\clock.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\command.cpp" RelativePath="..\..\..\src\command.cpp"
> >
...@@ -269,6 +273,10 @@ ...@@ -269,6 +273,10 @@
RelativePath="..\..\..\src\poll.cpp" RelativePath="..\..\..\src\poll.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\poller_base.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\pub.cpp" RelativePath="..\..\..\src\pub.cpp"
> >
...@@ -383,6 +391,10 @@ ...@@ -383,6 +391,10 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd" Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
> >
<File
RelativePath="..\..\..\src\array.hpp"
>
</File>
<File <File
RelativePath="..\..\..\src\atomic_counter.hpp" RelativePath="..\..\..\src\atomic_counter.hpp"
> >
...@@ -391,6 +403,14 @@ ...@@ -391,6 +403,14 @@
RelativePath="..\..\..\src\atomic_ptr.hpp" RelativePath="..\..\..\src\atomic_ptr.hpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\blob.hpp"
>
</File>
<File
RelativePath="..\..\..\src\clock.hpp"
>
</File>
<File <File
RelativePath="..\..\..\src\command.hpp" RelativePath="..\..\..\src\command.hpp"
> >
...@@ -439,10 +459,6 @@ ...@@ -439,10 +459,6 @@
RelativePath="..\..\..\src\fq.hpp" RelativePath="..\..\..\src\fq.hpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\i_endpoint.hpp"
>
</File>
<File <File
RelativePath="..\..\..\src\i_engine.hpp" RelativePath="..\..\..\src\i_engine.hpp"
> >
...@@ -475,6 +491,10 @@ ...@@ -475,6 +491,10 @@
RelativePath="..\..\..\src\lb.hpp" RelativePath="..\..\..\src\lb.hpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\likely.hpp"
>
</File>
<File <File
RelativePath="..\..\..\src\msg_content.hpp" RelativePath="..\..\..\src\msg_content.hpp"
> >
...@@ -520,13 +540,21 @@ ...@@ -520,13 +540,21 @@
> >
</File> </File>
<File <File
RelativePath="..\platform.hpp" RelativePath="..\..\..\src\platform.hpp"
> >
</File> </File>
<File <File
RelativePath="..\..\..\src\poll.hpp" RelativePath="..\..\..\src\poll.hpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\poller.hpp"
>
</File>
<File
RelativePath="..\..\..\src\poller_base.hpp"
>
</File>
<File <File
RelativePath="..\..\..\src\pub.hpp" RelativePath="..\..\..\src\pub.hpp"
> >
...@@ -555,6 +583,10 @@ ...@@ -555,6 +583,10 @@
RelativePath="..\..\..\src\select.hpp" RelativePath="..\..\..\src\select.hpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\semaphore.hpp"
>
</File>
<File <File
RelativePath="..\..\..\src\session.hpp" RelativePath="..\..\..\src\session.hpp"
> >
......
...@@ -89,7 +89,7 @@ uint64_t zmq::clock_t::now_ms () ...@@ -89,7 +89,7 @@ uint64_t zmq::clock_t::now_ms ()
uint64_t zmq::clock_t::rdtsc () uint64_t zmq::clock_t::rdtsc ()
{ {
#if (defined _MSC_VER && (defined _M_IX86 || defined _M_X64)) #if (defined _MSC_VER && (defined _M_IX86 || defined _M_X64))
uint64_t current_time = __rdtsc (); return __rdtsc ();
#elif (defined __GNUC__ && (defined __i386__ || defined __x86_64__)) #elif (defined __GNUC__ && (defined __i386__ || defined __x86_64__))
uint32_t low, high; uint32_t low, high;
__asm__ volatile ("rdtsc" : "=a" (low), "=d" (high)); __asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
......
...@@ -316,7 +316,13 @@ void zmq::ctx_t::dezombify () ...@@ -316,7 +316,13 @@ void zmq::ctx_t::dezombify ()
for (zombies_t::iterator it = zombies.begin (); it != zombies.end ();) { for (zombies_t::iterator it = zombies.begin (); it != zombies.end ();) {
uint32_t slot = (*it)->get_slot (); uint32_t slot = (*it)->get_slot ();
if ((*it)->dezombify ()) { if ((*it)->dezombify ()) {
#if defined _MSC_VER
// HP implementation of STL requires doing it this way...
it = zombies.erase (it);
#else
zombies.erase (it); zombies.erase (it);
#endif
empty_slots.push_back (slot); empty_slots.push_back (slot);
slots [slot] = NULL; slots [slot] = NULL;
} }
......
...@@ -156,7 +156,8 @@ void zmq::select_t::loop () ...@@ -156,7 +156,8 @@ void zmq::select_t::loop ()
uint64_t timeout = execute_timers (); uint64_t timeout = execute_timers ();
// Wait for events. // Wait for events.
struct timeval tv = {timeout / 1000, timeout % 1000 * 1000}; struct timeval tv = {(long) (timeout / 1000),
(long) (timeout % 1000 * 1000)};
int rc = select (maxfd + 1, &readfds, &writefds, &exceptfds, int rc = select (maxfd + 1, &readfds, &writefds, &exceptfds,
timeout ? &tv : NULL); timeout ? &tv : 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