From: Adam Dickmeiss Date: Mon, 29 Oct 2012 12:02:20 +0000 (+0100) Subject: Scope classes, tweak for TIME_UTC X-Git-Tag: v1.3.50~4 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=6f89f42a210fd19ec30db126c600443f664c9686;p=metaproxy-moved-to-github.git Scope classes, tweak for TIME_UTC Scope classes due to VC 9 being different from GCC. Use TIME_UTC_ on Boost 1.50 and later. --- diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index 396f6db..3015609 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -442,7 +442,7 @@ void yf::FrontendNet::ZAssocServer::set_package(const mp::Package *package) } void yf::FrontendNet::ZAssocServer::set_thread_pool( - ThreadPoolSocketObserver *observer) + mp::ThreadPoolSocketObserver *observer) { m_thread_pool_observer = observer; } @@ -570,7 +570,7 @@ void yf::FrontendNet::My_Timer_Thread::socketNotify(int event) m_obs->deleteObserver(this); } -void yf::FrontendNet::process(Package &package) const +void yf::FrontendNet::process(mp::Package &package) const { if (m_p->az == 0) return; diff --git a/src/filter_session_shared.cpp b/src/filter_session_shared.cpp index ddff29b..229c99b 100644 --- a/src/filter_session_shared.cpp +++ b/src/filter_session_shared.cpp @@ -1067,7 +1067,13 @@ void yf::SessionShared::Rep::expire() while (true) { boost::xtime xt; - boost::xtime_get(&xt, boost::TIME_UTC); + boost::xtime_get(&xt, +#if BOOST_VERSION >= 105000 + boost::TIME_UTC_ +#else + boost::TIME_UTC +#endif + ); xt.sec += m_session_ttl / 3; boost::thread::sleep(xt); diff --git a/src/filter_z3950_client.cpp b/src/filter_z3950_client.cpp index bd2c590..99c7723 100644 --- a/src/filter_z3950_client.cpp +++ b/src/filter_z3950_client.cpp @@ -431,7 +431,13 @@ yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package) return 0; } boost::xtime xt; - xtime_get(&xt, boost::TIME_UTC); + xtime_get(&xt, +#if BOOST_VERSION >= 105000 + boost::TIME_UTC_ +#else + boost::TIME_UTC +#endif + ); xt.sec += 15; if (!m_cond_session_ready.timed_wait(lock, xt))