diff --git a/cmake/E57ExportHeader.cmake b/cmake/E57ExportHeader.cmake index 7f82be1..838da0f 100644 --- a/cmake/E57ExportHeader.cmake +++ b/cmake/E57ExportHeader.cmake @@ -7,7 +7,7 @@ include( GenerateExportHeader ) set( comment "\r // Windows DLLs can't include the extern keyword when declaring templates \r -#ifdef _WIN32 \r +#ifdef _MSC_VER \r #define TEMPLATE_EXTERN \r #else \r #define TEMPLATE_EXTERN extern \r diff --git a/src/CheckedFile.cpp b/src/CheckedFile.cpp index d49487d..876a6b9 100644 --- a/src/CheckedFile.cpp +++ b/src/CheckedFile.cpp @@ -68,13 +68,13 @@ // This is fixed in a newer version of CRCpp. // https://github.com/d-bahr/CRCpp/issues/17 // TODO: Remove when new CRCpp is released. -#if defined( WIN32 ) || defined( _WIN32 ) || defined( WINCE ) +#if defined( _MSC_VER ) // Disable warning about "conditional expression is constant". #pragma warning( push ) #pragma warning( disable : 4127 ) #endif #include "CRC.h" -#if defined( WIN32 ) || defined( _WIN32 ) || defined( WINCE ) +#if defined( _MSC_VER ) #pragma warning( pop ) #endif diff --git a/src/E57SimpleData.cpp b/src/E57SimpleData.cpp index c2a1223..7bb73c3 100644 --- a/src/E57SimpleData.cpp +++ b/src/E57SimpleData.cpp @@ -247,7 +247,7 @@ namespace e57 *this = Data3DPointsData_t(); } -#if defined( WIN32 ) || defined( _WIN32 ) || defined( WINCE ) +#if defined( _MSC_VER ) template struct E57_DLL Data3DPointsData_t; template struct E57_DLL Data3DPointsData_t; #else