From 4a88d71ff653a34a4cc596cca5ef99acb18cd3b6 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 4 Jun 2015 11:44:29 +0200 Subject: [PATCH] Fix compile issues on Windows with rtdist build --- dtool/src/dtoolbase/dtoolbase.h | 11 +++++++---- dtool/src/dtoolbase/pdtoa.cxx | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 6c3b2e0dac..50efeab52d 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -430,14 +430,18 @@ /* These symbols are used in dtoolsymbols.h and pandasymbols.h. */ #if defined(WIN32_VC) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) #define EXPORT_CLASS __declspec(dllexport) -#define EXPORT_TEMPL #define IMPORT_CLASS __declspec(dllimport) -#define IMPORT_TEMPL extern #else #define EXPORT_CLASS -#define EXPORT_TEMPL #define IMPORT_CLASS +#endif +/* "extern template" is now part of the C++11 standard. */ +#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) +#define EXPORT_TEMPL #define IMPORT_TEMPL extern +#else +#define EXPORT_TEMPL +#define IMPORT_TEMPL #endif #ifdef __cplusplus @@ -445,4 +449,3 @@ #endif #endif - diff --git a/dtool/src/dtoolbase/pdtoa.cxx b/dtool/src/dtoolbase/pdtoa.cxx index 949e070b63..a2778dc962 100644 --- a/dtool/src/dtoolbase/pdtoa.cxx +++ b/dtool/src/dtoolbase/pdtoa.cxx @@ -30,6 +30,8 @@ THE SOFTWARE. #if defined(_MSC_VER) #include +#include +#define copysign _copysign #endif #define UINT64_C2(h, l) ((static_cast(h) << 32) | static_cast(l))