mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 12:14:28 +00:00
Cold case #9191 fixes for NC30 compiler for the M16 mcu, reported by Bjorn Sundman.
This commit is contained in:
parent
5fcf6418cf
commit
bd86f95512
@ -139,7 +139,7 @@ PACK_STRUCT_END
|
||||
#define IPH_LEN_SET(hdr, len) (hdr)->_len = (len)
|
||||
#define IPH_ID_SET(hdr, id) (hdr)->_id = (id)
|
||||
#define IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off)
|
||||
#define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl_proto = (htons(IPH_PROTO(hdr) | ((ttl) << 8)))
|
||||
#define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl_proto = (htons(IPH_PROTO(hdr) | ((u16_t)(ttl) << 8)))
|
||||
#define IPH_PROTO_SET(hdr, proto) (hdr)->_ttl_proto = (htons((proto) | (IPH_TTL(hdr) << 8)))
|
||||
#define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum)
|
||||
|
||||
|
@ -180,8 +180,8 @@ enum NPmode {
|
||||
|
||||
|
||||
#define GETSHORT(s, cp) { \
|
||||
(s) = *(cp)++ << 8; \
|
||||
(s) |= *(cp)++; \
|
||||
(s) = *(cp); (cp)++; (s) << 8; \
|
||||
(s) |= *(cp); (cp)++; \
|
||||
}
|
||||
#define PUTSHORT(s, cp) { \
|
||||
*(cp)++ = (u_char) ((s) >> 8); \
|
||||
@ -189,10 +189,10 @@ enum NPmode {
|
||||
}
|
||||
|
||||
#define GETLONG(l, cp) { \
|
||||
(l) = *(cp)++ << 8; \
|
||||
(l) |= *(cp)++; (l) <<= 8; \
|
||||
(l) |= *(cp)++; (l) <<= 8; \
|
||||
(l) |= *(cp)++; \
|
||||
(l) = *(cp); (cp)++; (l) << 8; \
|
||||
(l) |= *(cp); (cp)++; (l) <<= 8; \
|
||||
(l) |= *(cp); (cp)++; (l) <<= 8; \
|
||||
(l) |= *(cp); (cp)++; \
|
||||
}
|
||||
#define PUTLONG(l, cp) { \
|
||||
*(cp)++ = (u_char) ((l) >> 24); \
|
||||
|
Loading…
Reference in New Issue
Block a user