comparison Core/Endianness.h @ 1939:d80a4fe8ffcc

tests EndiannessConversions32/64
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Mar 2016 10:48:12 +0100
parents 48ad54f7b21f
children 533ff46e944b
comparison
equal deleted inserted replaced
1938:48ad54f7b21f 1939:d80a4fe8ffcc
47 ** 47 **
48 ** On Windows, "host" will always be little-endian ("le"). 48 ** On Windows, "host" will always be little-endian ("le").
49 ********************************************************************/ 49 ********************************************************************/
50 50
51 #if defined(_WIN32) 51 #if defined(_WIN32)
52 #include <winsock2.h>
53 # if defined(_MSC_VER) 52 # if defined(_MSC_VER)
54 // http://msdn.microsoft.com/en-us/library/a3140177.aspx 53 // http://msdn.microsoft.com/en-us/library/a3140177.aspx
55 # define be16toh(x) _byteswap_ushort(x) 54 # define be16toh(x) _byteswap_ushort(x)
56 # define be32toh(x) _byteswap_ulong(x) 55 # define be32toh(x) _byteswap_ulong(x)
57 # define be64toh(x) _byteswap_uint64(x) 56 # define be64toh(x) _byteswap_uint64(x)