From 221135d6bf256c85b4aeb08881d6262f6eaadff4 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 31 Mar 2000 23:30:21 +0000 Subject: Include "lib/string.h" instead of . It should give us bzero() and other non-portable functions on all systems. --- lib/ip.c | 2 +- lib/ipv4.c | 1 - lib/ipv6.c | 3 +-- lib/ipv6.h | 2 +- lib/md5.c | 2 +- lib/mempool.c | 2 +- lib/printf.c | 1 - lib/resource.c | 2 +- lib/slab.c | 2 +- lib/string.h | 1 + lib/unaligned.h | 2 +- 11 files changed, 9 insertions(+), 11 deletions(-) (limited to 'lib') 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 #include #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 #include #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 * * Can be freely distributed and used under the terms of the GNU GPL. - * */ #include -#include #include #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 -#include +#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 */ -#include /* 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 -#include #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 -#include /* 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 #include -#include #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 -#include #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 +#include 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 +#include "lib/string.h" static inline u16 get_u16(void *p) -- cgit v1.2.3