Skip to content

Commit

Permalink
Merge pull request #59 from jdmears2/new-boost
Browse files Browse the repository at this point in the history
Updates to support latest versions of boost
  • Loading branch information
tomerfiliba committed Aug 15, 2013
2 parents ba96a1f + 81f0416 commit 1e5a510
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion libagnos/cpp/src/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@

#include "protocol.hpp"
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/detail/workaround.hpp>

#include <boost/version.hpp>

#if BOOST_WORKAROUND(BOOST_VERSION, >= 104800)
namespace bid = boost::interprocess::ipcdetail;
#else
namespace bid = boost::interprocess::detail;
#endif

namespace agnos
{
Expand Down Expand Up @@ -278,7 +286,7 @@ namespace agnos

int32_t ClientUtils::get_seq()
{
return boost::interprocess::detail::atomic_inc32((boost::uint32_t*)&_seq);
return bid::atomic_inc32((boost::uint32_t*)&_seq);
}

shared_ptr<PackedException> ClientUtils::load_packed_exception()
Expand Down
2 changes: 1 addition & 1 deletion libagnos/cpp/src/servers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace agnos

void LibraryModeServer::serve()
{
shared_ptr<SocketTransportFactory> factory = boost::shared_static_cast<SocketTransportFactory>(transport_factory);
shared_ptr<SocketTransportFactory> factory = boost::dynamic_pointer_cast<SocketTransportFactory>(transport_factory);
std::cout << "AGNOS" << std::endl;
std::cout << factory->acceptor->local_endpoint().address().to_string() << std::endl;
std::cout << factory->acceptor->local_endpoint().port() << std::endl;
Expand Down

0 comments on commit 1e5a510

Please sign in to comment.