Making sure code compiles with STL library that comes with OSX 10.9
diff --git a/src/sync-logic.cc b/src/sync-logic.cc
index b346739..06d142a 100644
--- a/src/sync-logic.cc
+++ b/src/sync-logic.cc
@@ -190,7 +190,7 @@
_LOG_TRACE (hash << ", " << interestType);
- DigestPtr digest = make_shared<Digest> ();
+ DigestPtr digest = boost::make_shared<Digest> ();
istringstream is (hash);
is >> *digest;
@@ -289,7 +289,7 @@
_LOG_DEBUG("processSyncInterest");
DigestConstPtr rootDigest;
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
rootDigest = m_state->getDigest();
}
@@ -299,7 +299,7 @@
SyncStateMsg ssm;
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
ssm << (*m_state);
}
sendSyncData (name, digest, ssm);
@@ -351,7 +351,7 @@
void
SyncLogic::processSyncData (const std::string &name, DigestConstPtr digest, const char *wireData, size_t len)
{
- DiffStatePtr diffLog = make_shared<DiffState> ();
+ DiffStatePtr diffLog = boost::make_shared<DiffState> ();
bool ownInterestSatisfied = false;
try
@@ -385,7 +385,7 @@
bool updated = false;
SeqNo oldSeq;
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
tie (inserted, updated, oldSeq) = m_state->update (info, seq);
}
@@ -419,7 +419,7 @@
}
else if (diffLeaf->getOperation() == REMOVE)
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
if (m_state->remove (info))
{
diffLog->remove (info);
@@ -482,7 +482,7 @@
SyncStateMsg ssm;
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
ssm << (*m_state);
}
sendSyncData (name, digest, ssm);
@@ -491,9 +491,9 @@
void
SyncLogic::satisfyPendingSyncInterests (DiffStateConstPtr diffLog)
{
- DiffStatePtr fullStateLog = make_shared<DiffState> ();
+ DiffStatePtr fullStateLog = boost::make_shared<DiffState> ();
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
BOOST_FOREACH (LeafConstPtr leaf, m_state->getLeaves ()/*.get<timed> ()*/)
{
fullStateLog->update (leaf->getInfo (), leaf->getSeq ());
@@ -547,7 +547,7 @@
DiffStatePtr diff;
{
//cout << "Add local names" <<endl;
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
NameInfoConstPtr info = StdNameInfo::FindOrCreate(prefix);
_LOG_DEBUG ("addLocalNames (): old state " << *m_state->getDigest ());
@@ -557,7 +557,7 @@
_LOG_DEBUG ("addLocalNames (): new state " << *m_state->getDigest ());
- diff = make_shared<DiffState>();
+ diff = boost::make_shared<DiffState>();
diff->update(info, seqN);
insertToDiffLog (diff);
}
@@ -571,7 +571,7 @@
{
DiffStatePtr diff;
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
NameInfoConstPtr info = StdNameInfo::FindOrCreate(prefix);
m_state->remove(info);
@@ -587,7 +587,7 @@
}
m_state->update (forwarderInfo, seqNo);
- diff = make_shared<DiffState>();
+ diff = boost::make_shared<DiffState>();
diff->remove(info);
diff->update(forwarderInfo, seqNo);
@@ -604,7 +604,7 @@
ostringstream os;
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
os << m_syncPrefix << "/" << *m_state->getDigest();
m_outstandingInterestName = os.str ();
@@ -694,7 +694,7 @@
// checking if our own interest got satisfied
bool satisfiedOwnInterest = false;
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
satisfiedOwnInterest = (m_outstandingInterestName == name);
}
@@ -713,7 +713,7 @@
SyncLogic::getRootDigest()
{
ostringstream os;
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
os << *m_state->getDigest();
return os.str();
}
@@ -721,14 +721,14 @@
size_t
SyncLogic::getNumberOfBranches () const
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
return m_state->getLeaves ().size ();
}
void
SyncLogic::printState () const
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
BOOST_FOREACH (const boost::shared_ptr<Sync::Leaf> leaf, m_state->getLeaves ())
{
@@ -739,7 +739,7 @@
std::map<std::string, bool>
SyncLogic::getBranchPrefixes() const
{
- recursive_mutex::scoped_lock lock (m_stateMutex);
+ boost::recursive_mutex::scoped_lock lock (m_stateMutex);
std::map<std::string, bool> m;