From: richardbarry Date: Mon, 22 Sep 2008 13:16:59 +0000 (+0000) Subject: Added extra compiler specific structure packing options. X-Git-Tag: V5.1.2~220 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df5f2e58f445721f0eb478e2ab71de2323429079;p=freertos Added extra compiler specific structure packing options. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@476 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/icmp.h b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/icmp.h index 6b34c88f6..39835cbb0 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/icmp.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/icmp.h @@ -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); diff --git a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/igmp.h b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/igmp.h index 1b4c457c2..f942209ab 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/igmp.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/igmp.h @@ -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); diff --git a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip.h b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip.h index fa2f149c8..946837d20 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip.h @@ -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); diff --git a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip_addr.h b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip_addr.h index 6b53968d0..acc51e38b 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip_addr.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/ipv4/lwip/ip_addr.h @@ -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; diff --git a/Demo/Common/ethernet/lwIP_130/src/include/ipv6/lwip/ip_addr.h b/Demo/Common/ethernet/lwIP_130/src/include/ipv6/lwip/ip_addr.h index 85971c94c..6aeba20ae 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/ipv6/lwip/ip_addr.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/ipv6/lwip/ip_addr.h @@ -44,6 +44,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[4]); } PACK_STRUCT_STRUCT; @@ -60,6 +63,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; diff --git a/Demo/Common/ethernet/lwIP_130/src/include/lwip/dhcp.h b/Demo/Common/ethernet/lwIP_130/src/include/lwip/dhcp.h index 3795d6e75..164469053 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/lwip/dhcp.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/lwip/dhcp.h @@ -76,6 +76,9 @@ struct dhcp # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif /** minimum set of fields of any DHCP message */ struct dhcp_msg { diff --git a/Demo/Common/ethernet/lwIP_130/src/include/lwip/tcp.h b/Demo/Common/ethernet/lwIP_130/src/include/lwip/tcp.h index efef3df39..9912be084 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/lwip/tcp.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/lwip/tcp.h @@ -210,6 +210,9 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb); # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif struct tcp_hdr { PACK_STRUCT_FIELD(u16_t src); PACK_STRUCT_FIELD(u16_t dest); diff --git a/Demo/Common/ethernet/lwIP_130/src/include/lwip/udp.h b/Demo/Common/ethernet/lwIP_130/src/include/lwip/udp.h index ed03a0d51..7cdcdfee7 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/lwip/udp.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/lwip/udp.h @@ -52,6 +52,9 @@ extern "C" { # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif struct udp_hdr { PACK_STRUCT_FIELD(u16_t src); PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */ diff --git a/Demo/Common/ethernet/lwIP_130/src/include/netif/etharp.h b/Demo/Common/ethernet/lwIP_130/src/include/netif/etharp.h index 021cffaec..3cea6ca31 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/netif/etharp.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/netif/etharp.h @@ -60,6 +60,9 @@ extern "C" { # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif struct eth_addr { PACK_STRUCT_FIELD(u8_t addr[ETHARP_HWADDR_LEN]); } PACK_STRUCT_STRUCT; @@ -72,6 +75,9 @@ PACK_STRUCT_END # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif struct eth_hdr { #if ETH_PAD_SIZE PACK_STRUCT_FIELD(u8_t padding[ETH_PAD_SIZE]); @@ -89,6 +95,9 @@ PACK_STRUCT_END # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif /** the ARP message */ struct etharp_hdr { PACK_STRUCT_FIELD(struct eth_hdr ethhdr); @@ -110,6 +119,9 @@ PACK_STRUCT_END # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif struct ethip_hdr { PACK_STRUCT_FIELD(struct eth_hdr eth); PACK_STRUCT_FIELD(struct ip_hdr ip); diff --git a/Demo/Common/ethernet/lwIP_130/src/include/netif/ppp_oe.h b/Demo/Common/ethernet/lwIP_130/src/include/netif/ppp_oe.h index 8db61e5e7..aa9538201 100644 --- a/Demo/Common/ethernet/lwIP_130/src/include/netif/ppp_oe.h +++ b/Demo/Common/ethernet/lwIP_130/src/include/netif/ppp_oe.h @@ -78,6 +78,9 @@ # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif struct pppoehdr { PACK_STRUCT_FIELD(u8_t vertype); PACK_STRUCT_FIELD(u8_t code); @@ -93,6 +96,9 @@ PACK_STRUCT_END # include "arch/bpstruct.h" #endif PACK_STRUCT_BEGIN +#if (defined(__MWERKS__) || defined(__CWCC__)) + #pragma options align= packed +#endif struct pppoetag { PACK_STRUCT_FIELD(u16_t tag); PACK_STRUCT_FIELD(u16_t len);