if LWIP_TCP is 0 do not link in TCP code.putting ugly ifdefs in api and core :(.Also only udp_init if LWIP_UDP is on

This commit is contained in:
jani
2003-03-21 10:48:21 +00:00
parent 9cafc7a764
commit 859f06a91e
6 changed files with 76 additions and 44 deletions

View File

@@ -47,7 +47,7 @@
#include "lwip/memp.h"
#include "lwip/tcp.h"
#if LWIP_TCP
/* Incremented every coarse grained timer shot
(typically every 500 ms, determined by TCP_COARSE_TIMEOUT). */
@@ -1168,6 +1168,7 @@ tcp_pcbs_sane(void)
return 1;
}
#endif /* TCP_DEBUG */
#endif /* LWIP_TCP */
/*-----------------------------------------------------------------------------------*/

View File

@@ -55,7 +55,7 @@
#include "lwip/stats.h"
#include "arch/perf.h"
#if LWIP_TCP
/* These variables are global to all functions involved in the input
processing of TCP segments. They are set by the tcp_input()
function. */
@@ -1135,5 +1135,6 @@ tcp_parseopt(struct tcp_pcb *pcb)
}
}
}
#endif /* LWIP_TCP */
/*-----------------------------------------------------------------------------------*/

View File

@@ -53,7 +53,7 @@
#include "lwip/stats.h"
#if LWIP_TCP
#define MIN(x,y) (x) < (y)? (x): (y)
@@ -580,7 +580,7 @@ tcp_rexmit(struct tcp_pcb *pcb)
tcp_output(pcb);
}
#endif /* LWIP_TCP */

View File

@@ -58,7 +58,6 @@
/*static*/ struct udp_pcb *udp_pcbs = NULL;
static struct udp_pcb *pcb_cache = NULL;
#endif /* LWIP_UDP */
#if UDP_DEBUG
int udp_debug_print(struct udp_hdr *udphdr);
@@ -68,12 +67,9 @@ int udp_debug_print(struct udp_hdr *udphdr);
void
udp_init(void)
{
#if LWIP_UDP
udp_pcbs = pcb_cache = NULL;
#endif /* LWIP_UDP */
}
#if LWIP_UDP
/*-----------------------------------------------------------------------------------*/
/* udp_lookup:
*