- Define i386 on x86 MSVC builds
- Probably fixes the infamous MSVC networking issues caused by tcpip.h assuming it was a big-endian platform and never byte-swapping anything
[TCPIP][LAN]
- Fix byteswapping on AMD64 and ARM builds too

svn path=/trunk/; revision=59704
This commit is contained in:
Cameron Gutman 2013-08-12 01:12:25 +00:00
parent 60666eecd3
commit 4ed049cc7b
3 changed files with 7 additions and 7 deletions

View file

@ -142,7 +142,7 @@ else()
# Arch Options
if(ARCH STREQUAL "i386")
add_definitions(-D_M_IX86 -D_X86_ -D__i386__)
add_definitions(-D_M_IX86 -D_X86_ -D__i386__ -Di386)
elseif(ARCH STREQUAL "amd64")
add_definitions(-D_M_AMD64 -D_AMD64_ -D__x86_64__ -D_WIN64)
elseif(ARCH STREQUAL "arm")

View file

@ -1,6 +1,6 @@
#pragma once
#ifdef i386
#if defined(i386) || defined(_AMD64_) || defined(_ARM_)
/* DWORD network to host byte order conversion for i386 */
#define DN2H(dw) \
@ -26,7 +26,7 @@
((((w) & 0xFF00) >> 8) | \
(((w) & 0x00FF) << 8))
#else /* i386 */
#else /* defined(i386) || defined(_AMD64_) || defined(_ARM_) */
/* DWORD network to host byte order conversion for other architectures */
#define DN2H(dw) \
@ -44,4 +44,4 @@
#define WH2N(w) \
(w)
#endif /* i386 */
#endif /* defined(i386) || defined(_AMD64_) || defined(_ARM_) */

View file

@ -65,7 +65,7 @@
#define NDIS_BUFFER_TAG FOURCC('n','b','u','f')
#define NDIS_PACKET_TAG FOURCC('n','p','k','t')
#ifdef i386
#if defined(i386) || defined(_AMD64_) || defined(_ARM_)
/* DWORD network to host byte order conversion for i386 */
#define DN2H(dw) \
@ -91,7 +91,7 @@
((((w) & 0xFF00) >> 8) | \
(((w) & 0x00FF) << 8))
#else /* i386 */
#else /* defined(i386) || defined(_AMD64_) || defined(_ARM_) */
#error Unsupported architecture
@ -111,7 +111,7 @@
#define WH2N(w) \
(w)
#endif /* i386 */
#endif /* defined(i386) || defined(_AMD64_) || defined(_ARM_) */
/* AF_INET and other things Arty likes to use ;) */
#define AF_INET 2