diff options
Diffstat (limited to 'src/types.h')
-rw-r--r-- | src/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h index 5332dc4..6ba7629 100644 --- a/src/types.h +++ b/src/types.h @@ -44,6 +44,7 @@ const uint16_t dnbd3_packet_magic = (0x73 << 8) | (0x72); (a).cmd = net_order_16((a).cmd); \ (a).size = net_order_32((a).size); \ } while (0) +#define ENDIAN_MODE "Big Endian" #elif defined(__LITTLE_ENDIAN__) || (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN) || (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) static const uint16_t dnbd3_packet_magic = (0x73) | (0x72 << 8); // Make little endian our network byte order as probably 99.999% of machines this will be used on are LE @@ -52,6 +53,7 @@ static const uint16_t dnbd3_packet_magic = (0x73) | (0x72 << 8); #define net_order_16(a) (a) #define fixup_request(a) while(0) #define fixup_reply(a) while(0) +#define ENDIAN_MODE "Little Endian" #else #error "Unknown Endianness" #endif |