aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-17 12:34:24 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-17 12:34:24 +0000
commit9b327fd9d16e47a3c89750d23422bdf905b33d0f (patch)
tree1f583ec5b55cd6707b79070ded1a0df0e597d118
parent8301028682d20e23c5fd6aaca92c2bc9721c1de3 (diff)
downloadpaludis-9b327fd9d16e47a3c89750d23422bdf905b33d0f.tar.gz
paludis-9b327fd9d16e47a3c89750d23422bdf905b33d0f.tar.xz
Looks like we need icky compielr conditionals to handle the two different binds
-rw-r--r--src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
index 95c0b37..b4e86f7 100644
--- a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
+++ b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
@@ -163,14 +163,24 @@ BrokenLinkageFinder::BrokenLinkageFinder(const Environment * env, const std::str
it_end(_imp->extra_lib_dirs.end()); it_end != it; ++it)
{
Log::get_instance()->message(ll_debug, lc_context, "Need to check for extra libraries in '" + stringify(env->root() / *it) + "'");
+#ifndef PALUDIS_TR1_FUNCTIONAL_IS_BOOST
+ std::for_each(_imp->checkers.begin(), _imp->checkers.end(),
+ tr1::bind(&LinkageChecker::add_extra_lib_dir, _1, env->root() / *it));
+#else
std::for_each(indirect_iterator(_imp->checkers.begin()), indirect_iterator(_imp->checkers.end()),
tr1::bind(&LinkageChecker::add_extra_lib_dir, _1, env->root() / *it));
+#endif
}
tr1::function<void (const FSEntry &, const std::string &)> callback(
tr1::bind(&Implementation<BrokenLinkageFinder>::add_breakage, _imp.get(), _1, _2));
+#ifndef PALUDIS_TR1_FUNCTIONAL_IS_BOOST
+ std::for_each(_imp->checkers.begin(), _imp->checkers.end(),
+ tr1::bind(&LinkageChecker::need_breakage_added, _1, callback));
+#else
std::for_each(indirect_iterator(_imp->checkers.begin()), indirect_iterator(_imp->checkers.end()),
tr1::bind(&LinkageChecker::need_breakage_added, _1, callback));
+#endif
_imp->checkers.clear();
}
@@ -241,18 +251,34 @@ Implementation<BrokenLinkageFinder>::check_file(const FSEntry & file)
{
FSEntry target(dereference_with_root(file, env->root()));
if (target.is_regular_file())
+ {
+#ifndef PALUDIS_TR1_FUNCTIONAL_IS_BOOST
+ std::for_each(checkers.begin(), checkers.end(),
+ tr1::bind(&LinkageChecker::note_symlink, _1, file, target));
+#else
std::for_each(indirect_iterator(checkers.begin()), indirect_iterator(checkers.end()),
tr1::bind(&LinkageChecker::note_symlink, _1, file, target));
+#endif
+ }
}
else if (file.is_directory())
walk_directory(file);
else if (file.is_regular_file())
+ {
+#ifndef PALUDIS_TR1_FUNCTIONAL_IS_BOOST
+ if (checkers.end() ==
+ std::find_if(checkers.begin(), checkers.end(),
+ tr1::bind(&LinkageChecker::check_file, _1, file)))
+ Log::get_instance()->message(ll_debug, lc_context, "'" + stringify(file) + "' is not a recognised file type");
+#else
if (indirect_iterator(checkers.end()) ==
std::find_if(indirect_iterator(checkers.begin()), indirect_iterator(checkers.end()),
tr1::bind(&LinkageChecker::check_file, _1, file)))
Log::get_instance()->message(ll_debug, lc_context, "'" + stringify(file) + "' is not a recognised file type");
+#endif
+ }
}
catch (const FSError & ex)
{