summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-02-14 15:55:21 +0000
committerAlan Conway <aconway@apache.org>2012-02-14 15:55:21 +0000
commit34ad5adeb71ee6b115b07e152a4ee433fb17c344 (patch)
tree6d454a6eb2200fd832d14bef65e4ed4bb86a20ab
parent863e02dbc5d7295cb65ea23ebaa986f948d7d4ca (diff)
downloadqpid-python-34ad5adeb71ee6b115b07e152a4ee433fb17c344.tar.gz
NO-JIRA: Fix Logger::instance to work with older versions of boost.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1244010 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/src/qpid/log/Logger.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/qpid/log/Logger.cpp b/cpp/src/qpid/log/Logger.cpp
index 8c995a5c32..427abea0c6 100644
--- a/cpp/src/qpid/log/Logger.cpp
+++ b/cpp/src/qpid/log/Logger.cpp
@@ -23,7 +23,13 @@
#include "qpid/sys/Thread.h"
#include "qpid/sys/Time.h"
#include "qpid/DisableExceptionLogging.h"
+
+#if (BOOST_VERSION >= 104000)
#include <boost/serialization/singleton.hpp>
+#else
+#include <boost/pool/detail/singleton.hpp>
+#endif
+
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <algorithm>
@@ -45,7 +51,11 @@ inline void Logger::enable_unlocked(Statement* s) {
}
Logger& Logger::instance() {
+#if (BOOST_VERSION >= 104000)
return boost::serialization::singleton<Logger>::get_mutable_instance();
+#else
+ return boost::details::pool::singleton_default<Logger>::instance();
+#endif
}
Logger::Logger() : flags(0) {