mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-20 15:17:05 +08:00
changed the semantics of LWIP_PREFIX_BYTEORDER_FUNCS to prevent "symbol already defined" i.e. when linking to winsock
This commit is contained in:
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user