only include mapped_memory_cache.hpp if truly building shapefile plugin with -DSHAPE_MEMORY_MAPPED_FILE

This commit is contained in:
Dane Springmeyer 2013-08-13 12:19:01 -04:00
parent 78b4980352
commit 28ed9a2cfd
3 changed files with 8 additions and 3 deletions

View file

@ -31,14 +31,14 @@
// boost
#include <boost/spirit/include/qi.hpp>
#include <boost/cstdint.hpp> // for int16_t and int32_t
#ifdef SHAPE_MEMORY_MAPPED_FILE
#include <mapnik/mapped_memory_cache.hpp>
#endif
// stl
#include <string>
#include <stdexcept>
using mapnik::mapped_memory_cache;
dbf_file::dbf_file()
: num_records_(0),
num_fields_(0),
@ -60,7 +60,7 @@ dbf_file::dbf_file(std::string const& file_name)
{
#ifdef SHAPE_MEMORY_MAPPED_FILE
boost::optional<mapnik::mapped_region_ptr> memory = mapped_memory_cache::instance().find(file_name,true);
boost::optional<mapnik::mapped_region_ptr> memory = mapnik::mapped_memory_cache::instance().find(file_name,true);
if (memory)
{
mapped_region_ = *memory;

View file

@ -27,7 +27,10 @@
#include <mapnik/feature.hpp>
#include <mapnik/noncopyable.hpp>
#include <mapnik/unicode.hpp>
#ifdef SHAPE_MEMORY_MAPPED_FILE
#include <mapnik/mapped_memory_cache.hpp>
#endif
// boost
#include <boost/interprocess/streams/bufferstream.hpp>

View file

@ -33,7 +33,9 @@
#include <mapnik/global.hpp>
#include <mapnik/utils.hpp>
#include <mapnik/box2d.hpp>
#ifdef SHAPE_MEMORY_MAPPED_FILE
#include <mapnik/mapped_memory_cache.hpp>
#endif
#include <mapnik/noncopyable.hpp>
// boost