replace use of (deprecated) boost.endian with boost.prefef
This commit is contained in:
parent
8270751163
commit
71f275d92b
|
@ -1,3 +1,5 @@
|
|||
* replace use of boost-endian with boost-predef
|
||||
|
||||
1.1.12 release
|
||||
|
||||
* uTP performance fixes
|
||||
|
|
|
@ -15,7 +15,7 @@ changelog at the end of the file.
|
|||
|
||||
#include "libtorrent/sha1.hpp"
|
||||
|
||||
#include <boost/detail/endian.hpp> // for BIG_ENDIAN and LITTLE_ENDIAN macros
|
||||
#include <boost/predef/other/endian.h>
|
||||
|
||||
typedef boost::uint32_t u32;
|
||||
typedef boost::uint8_t u8;
|
||||
|
@ -164,7 +164,7 @@ namespace
|
|||
#endif
|
||||
}
|
||||
|
||||
#if !defined BOOST_BIG_ENDIAN && !defined BOOST_LITTLE_ENDIAN
|
||||
#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_LITTLE_BYTE
|
||||
bool is_big_endian()
|
||||
{
|
||||
u32 test = 1;
|
||||
|
@ -193,9 +193,9 @@ void SHA1_update(sha_ctx* context, u8 const* data, u32 len)
|
|||
{
|
||||
// GCC standard defines for endianness
|
||||
// test with: cpp -dM /dev/null
|
||||
#if defined BOOST_BIG_ENDIAN
|
||||
#if BOOST_ENDIAN_BIG_BYTE
|
||||
internal_update<big_endian_blk0>(context, data, len);
|
||||
#elif defined BOOST_LITTLE_ENDIAN
|
||||
#elif BOOST_ENDIAN_LITTLE_BYTE
|
||||
internal_update<little_endian_blk0>(context, data, len);
|
||||
#else
|
||||
// select different functions depending on endianess
|
||||
|
|
|
@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/crc32c.hpp"
|
||||
#include "libtorrent/ip_voter.hpp"
|
||||
|
||||
#include <boost/detail/endian.hpp> // for BIG_ENDIAN and LITTLE_ENDIAN macros
|
||||
#include <boost/predef/other/endian.h>
|
||||
|
||||
namespace libtorrent
|
||||
{
|
||||
|
@ -84,10 +84,10 @@ namespace libtorrent
|
|||
if (e1.port() > e2.port())
|
||||
swap(e1, e2);
|
||||
boost::uint32_t p;
|
||||
#if defined BOOST_BIG_ENDIAN
|
||||
#if BOOST_ENDIAN_BIG_BYTE
|
||||
p = e1.port() << 16;
|
||||
p |= e2.port();
|
||||
#elif defined BOOST_LITTLE_ENDIAN
|
||||
#elif BOOST_ENDIAN_LITTLE_BYTE
|
||||
p = aux::host_to_network(e2.port()) << 16;
|
||||
p |= aux::host_to_network(e1.port());
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue