Endianness: Make it easier to check the compiled in guest endianness.

It was technically possible but clumsy to determine what endianness a guest
was configured with using the state in byteswap.hh. This change makes that
information available more directly.

Also get rid of unused (and mildly redundant) ByteOrderDiffers constant.
This commit is contained in:
Gabe Black
2011-09-19 05:19:45 -07:00
parent 978e41eab0
commit 3eca0a2bc9

View File

@@ -167,7 +167,7 @@ template <typename T> inline T betoh(T value) {return swap_byte(value);}
namespace BigEndianGuest
{
const bool ByteOrderDiffers = (HostByteOrder != BigEndianByteOrder);
const ByteOrder GuestByteOrder = BigEndianByteOrder;
template <typename T>
inline T gtole(T value) {return betole(value);}
template <typename T>
@@ -184,7 +184,7 @@ namespace BigEndianGuest
namespace LittleEndianGuest
{
const bool ByteOrderDiffers = (HostByteOrder != LittleEndianByteOrder);
const ByteOrder GuestByteOrder = LittleEndianByteOrder;
template <typename T>
inline T gtole(T value) {return value;}
template <typename T>