diff --git a/src/core/init.c b/src/core/init.c index 2c2a098b..6f15e1fe 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -75,6 +75,9 @@ #if (!LWIP_UDP && LWIP_IGMP) #error "If you want to use IGMP, you have to define LWIP_UDP=1 in your lwipopts.h" #endif +#if (LWIP_ARP && (ARP_TABLE_SIZE > 0x7f)) + #error "If you want to use ARP, ARP_TABLE_SIZE must fit in an s8_t, so, you have to reduce it in your lwipopts.h" +#endif #if (LWIP_ARP && ARP_QUEUEING && (MEMP_NUM_ARP_QUEUE<=0)) #error "If you want to use ARP Queueing, you have to define MEMP_NUM_ARP_QUEUE>=1 in your lwipopts.h" #endif @@ -87,6 +90,9 @@ #if (LWIP_TCP && (MEMP_NUM_TCP_PCB<=0)) #error "If you want to use TCP, you have to define MEMP_NUM_TCP_PCB>=1 in your lwipopts.h" #endif +#if (LWIP_TCP && (TCP_WND > 0xffff)) + #error "If you want to use TCP, TCP_WND must fit in an u16_t, so, you have to reduce it in your lwipopts.h" +#endif #if (LWIP_IGMP && (MEMP_NUM_IGMP_GROUP<=1)) #error "If you want to use IGMP, you have to define MEMP_NUM_IGMP_GROUP>1 in your lwipopts.h" #endif diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 69af533d..5ae63a26 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -587,12 +587,6 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */ } while(0) #endif /* LWIP_DEBUG */ -/* finally, check some defines */ -#if TCP_WND > 0xffff -#error TCP_WND must fit in an u16_t -#endif - - #ifdef __cplusplus } #endif diff --git a/src/include/netif/etharp.h b/src/include/netif/etharp.h index 6b763c4c..0080e2bd 100644 --- a/src/include/netif/etharp.h +++ b/src/include/netif/etharp.h @@ -159,11 +159,6 @@ err_t etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, #define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETHARP_HWADDR_LEN) == 0) -/* finally, check some defines */ -#if ARP_TABLE_SIZE > 0x7f -#error ARP_TABLE_SIZE must fit in an s8_t -#endif - extern const struct eth_addr ethbroadcast, ethzero; #ifdef __cplusplus