Commit f83b13b2 authored by Luca Boccassi's avatar Luca Boccassi

Problem: build fails on VS2010 as it does not have snprintf

Solution: ifdef it
parent c63b0955
......@@ -425,11 +425,15 @@ void zmq::thread_ctx_t::start_thread (thread_t &thread_,
thread_.setSchedulingParameters (_thread_priority, _thread_sched_policy,
_thread_affinity_cpus);
char namebuf[16];
char namebuf[16] = "";
#ifdef ZMQ_HAVE_WINDOWS
LIBZMQ_UNUSED (name_);
#else
snprintf (namebuf, sizeof (namebuf), "%s%sZMQbg%s%s",
_thread_name_prefix.empty () ? "" : _thread_name_prefix.c_str (),
_thread_name_prefix.empty () ? "" : "/", name_ ? "/" : "",
name_ ? name_ : "");
#endif
thread_.start (tfn_, arg_, namebuf);
}
......
......@@ -56,9 +56,11 @@ zmq::io_thread_t::~io_thread_t ()
void zmq::io_thread_t::start ()
{
char name[16];
char name[16] = "";
#ifndef ZMQ_HAVE_WINDOWS
snprintf (name, sizeof (name), "IO/%u",
get_tid () - zmq::ctx_t::reaper_tid - 1);
#endif
// Start the underlying I/O thread.
_poller->start (name);
}
......
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