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>
#pragma GCC diagnostic pop
#if defined(HAVE_PNG)
extern "C"
{
#include <png.h>
}
#endif // HAVE_PNG
namespace mapnik { namespace grammar {
namespace x3 = boost::spirit::x3;
@ -76,10 +83,6 @@ image_options_map parse_image_options(std::string const& str)
}
#if defined(HAVE_PNG)
extern "C"
{
#include <png.h>
}
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;});
return filters;
}
#endif
#endif // HAVE_PNG
} // ns mapnik

View file

@ -25,7 +25,10 @@ extern "C"
{
#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 // HAVE_PNG
// mapnik
#if defined(HAVE_PNG)