Add strndup()

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3649 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-05-29 16:07:13 +00:00
parent ae8cfb1bf1
commit a201aecd89
6 changed files with 101 additions and 6 deletions
+2 -2
View File
@@ -535,8 +535,8 @@ extern void uip_send(struct uip_driver_s *dev, const void *buf, int len);
(((in_addr_t)(addr1) & (in_addr_t)(mask)) == \
((in_addr_t)(addr2) & (in_addr_t)(mask)))
#else
extern bool uip_ipaddr_maskcmp(uip_addr_t addr1, uip_addr_t addr2,
uip_addr_t mask);
extern bool uip_ipaddr_maskcmp(uip_ipaddr_t addr1, uip_ipaddr_t addr2,
uip_ipaddr_t mask);
#endif
/* Mask out the network part of an IP address.
+1
View File
@@ -62,6 +62,7 @@ extern "C" {
EXTERN char *strchr(const char *s, int c);
EXTERN FAR char *strdup(const char *s);
EXTERN FAR char *strndup(FAR const char *s, size_t size);
EXTERN const char *strerror(int);
EXTERN size_t strlen(const char *);
EXTERN size_t strnlen(const char *, size_t);