improved win32 support from Valery Moiseev.

This commit is contained in:
Artem Pavlenko 2007-01-17 11:43:11 +00:00
parent 5549045aaa
commit ed5bbe25fe
9 changed files with 27 additions and 27 deletions

View file

@ -26,13 +26,21 @@
// Windows DLL support
#ifdef _WINDOWS
# define MAPNIK_EXP __declspec (dllexport)
# define MAPNIK_IMP __declspec (dllimport)
# ifdef MAPNIK_EXPORTS
# define MAPNIK_DECL __declspec (dllexport)
# else
# define MAPNIK_DECL __declspec (dllimport)
# endif
# pragma warning( disable: 4251 )
# pragma warning( disable: 4275 )
# if (_MSC_VER >= 1400) // vc8
# pragma warning(disable : 4996) //_CRT_SECURE_NO_DEPRECATE
# endif
#else
# define MAPNIK_EXP
# define MAPNIK_IMP
# define MAPNIK_DECL
#endif

View file

@ -108,15 +108,15 @@ namespace mapnik {
#define DATASOURCE_PLUGIN(classname) \
extern "C" MAPNIK_DECL std::string datasource_name() \
extern "C" MAPNIK_EXP std::string datasource_name() \
{ \
return classname::name(); \
} \
extern "C" MAPNIK_DECL datasource* create(const parameters &params) \
extern "C" MAPNIK_EXP datasource* create(const parameters &params) \
{ \
return new classname(params); \
} \
extern "C" MAPNIK_DECL void destroy(datasource *ds) \
extern "C" MAPNIK_EXP void destroy(datasource *ds) \
{ \
delete ds; \
} \

View file

@ -148,7 +148,7 @@ namespace mapnik
{
double len2 = distance2(ax,ay,bx,by);
if (len2 < 1e-7)
if (len2 < 1e-14)
{
return distance(x,y,ax,ay);
}

View file

@ -33,19 +33,11 @@
namespace mapnik {
template <typename T>
template <typename T> MAPNIK_DECL
void save_to_file(std::string const& filename,
std::string const& type,
T const& image);
template <typename T>
void save_as_png(std::string const& filename,
Image32 const& image);
template <typename T>
void save_as_jpeg(std::string const& filename,
int quality,
T const& image);
template <typename T>
double distance(T x0,T y0,T x1,T y1)

View file

@ -29,7 +29,7 @@
namespace mapnik
{
void load_map(Map & map, std::string const& filename);
MAPNIK_DECL void load_map(Map & map, std::string const& filename);
}
#endif // LOAD_MAP_HPP

View file

@ -30,7 +30,7 @@
namespace mapnik
{
void save_map(Map const& map, std::string const& filename);
MAPNIK_DECL void save_map(Map const& map, std::string const& filename);
}
#endif // SAVE_MAP_HPP

View file

@ -32,7 +32,7 @@
using namespace mapnik;
class MAPNIK_DECL shape_datasource : public datasource
class shape_datasource : public datasource
{
public:
shape_datasource(const parameters &params);

View file

@ -29,7 +29,7 @@
using namespace mapnik;
template <typename filterT>
class MAPNIK_DECL shape_featureset : public Featureset
class shape_featureset : public Featureset
{
filterT filter_;
int shape_type_;

View file

@ -29,7 +29,7 @@
#include "shape_featureset.hpp"
template <typename filterT>
class MAPNIK_DECL shape_index_featureset : public Featureset
class shape_index_featureset : public Featureset
{
filterT filter_;
int shape_type_;