- Use common macro for htons
- Fail compilation if an unrecognized architecture is found (testing)

svn path=/trunk/; revision=59703
This commit is contained in:
Cameron Gutman
2013-08-12 00:45:04 +00:00
parent 975aee1a7c
commit 60666eecd3
@@ -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 */