Scope classes, tweak for TIME_UTC
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 29 Oct 2012 12:02:20 +0000 (13:02 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 29 Oct 2012 12:02:20 +0000 (13:02 +0100)
Scope classes due to VC 9 being different from GCC.
Use TIME_UTC_ on Boost 1.50 and later.

src/filter_frontend_net.cpp
src/filter_session_shared.cpp
src/filter_z3950_client.cpp

index 396f6db..3015609 100644 (file)
@@ -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;
index ddff29b..229c99b 100644 (file)
@@ -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);
 
index bd2c590..99c7723 100644 (file)
@@ -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))