diff --git a/src/error.hpp b/src/error.hpp index 93f80db5..89f218d2 100644 --- a/src/error.hpp +++ b/src/error.hpp @@ -39,10 +39,6 @@ #include #include -// Disable warnings "non - DLL-interface classkey 'identifier' used as base -// for DLL-interface classkey 'identifier'" -#pragma warning( disable : 4275 ) - // ***************************************************************************** // namespace extensions namespace Exiv2 { @@ -50,6 +46,12 @@ namespace Exiv2 { // ***************************************************************************** // class definitions +#ifdef _MSC_VER +// Disable MSVC warnings "non - DLL-interface classkey 'identifier' used as base +// for DLL-interface classkey 'identifier'" +# pragma warning( disable : 4275 ) +#endif + /*! @brief Error class interface. Allows the definition and use of a hierarchy of error classes which can all be handled in one catch block. @@ -151,9 +153,9 @@ namespace Exiv2 { }; // class Error -} // namespace Exiv2 - -// non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' -#pragma warning( default : 4275 ) +#ifdef _MSC_VER +# pragma warning( default : 4275 ) +#endif +} // namespace Exiv2 #endif // #ifndef ERROR_HPP_