[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #37552] IAR EWARM won't compile ppp-new due to keyword
From: |
Mark Lakata |
Subject: |
[lwip-devel] [bug #37552] IAR EWARM won't compile ppp-new due to keyword clash |
Date: |
Thu, 11 Oct 2012 22:42:48 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 |
URL:
<http://savannah.nongnu.org/bugs/?37552>
Summary: IAR EWARM won't compile ppp-new due to keyword clash
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: lakata
Submitted on: Thu 11 Oct 2012 10:42:48 PM GMT
Category: Contrib
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: CVS Head
_______________________________________________________
Details:
The word "class" is reserved in IAR's EWARM compiler since it looks like c++.
This causes a failure to compile in the lcp code.
Arguably it is a bug in the compiler, but it is easy to work around with a
name change in the lcp.[ch] code. I fixed it by changing "class" to "class_".
diff --git a/src/include/netif/ppp/lcp.h b/src/include/netif/ppp/lcp.h
index ec5e9a6..182af13 100644
--- a/src/include/netif/ppp/lcp.h
+++ b/src/include/netif/ppp/lcp.h
@@ -97,7 +97,7 @@
/* An endpoint discriminator, used with multilink. */
#define MAX_ENDP_LEN 20 /* maximum length of discriminator value */
struct epdisc {
- unsigned char class;
+ unsigned char class_;
unsigned char length;
unsigned char value[MAX_ENDP_LEN];
};
diff --git a/src/netif/ppp/lcp.c b/src/netif/ppp/lcp.c
index cb44e68..2d01831 100644
--- a/src/netif/ppp/lcp.c
+++ b/src/netif/ppp/lcp.c
@@ -866,7 +866,7 @@ static void lcp_addci(fsm *f, u_char *ucp, int *lenp) {
ADDCISHORT(CI_MRRU, go->neg_mrru, go->mrru);
#endif
ADDCIVOID(CI_SSNHF, go->neg_ssnhf);
- ADDCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class,
+ ADDCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_,
go->endpoint.value, go->endpoint.length);
if (ucp - start_ucp != *lenp) {
@@ -1040,7 +1040,7 @@ static int lcp_ackci(fsm *f, u_char *p, int len) {
ACKCISHORT(CI_MRRU, go->neg_mrru, go->mrru);
#endif /* HAVE_MULTILINK */
ACKCIVOID(CI_SSNHF, go->neg_ssnhf);
- ACKCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class,
+ ACKCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_,
go->endpoint.value, go->endpoint.length);
/*
@@ -1722,7 +1722,7 @@ static int lcp_rejci(fsm *f, u_char *p, int len) {
REJCISHORT(CI_MRRU, neg_mrru, go->mrru);
#endif /* HAVE_MULTILINK */
REJCIVOID(CI_SSNHF, neg_ssnhf);
- REJCIENDP(CI_EPDISC, neg_endpoint, go->endpoint.class,
+ REJCIENDP(CI_EPDISC, neg_endpoint, go->endpoint.class_,
go->endpoint.value, go->endpoint.length);
/*
@@ -2154,7 +2154,7 @@ static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int
reject_if_disagree) {
GETCHAR(cichar, p);
cilen -= CILEN_CHAR;
ho->neg_endpoint = 1;
- ho->endpoint.class = cichar;
+ ho->endpoint.class_ = cichar;
ho->endpoint.length = cilen;
MEMCPY(ho->endpoint.value, p, cilen);
INCPTR(cilen, p);
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?37552>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #37552] IAR EWARM won't compile ppp-new due to keyword clash,
Mark Lakata <=
Re: [lwip-devel] [bug #37552] IAR EWARM won't compile ppp-new due to keyword clash, Mason, 2012/10/12