Added extra compiler specific structure packing options.

This commit is contained in:
Richard Barry 2008-09-22 13:16:59 +00:00
parent d6ec78a568
commit aa2ffbfde5
10 changed files with 54 additions and 0 deletions

View file

@ -79,6 +79,9 @@ void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t);
# include "arch/bpstruct.h"
#endif
PACK_STRUCT_BEGIN
#if (defined(__MWERKS__) || defined(__CWCC__))
#pragma options align= packed
#endif
struct icmp_echo_hdr {
PACK_STRUCT_FIELD(u16_t _type_code);
PACK_STRUCT_FIELD(u16_t chksum);
@ -88,6 +91,9 @@ struct icmp_echo_hdr {
PACK_STRUCT_END
PACK_STRUCT_BEGIN
#if (defined(__MWERKS__) || defined(__CWCC__))
#pragma options align= packed
#endif
struct icmp_dur_hdr {
PACK_STRUCT_FIELD(u16_t _type_code);
PACK_STRUCT_FIELD(u16_t chksum);
@ -96,6 +102,9 @@ struct icmp_dur_hdr {
PACK_STRUCT_END
PACK_STRUCT_BEGIN
#if (defined(__MWERKS__) || defined(__CWCC__))
#pragma options align= packed
#endif
struct icmp_te_hdr {
PACK_STRUCT_FIELD(u16_t _type_code);
PACK_STRUCT_FIELD(u16_t chksum);

View file

@ -84,6 +84,9 @@ extern "C" {
# include "arch/bpstruct.h"
#endif
PACK_STRUCT_BEGIN
#if (defined(__MWERKS__) || defined(__CWCC__))
#pragma options align= packed
#endif
struct igmp_msg {
PACK_STRUCT_FIELD(u8_t igmp_msgtype);
PACK_STRUCT_FIELD(u8_t igmp_maxresp);

View file

@ -114,6 +114,9 @@ struct ip_pcb {
# include "arch/bpstruct.h"
#endif
PACK_STRUCT_BEGIN
#if (defined(__MWERKS__) || defined(__CWCC__))
#pragma options align= packed
#endif
struct ip_hdr {
/* version / header length / type of service */
PACK_STRUCT_FIELD(u16_t _v_hl_tos);

View file

@ -42,6 +42,9 @@ extern "C" {
# include "arch/bpstruct.h"
#endif
PACK_STRUCT_BEGIN
#if (defined(__MWERKS__) || defined(__CWCC__))
#pragma options align= packed
#endif
struct ip_addr {
PACK_STRUCT_FIELD(u32_t addr);
} PACK_STRUCT_STRUCT;
@ -58,6 +61,9 @@ PACK_STRUCT_END
# include "arch/bpstruct.h"
#endif
PACK_STRUCT_BEGIN
#if (defined(__MWERKS__) || defined(__CWCC__))
#pragma options align= packed
#endif
struct ip_addr2 {
PACK_STRUCT_FIELD(u16_t addrw[2]);
} PACK_STRUCT_STRUCT;