Tweaks to get tests running with various compilers.

This commit is contained in:
Beman
2013-05-12 17:42:48 -04:00
parent a7475d0f63
commit 4c0bd87c18
3 changed files with 9 additions and 2 deletions

View File

@@ -14,7 +14,7 @@
# include <boost/cstdint.hpp>
#endif
#if (defined __GNUC__ || defined __clang__)
#if ((defined __GNUC__ && !defined(__MINGW32__)) || defined __clang__)
#include <byteswap.h>
#define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 bswap_16
#define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 bswap_32

View File

@@ -13,10 +13,17 @@
#include <boost/detail/lightweight_main.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <iostream>
#include <cstring>
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
{

View File

@@ -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;
}