summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-01 01:30:21 +0200
committerMartin Mares <mj@ucw.cz>2000-04-01 01:30:21 +0200
commit221135d6bf256c85b4aeb08881d6262f6eaadff4 (patch)
treeb2e09621cefeb03e184e80ea0373c3f7bb26c913 /lib
parentc00d31befab5a7e932231f7a8050547c72c94631 (diff)
downloadbird-221135d6bf256c85b4aeb08881d6262f6eaadff4.tar
bird-221135d6bf256c85b4aeb08881d6262f6eaadff4.zip
Include "lib/string.h" instead of <string.h>. It should give us bzero()
and other non-portable functions on all systems.
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 06cc42c..143f50e 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 bf5474a..db3b54a 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 3c01a4f..9f49be3 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 6f157cd..cf7a9bb 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 9fec594..ad284f0 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 faf0334..c9c1dd6 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 a8259ab..64fcf72 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 ceaa0ad..98bfe4e 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 98c3ec5..e2e741c 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 03affac..14eaa36 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 fa17a83..af65520 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)