Browse Source

Merge branch 'release/1.9.x'

rdb 10 years ago
parent
commit
205e731c4a
2 changed files with 9 additions and 4 deletions
  1. 7 4
      dtool/src/dtoolbase/dtoolbase.h
  2. 2 0
      dtool/src/dtoolbase/pdtoa.cxx

+ 7 - 4
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
-

+ 2 - 0
dtool/src/dtoolbase/pdtoa.cxx

@@ -30,6 +30,8 @@ THE SOFTWARE.
 
 #if defined(_MSC_VER)
 #include <intrin.h>
+#include <float.h>
+#define copysign _copysign
 #endif
 
 #define UINT64_C2(h, l) ((static_cast<uint64_t>(h) << 32) | static_cast<uint64_t>(l))