Merge remote-tracking branch 'origin/master'

This commit is contained in:
artemp 2017-02-06 12:59:24 +01:00
commit 4b17a417dc
2 changed files with 12 additions and 5 deletions

View file

@ -28,6 +28,13 @@
#include <boost/fusion/include/std_pair.hpp> #include <boost/fusion/include/std_pair.hpp>
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#if defined(HAVE_PNG)
extern "C"
{
#include <png.h>
}
#endif // HAVE_PNG
namespace mapnik { namespace grammar { namespace mapnik { namespace grammar {
namespace x3 = boost::spirit::x3; namespace x3 = boost::spirit::x3;
@ -76,10 +83,6 @@ image_options_map parse_image_options(std::string const& str)
} }
#if defined(HAVE_PNG) #if defined(HAVE_PNG)
extern "C"
{
#include <png.h>
}
int parse_png_filters(std::string const& str) int parse_png_filters(std::string const& str)
{ {
@ -113,6 +116,7 @@ int parse_png_filters(std::string const& str)
std::for_each(opts.begin(), opts.end(), [&filters] (int f) { filters |= f;}); std::for_each(opts.begin(), opts.end(), [&filters] (int f) { filters |= f;});
return filters; return filters;
} }
#endif
#endif // HAVE_PNG
} // ns mapnik } // ns mapnik

View file

@ -25,7 +25,10 @@ extern "C"
{ {
#include <png.h> #include <png.h>
} }
#ifndef PNG_FAST_FILTERS // libpng < 1.6
#define PNG_FAST_FILTERS ( PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP )
#endif #endif
#endif // HAVE_PNG
// mapnik // mapnik
#if defined(HAVE_PNG) #if defined(HAVE_PNG)