From 3f00f8362c2fdfae1dbb6517bc29c75e308bc4f0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 6 Nov 2009 16:17:30 -0500 Subject: Don't use archive_t if boost_serialization unavailable --- src/session.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/session.cc') diff --git a/src/session.cc b/src/session.cc index 378d12c7..9fb8df46 100644 --- a/src/session.cc +++ b/src/session.cc @@ -99,6 +99,7 @@ std::size_t session_t::read_data(const string& master_account) if (HANDLED(price_db_)) price_db_path = resolve_path(HANDLER(price_db_).str()); +#if defined(HAVE_BOOST_SERIALIZATION) optional cache; if (HANDLED(cache_) && master_account.empty()) cache = archive_t(HANDLED(cache_).str()); @@ -106,6 +107,7 @@ std::size_t session_t::read_data(const string& master_account) if (! (cache && cache->should_load(HANDLER(file_).data_files) && cache->load(journal))) { +#endif // HAVE_BOOST_SERIALIZATION if (price_db_path) { if (exists(*price_db_path)) { if (journal->read(*price_db_path) > 0) @@ -139,9 +141,11 @@ std::size_t session_t::read_data(const string& master_account) assert(xact_count == journal->xacts.size()); +#if defined(HAVE_BOOST_SERIALIZATION) if (cache && cache->should_save(journal)) cache->save(journal); } +#endif // HAVE_BOOST_SERIALIZATION if (populated_data_files) HANDLER(file_).data_files.clear(); -- cgit v1.2.3