From 8388baafd3e2c6e4b2f76878215d503e8842da27 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 28 Feb 2011 16:24:15 -0500 Subject: Support Boost 1.46 and Boost.Filesystem v3 --- src/textual.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/textual.cc') diff --git a/src/textual.cc b/src/textual.cc index 5bcbf86b..a1e5d50b 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -68,7 +68,9 @@ namespace { parse_context_t(journal_t& _journal, scope_t& _scope) : journal(_journal), scope(_scope), timelog(journal, scope), - strict(false), count(0), errors(0), sequence(1) {} + strict(false), count(0), errors(0), sequence(1) { + timelog.context_count = &count; + } bool front_is_account() { return state_stack.front().type() == typeid(account_t *); @@ -86,6 +88,10 @@ namespace { return boost::get(state); return NULL; } + + void close() { + timelog.close(); + } }; class instance_t : public noncopyable, public scope_t @@ -723,7 +729,11 @@ void instance_t::include_directive(char * line) mask_t glob; #if BOOST_VERSION >= 103700 path parent_path = filename.parent_path(); +#if BOOST_VERSION >= 104600 + glob.assign_glob('^' + filename.filename().string() + '$'); +#else glob.assign_glob('^' + filename.filename() + '$'); +#endif #else // BOOST_VERSION >= 103700 path parent_path = filename.branch_path(); glob.assign_glob('^' + filename.leaf() + '$'); @@ -742,7 +752,11 @@ void instance_t::include_directive(char * line) #endif { #if BOOST_VERSION >= 103700 +#if BOOST_VERSION >= 104600 + string base = (*iter).path().string(); +#else string base = (*iter).filename(); +#endif #else // BOOST_VERSION >= 103700 string base = (*iter).leaf(); #endif // BOOST_VERSION >= 103700 -- cgit v1.2.3