changed the semantics of LWIP_PREFIX_BYTEORDER_FUNCS to prevent "symbol already defined" i.e. when linking to winsock

This commit is contained in:
goldsimon
2010-05-16 15:09:55 +00:00
parent 290bd400c3
commit 03e4eb4de8
3 changed files with 34 additions and 28 deletions

View File

@@ -61,7 +61,7 @@
* @return n in network byte order
*/
u16_t
htons(u16_t n)
lwip_htons(u16_t n)
{
return ((n & 0xff) << 8) | ((n & 0xff00) >> 8);
}
@@ -73,9 +73,9 @@ htons(u16_t n)
* @return n in host byte order
*/
u16_t
ntohs(u16_t n)
lwip_ntohs(u16_t n)
{
return htons(n);
return lwip_htons(n);
}
/**
@@ -85,7 +85,7 @@ ntohs(u16_t n)
* @return n in network byte order
*/
u32_t
htonl(u32_t n)
lwip_htonl(u32_t n)
{
return ((n & 0xff) << 24) |
((n & 0xff00) << 8) |
@@ -100,9 +100,9 @@ htonl(u32_t n)
* @return n in host byte order
*/
u32_t
ntohl(u32_t n)
lwip_ntohl(u32_t n)
{
return htonl(n);
return lwip_htonl(n);
}
#endif /* (LWIP_PLATFORM_BYTESWAP == 0) && (BYTE_ORDER == LITTLE_ENDIAN) */