again, re-add some windows stuff Revert "possibly controversial commit: remove all windows sources, keeping only the windows cmake so that we can generate an sln to edit the code"

This reverts commit 48ba7961eb.
This commit is contained in:
DarthArgus
2016-07-23 18:01:50 -07:00
parent efaaa4bb42
commit 9b369713e1
173 changed files with 16448 additions and 0 deletions
@@ -0,0 +1,58 @@
// ======================================================================
//
// ByteOrder.cpp
// copyright (c) 2001 Sony Online Entertainment
//
// ======================================================================
#include "sharedFoundation/FirstSharedFoundation.h"
#include "sharedFoundation/ByteOrder.h"
// ======================================================================
// I'm using the arguments, but the compiler can't tell that
#pragma warning(disable: 4100)
__declspec(naked) ulong ntohl(ulong netLong)
{
_asm
{
mov eax, [esp+4]
bswap eax
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
__declspec(naked) ulong htonl(ulong hostLong)
{
_asm
{
mov eax, [esp+4]
bswap eax
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
__declspec(naked) ushort ntohs(ushort netShort)
{
_asm
{
mov eax, [esp+4]
bswap eax
shr eax, 16
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
__declspec(naked) ushort htons(ushort hostShort)
{
_asm
{
mov eax, [esp+4]
bswap eax
shr eax, 16
ret
}
} //lint !e533 !e715 // function should return a value, argument not referenced
// ======================================================================