Remove inclusion of unreferenced headers. Add comment about Microsoft/Visual Studio availability of intrinsics.

This commit is contained in:
Beman
2013-05-15 15:38:34 -04:00
parent 8b4bd2adfc
commit 88268249a9

View File

@@ -7,19 +7,15 @@
#ifndef BOOST_ENDIAN_INTRINSIC_HPP #ifndef BOOST_ENDIAN_INTRINSIC_HPP
#define BOOST_ENDIAN_INTRINSIC_HPP #define BOOST_ENDIAN_INTRINSIC_HPP
#ifndef BOOST_DETAIL_ENDIAN_HPP
# include <boost/detail/endian.hpp>
#endif
#ifndef BOOST_CSTDINT_HPP
# include <boost/cstdint.hpp>
#endif
#if ((defined __GNUC__ && !defined(__MINGW32__)) || defined __clang__) #if ((defined __GNUC__ && !defined(__MINGW32__)) || defined __clang__)
#include <byteswap.h> #include <byteswap.h>
#define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 bswap_16 #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 bswap_16
#define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 bswap_32 #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 bswap_32
#define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_8 bswap_64 #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_8 bswap_64
#elif defined _MSC_VER #elif defined _MSC_VER
// Microsoft documents these as being compatible since Windows 95 and specificly
// lists runtime library support since Visual Studio 2003 (aka 7.1).
#include <cstdlib> #include <cstdlib>
#define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 _byteswap_ushort #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 _byteswap_ushort
#define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 _byteswap_ulong #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 _byteswap_ulong