diff --git a/include/boost/endian/detail/intrinsic.hpp b/include/boost/endian/detail/intrinsic.hpp index 1bf95ba..921ae2c 100644 --- a/include/boost/endian/detail/intrinsic.hpp +++ b/include/boost/endian/detail/intrinsic.hpp @@ -14,7 +14,7 @@ # include #endif -#if (defined __GNUC__ || defined __clang__) +#if ((defined __GNUC__ && !defined(__MINGW32__)) || defined __clang__) #include #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 bswap_16 #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 bswap_32 diff --git a/test/converter_test.cpp b/test/converter_test.cpp index c61a4b3..855dbc6 100644 --- a/test/converter_test.cpp +++ b/test/converter_test.cpp @@ -13,10 +13,17 @@ #include #include #include +#include namespace be = boost::endian; using std::cout; using std::endl; +using boost::int16_t; +using boost::uint16_t; +using boost::int32_t; +using boost::uint32_t; +using boost::int64_t; +using boost::uint64_t; namespace { diff --git a/test/endian_test.cpp b/test/endian_test.cpp index a2629df..72fb00c 100644 --- a/test/endian_test.cpp +++ b/test/endian_test.cpp @@ -74,7 +74,7 @@ namespace ++v; // verify integer_cover_operators being applied to this type - // will fail to compile if no endian<> specialization is present - auto x = v+v; + Endian x = v+v; if ( x == x ) // silence warning return; }