commit
d16dc5a1db
@ -11,10 +11,10 @@
|
|||||||
// Changes endianness
|
// Changes endianness
|
||||||
inline UInt64 HostToNetwork8(const void * a_Value)
|
inline UInt64 HostToNetwork8(const void * a_Value)
|
||||||
{
|
{
|
||||||
unsigned long long __HostToNetwork8;
|
unsigned long long buf;
|
||||||
memcpy( &__HostToNetwork8, a_Value, sizeof( __HostToNetwork8));
|
memcpy( &buf, a_Value, sizeof( buf));
|
||||||
__HostToNetwork8 = (( ( (unsigned long long)htonl((u_long)__HostToNetwork8)) << 32) + htonl(__HostToNetwork8 >> 32));
|
buf = (( ( (unsigned long long)htonl((u_long)buf)) << 32) + htonl(buf >> 32));
|
||||||
return __HostToNetwork8;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -23,10 +23,10 @@ inline UInt64 HostToNetwork8(const void * a_Value)
|
|||||||
|
|
||||||
inline UInt32 HostToNetwork4(const void* a_Value)
|
inline UInt32 HostToNetwork4(const void* a_Value)
|
||||||
{
|
{
|
||||||
unsigned int __HostToNetwork4;
|
unsigned int buf;
|
||||||
memcpy( &__HostToNetwork4, a_Value, sizeof( __HostToNetwork4));
|
memcpy( &buf, a_Value, sizeof( buf));
|
||||||
__HostToNetwork4 = ntohl( __HostToNetwork4);
|
buf = ntohl( buf);
|
||||||
return __HostToNetwork4;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user