From 60666eecd3ca894b609fb3bf91b4b76f642c5967 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 12 Aug 2013 00:45:04 +0000 Subject: [PATCH] [TCPIP] - Use common macro for htons - Fail compilation if an unrecognized architecture is found (testing) svn path=/trunk/; revision=59703 --- reactos/drivers/network/tcpip/include/tcpip.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/network/tcpip/include/tcpip.h b/reactos/drivers/network/tcpip/include/tcpip.h index 9b077841cfd..3ab12050931 100644 --- a/reactos/drivers/network/tcpip/include/tcpip.h +++ b/reactos/drivers/network/tcpip/include/tcpip.h @@ -93,6 +93,8 @@ #else /* i386 */ +#error Unsupported architecture + /* DWORD network to host byte order conversion for other architectures */ #define DN2H(dw) \ (dw) @@ -148,7 +150,7 @@ typedef struct { } TDIEntityInfo; #ifndef htons -#define htons(x) ((((x) & 0xff) << 8) | (((x) >> 8) & 0xff)) +#define htons(x) WH2N(x) #endif /* Global variable */