mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
PPP, IAR EWARM won't compile ppp-new due to keyword clash
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_".
This commit is contained in:
parent
e81f092520
commit
0eb83f6ee6
@ -97,7 +97,7 @@
|
|||||||
/* An endpoint discriminator, used with multilink. */
|
/* An endpoint discriminator, used with multilink. */
|
||||||
#define MAX_ENDP_LEN 20 /* maximum length of discriminator value */
|
#define MAX_ENDP_LEN 20 /* maximum length of discriminator value */
|
||||||
struct epdisc {
|
struct epdisc {
|
||||||
unsigned char class;
|
unsigned char class_; /* -- The word "class" is reserved in C++. */
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
unsigned char value[MAX_ENDP_LEN];
|
unsigned char value[MAX_ENDP_LEN];
|
||||||
};
|
};
|
||||||
|
@ -866,7 +866,7 @@ static void lcp_addci(fsm *f, u_char *ucp, int *lenp) {
|
|||||||
ADDCISHORT(CI_MRRU, go->neg_mrru, go->mrru);
|
ADDCISHORT(CI_MRRU, go->neg_mrru, go->mrru);
|
||||||
#endif
|
#endif
|
||||||
ADDCIVOID(CI_SSNHF, go->neg_ssnhf);
|
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);
|
go->endpoint.value, go->endpoint.length);
|
||||||
|
|
||||||
if (ucp - start_ucp != *lenp) {
|
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);
|
ACKCISHORT(CI_MRRU, go->neg_mrru, go->mrru);
|
||||||
#endif /* HAVE_MULTILINK */
|
#endif /* HAVE_MULTILINK */
|
||||||
ACKCIVOID(CI_SSNHF, go->neg_ssnhf);
|
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);
|
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);
|
REJCISHORT(CI_MRRU, neg_mrru, go->mrru);
|
||||||
#endif /* HAVE_MULTILINK */
|
#endif /* HAVE_MULTILINK */
|
||||||
REJCIVOID(CI_SSNHF, neg_ssnhf);
|
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);
|
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);
|
GETCHAR(cichar, p);
|
||||||
cilen -= CILEN_CHAR;
|
cilen -= CILEN_CHAR;
|
||||||
ho->neg_endpoint = 1;
|
ho->neg_endpoint = 1;
|
||||||
ho->endpoint.class = cichar;
|
ho->endpoint.class_ = cichar;
|
||||||
ho->endpoint.length = cilen;
|
ho->endpoint.length = cilen;
|
||||||
MEMCPY(ho->endpoint.value, p, cilen);
|
MEMCPY(ho->endpoint.value, p, cilen);
|
||||||
INCPTR(cilen, p);
|
INCPTR(cilen, p);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user