rename STATS to LWIP_STATS and make it checked by #if not #ifdef.The rest of the _STATS defines should follow

This commit is contained in:
jani 2003-03-19 12:37:46 +00:00
parent 441e9b8431
commit 0846206bc0
4 changed files with 13 additions and 12 deletions

View File

@ -39,15 +39,13 @@
#include "lwip/mem.h"
#ifdef STATS
#if LWIP_STATS
struct stats_ lwip_stats;
#endif /* STATS */
/*-----------------------------------------------------------------------------------*/
void
stats_init(void)
{
#ifdef STATS
memset(&lwip_stats, 0, sizeof(struct stats_));
#endif /* STATS */
}
#endif /* LWIP_STATS */
/*-----------------------------------------------------------------------------------*/

View File

@ -87,9 +87,6 @@ PACK_STRUCT_END
# include "arch/epstruct.h"
#endif
/* Declare here to avoid including netif.h creating a circular dependency */
//struct netif;
/** start DHCP configuration */
err_t dhcp_start(struct netif *netif);
/** stop DHCP configuration */

View File

@ -297,9 +297,12 @@ a lot of data that needs to be copied, this should be set high. */
#endif
/* ---------- Statistics options ---------- */
#define STATS
#ifndef LWIP_STATS
#define LWIP_STATS 1
#endif
#if LWIP_STATS
#ifdef STATS
#define LINK_STATS
#define IP_STATS
#define ICMP_STATS
@ -309,7 +312,8 @@ a lot of data that needs to be copied, this should be set high. */
#define MEMP_STATS
#define PBUF_STATS
#define SYS_STATS
#endif /* STATS */
#endif /* LWIP_STATS */
/* Debugging options all default to off */

View File

@ -38,7 +38,7 @@
#include "lwip/mem.h"
#include "lwip/memp.h"
#ifdef STATS
#if LWIP_STATS
struct stats_proto {
u16_t xmit; /* Transmitted packets. */
@ -99,9 +99,11 @@ struct stats_ {
extern struct stats_ lwip_stats;
#endif /* STATS */
void stats_init(void);
#else
#define stats_init()
#endif /* LWIP_STATS */
#endif /* __LWIP_STATS_H__ */