lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] memp.c with NO_SYS


From: robert
Subject: [lwip-users] memp.c with NO_SYS
Date: Thu, 29 May 2008 09:44:17 -0400 (EDT)

I have been away from this code for too long...:)

When compiling memp.c with the NO_SYS set to 1

memp.c fails to compile due to tcpip.h not providing the definition of struxt tcpip_msg.

Adding lines to condition the use of the struct lets the compile proceed, but I am not sure if this is the right fix. See below the two code snippets. the #if !NO_SYS and the corresponding #endif are the added lines.


static const u16_t memp_sizes[MEMP_MAX] = {
  sizeof(struct pbuf),
  sizeof(struct raw_pcb),
  sizeof(struct udp_pcb),
  sizeof(struct tcp_pcb),
  sizeof(struct tcp_pcb_listen),
  sizeof(struct tcp_seg),
  sizeof(struct netbuf),
  sizeof(struct netconn),
  sizeof(struct api_msg),
#if !NO_SYS /* don't build if not configured for use in lwipopts.h */
  sizeof(struct tcpip_msg),
#endif
  sizeof(struct sys_timeout)
};



static u8_t memp_memory[(MEMP_NUM_PBUF *
       MEM_ALIGN_SIZE(sizeof(struct pbuf) +
          sizeof(struct memp)) +
      MEMP_NUM_RAW_PCB *
       MEM_ALIGN_SIZE(sizeof(struct raw_pcb) +
          sizeof(struct memp)) +
      MEMP_NUM_UDP_PCB *
       MEM_ALIGN_SIZE(sizeof(struct udp_pcb) +
          sizeof(struct memp)) +
      MEMP_NUM_TCP_PCB *
       MEM_ALIGN_SIZE(sizeof(struct tcp_pcb) +
          sizeof(struct memp)) +
      MEMP_NUM_TCP_PCB_LISTEN *
       MEM_ALIGN_SIZE(sizeof(struct tcp_pcb_listen) +
          sizeof(struct memp)) +
      MEMP_NUM_TCP_SEG *
       MEM_ALIGN_SIZE(sizeof(struct tcp_seg) +
          sizeof(struct memp)) +
      MEMP_NUM_NETBUF *
       MEM_ALIGN_SIZE(sizeof(struct netbuf) +
          sizeof(struct memp)) +
      MEMP_NUM_NETCONN *
       MEM_ALIGN_SIZE(sizeof(struct netconn) +
          sizeof(struct memp)) +
      MEMP_NUM_API_MSG *
       MEM_ALIGN_SIZE(sizeof(struct api_msg) +
          sizeof(struct memp)) +
#if !NO_SYS /* don't build if not configured for use in lwipopts.h */
      MEMP_NUM_TCPIP_MSG *
       MEM_ALIGN_SIZE(sizeof(struct tcpip_msg) +
          sizeof(struct memp)) +
#endif
      MEMP_NUM_SYS_TIMEOUT *
       MEM_ALIGN_SIZE(sizeof(struct sys_timeout) +
          sizeof(struct memp)))];




--
Best Regards,
Robert

Fighting SPAM with Active Spam Filter, see:
http://a-s-k.sourceforge.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]