mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-13 19:57:05 +08:00
def.h: Provide hton* / ntoh* functions to users by default for compatibility (can be turned off)
Add note to UPGRADING document
This commit is contained in:
@@ -92,6 +92,14 @@ u32_t lwip_htonl(u32_t x);
|
||||
#endif
|
||||
#define lwip_ntohl(x) lwip_htonl(x)
|
||||
|
||||
/* Provide usual function names as macros for users, but this can be turned off */
|
||||
#ifndef LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS
|
||||
#define htons(x) lwip_htons(x)
|
||||
#define ntohs(x) lwip_ntohs(x)
|
||||
#define htonl(x) lwip_htonl(x)
|
||||
#define ntohl(x) lwip_ntohl(x)
|
||||
#endif
|
||||
|
||||
/* These macros should be calculated by the preprocessor and are used
|
||||
with compile-time constants only (so that there is no little-endian
|
||||
overhead at runtime). */
|
||||
|
||||
Reference in New Issue
Block a user