From c5adca6e57e2527866759700b2531c53e9f957fb Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 14 Jul 2010 01:28:04 +0000 Subject: [PATCH] make sure to only use mutexes if THREADING=multi/MAPNIK_THREADSAFE=True --- include/mapnik/font_engine_freetype.hpp | 4 ++++ src/placement_finder.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/mapnik/font_engine_freetype.hpp b/include/mapnik/font_engine_freetype.hpp index 7b2b4aa68..87b258b2a 100644 --- a/include/mapnik/font_engine_freetype.hpp +++ b/include/mapnik/font_engine_freetype.hpp @@ -44,7 +44,9 @@ extern "C" #include #include #include +#ifdef MAPNIK_THREADSAFE #include +#endif // stl #include @@ -315,7 +317,9 @@ namespace mapnik freetype_engine(); private: FT_Library library_; +#ifdef MAPNIK_THREADSAFE static boost::mutex mutex_; +#endif static std::map name2file_; }; diff --git a/src/placement_finder.cpp b/src/placement_finder.cpp index af33b2be4..7f9dac194 100644 --- a/src/placement_finder.cpp +++ b/src/placement_finder.cpp @@ -36,8 +36,10 @@ #include #include #include -#include #include +#ifdef MAPNIK_THREADSAFE +#include +#endif //stl #include