changeset 2375:7dc5d6a66645

* include/lwip/netif.h, include/lwip/inet.h: Added externC macro to public fucntions to make them C++ compliant.
author asl
date Fri, 23 Mar 2007 18:48:12 +0000
parents 9a4c4f1b0178
children 244e21c63018
files packages/net/lwip_tcpip/current/ChangeLog packages/net/lwip_tcpip/current/include/lwip/inet.h packages/net/lwip_tcpip/current/include/lwip/netif.h
diffstat 3 files changed, 24 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/packages/net/lwip_tcpip/current/ChangeLog
+++ b/packages/net/lwip_tcpip/current/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-22  John Eigelaar  <jeigelaar@mweb.co.za>
+                                                     
+	* include/lwip/netif.h, include/lwip/inet.h: Added externC macro
+	to public fucntions to make them C++ compliant.
+
 2006-05-09  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* src/ecos/init.c (arp_timer): Only compile this function when
--- a/packages/net/lwip_tcpip/current/include/lwip/inet.h
+++ b/packages/net/lwip_tcpip/current/include/lwip/inet.h
@@ -47,9 +47,9 @@ u16_t inet_chksum_pseudo(struct pbuf *p,
        struct ip_addr *src, struct ip_addr *dest,
        u8_t proto, u16_t proto_len);
 
-u32_t inet_addr(const char *cp);
-s8_t inet_aton(const char *cp, struct in_addr *addr);
-char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */
+externC u32_t inet_addr(const char *cp);
+externC s8_t inet_aton(const char *cp, struct in_addr *addr);
+externC char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */
 
 #ifdef htons
 #undef htons
@@ -77,10 +77,10 @@ char *inet_ntoa(struct in_addr addr); /*
 #define htonl lwip_htonl
 #define ntohl lwip_ntohl
 #endif
-u16_t htons(u16_t x);
-u16_t ntohs(u16_t x);
-u32_t htonl(u32_t x);
-u32_t ntohl(u32_t x);
+externC u16_t htons(u16_t x);
+externC u16_t ntohs(u16_t x);
+externC u32_t htonl(u32_t x);
+externC u32_t ntohl(u32_t x);
 #endif
 
 #endif /* __LWIP_INET_H__ */
--- a/packages/net/lwip_tcpip/current/include/lwip/netif.h
+++ b/packages/net/lwip_tcpip/current/include/lwip/netif.h
@@ -119,32 +119,32 @@ extern struct netif *netif_list;
 extern struct netif *netif_default;
 
 /* netif_init() must be called first. */
-void netif_init(void);
+externC void netif_init(void);
 
-struct netif *netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask,
+externC struct netif *netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask,
       struct ip_addr *gw,
       void *state,
       err_t (* init)(struct netif *netif),
       err_t (* input)(struct pbuf *p, struct netif *netif));
 
-void
+externC void
 netif_set_addr(struct netif *netif,struct ip_addr *ipaddr, struct ip_addr *netmask,
     struct ip_addr *gw);
-void netif_remove(struct netif * netif);
+externC void netif_remove(struct netif * netif);
 
 /* Returns a network interface given its name. The name is of the form
    "et0", where the first two letters are the "name" field in the
    netif structure, and the digit is in the num field in the same
    structure. */
-struct netif *netif_find(char *name);
+externC struct netif *netif_find(char *name);
 
-void netif_set_default(struct netif *netif);
+externC void netif_set_default(struct netif *netif);
 
-void netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr);
-void netif_set_netmask(struct netif *netif, struct ip_addr *netmast);
-void netif_set_gw(struct netif *netif, struct ip_addr *gw);
-void netif_set_up(struct netif *netif);
-void netif_set_down(struct netif *netif);
-u8_t netif_is_up(struct netif *netif);
+externC void netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr);
+externC void netif_set_netmask(struct netif *netif, struct ip_addr *netmast);
+externC void netif_set_gw(struct netif *netif, struct ip_addr *gw);
+externC void netif_set_up(struct netif *netif);
+externC void netif_set_down(struct netif *netif);
+externC u8_t netif_is_up(struct netif *netif);
 
 #endif /* __LWIP_NETIF_H__ */