summaryrefslogtreecommitdiff
path: root/cpp/src
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
commitea668ff2c460ccb68113b62743717120d569812b (patch)
tree6d454a6eb2200fd832d14bef65e4ed4bb86a20ab /cpp/src
parenta886fbb74bb46440ad5d3542c287c6378bdd2efb (diff)
downloadqpid-python-ea668ff2c460ccb68113b62743717120d569812b.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
Diffstat (limited to 'cpp/src')
-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) {