summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ip.c2
-rw-r--r--lib/ipv4.c1
-rw-r--r--lib/ipv6.c3
-rw-r--r--lib/ipv6.h2
-rw-r--r--lib/md5.c2
-rw-r--r--lib/mempool.c2
-rw-r--r--lib/printf.c1
-rw-r--r--lib/resource.c2
-rw-r--r--lib/slab.c2
-rw-r--r--lib/string.h1
-rw-r--r--lib/unaligned.h2
11 files changed, 9 insertions, 11 deletions
diff --git a/lib/ip.c b/lib/ip.c
index 06cc42cf..143f50e8 100644
--- a/lib/ip.c
+++ b/lib/ip.c
@@ -6,11 +6,11 @@
* Can be freely distributed and used under the terms of the GNU GPL.
*/
-#include <string.h>
#include <stdlib.h>
#include "nest/bird.h"
#include "lib/ip.h"
+#include "lib/string.h"
char *
ip_scope_text(unsigned scope)
diff --git a/lib/ipv4.c b/lib/ipv4.c
index bf5474a0..db3b54aa 100644
--- a/lib/ipv4.c
+++ b/lib/ipv4.c
@@ -6,7 +6,6 @@
* Can be freely distributed and used under the terms of the GNU GPL.
*/
-#include <string.h>
#include <stdlib.h>
#include "nest/bird.h"
diff --git a/lib/ipv6.c b/lib/ipv6.c
index 3c01a4f4..9f49be3a 100644
--- a/lib/ipv6.c
+++ b/lib/ipv6.c
@@ -4,17 +4,16 @@
* (c) 1999 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
- *
*/
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
#include "nest/bird.h"
#include "lib/ip.h"
#include "lib/bitops.h"
#include "lib/endian.h"
+#include "lib/string.h"
/*
* See RFC 2373 for explanation of IPv6 addressing issues.
diff --git a/lib/ipv6.h b/lib/ipv6.h
index 6f157cd6..cf7a9bbe 100644
--- a/lib/ipv6.h
+++ b/lib/ipv6.h
@@ -10,7 +10,7 @@
#define _BIRD_IPV6_H_
#include <netinet/in.h>
-#include <string.h>
+#include "lib/string.h"
typedef struct ipv6_addr {
u32 addr[4];
diff --git a/lib/md5.c b/lib/md5.c
index 9fec594c..ad284f07 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -19,8 +19,8 @@
* Adapted for BIRD by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/
-#include <string.h> /* for memcpy() */
#include "nest/bird.h"
+#include "lib/string.h"
#include "md5.h"
#ifdef CPU_LITTLE_ENDIAN
diff --git a/lib/mempool.c b/lib/mempool.c
index faf0334a..c9c1dd63 100644
--- a/lib/mempool.c
+++ b/lib/mempool.c
@@ -7,10 +7,10 @@
*/
#include <stdlib.h>
-#include <string.h>
#include "nest/bird.h"
#include "lib/resource.h"
+#include "lib/string.h"
struct lp_chunk {
struct lp_chunk *next;
diff --git a/lib/printf.c b/lib/printf.c
index a8259ab5..64fcf728 100644
--- a/lib/printf.c
+++ b/lib/printf.c
@@ -11,7 +11,6 @@
#include "string.h"
#include <errno.h>
-#include <string.h>
/* we use this so that we can do without the ctype library */
#define is_digit(c) ((c) >= '0' && (c) <= '9')
diff --git a/lib/resource.c b/lib/resource.c
index ceaa0add..98bfe4e1 100644
--- a/lib/resource.c
+++ b/lib/resource.c
@@ -8,10 +8,10 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "nest/bird.h"
#include "lib/resource.h"
+#include "lib/string.h"
struct pool {
resource r;
diff --git a/lib/slab.c b/lib/slab.c
index 98c3ec5c..e2e741c8 100644
--- a/lib/slab.c
+++ b/lib/slab.c
@@ -9,10 +9,10 @@
*/
#include <stdlib.h>
-#include <string.h>
#include "nest/bird.h"
#include "lib/resource.h"
+#include "lib/string.h"
#undef FAKE_SLAB /* Turn on if you want to debug memory allocations */
diff --git a/lib/string.h b/lib/string.h
index 03affacc..14eaa360 100644
--- a/lib/string.h
+++ b/lib/string.h
@@ -10,6 +10,7 @@
#define _BIRD_STRING_H_
#include <stdarg.h>
+#include <string.h>
int bsprintf(char *str, const char *fmt, ...);
int bvsprintf(char *str, const char *fmt, va_list args);
diff --git a/lib/unaligned.h b/lib/unaligned.h
index fa17a837..af655204 100644
--- a/lib/unaligned.h
+++ b/lib/unaligned.h
@@ -17,7 +17,7 @@
* if possible.
*/
-#include <string.h>
+#include "lib/string.h"
static inline u16
get_u16(void *p)