]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Include "lib/string.h" instead of <string.h>. It should give us bzero()
authorMartin Mares <mj@ucw.cz>
Fri, 31 Mar 2000 23:30:21 +0000 (23:30 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 31 Mar 2000 23:30:21 +0000 (23:30 +0000)
and other non-portable functions on all systems.

34 files changed:
client/client.c
client/commands.c
client/util.c
conf/cf-lex.l
conf/confbase.Y
filter/config.Y
lib/ip.c
lib/ipv4.c
lib/ipv6.c
lib/ipv6.h
lib/md5.c
lib/mempool.c
lib/printf.c
lib/resource.c
lib/slab.c
lib/string.h
lib/unaligned.h
nest/cli.c
nest/proto.c
nest/rt-attr.c
nest/rt-dev.c
nest/rt-fib.c
nest/rt-table.c
proto/ospf/ospf.h
proto/ospf/topology.c
proto/rip/auth.c
proto/rip/rip.c
proto/static/static.c
sysdep/linux/krt-scan.c
sysdep/linux/netlink/netlink.c
sysdep/unix/io.c
sysdep/unix/krt-iface.c
sysdep/unix/krt-set.c
sysdep/unix/main.c

index 568ea2f6332b35b6c7463f707d303f4471d3e9b4..5381577f183829ce737c1e5722799f8972bdadb7 100644 (file)
@@ -7,7 +7,6 @@
  */
 
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -21,6 +20,7 @@
 
 #include "nest/bird.h"
 #include "lib/resource.h"
+#include "lib/string.h"
 #include "client/client.h"
 
 static char *opt_list = "s:v";
index fdcb6d27c71aac1238d1daa643e897ca78070d53..aa00be08d926a0945b8269920e673d3d6fe90e7d 100644 (file)
@@ -7,11 +7,11 @@
  */
 
 #include <stdio.h>
-#include <string.h>
 #include <ctype.h>
 
 #include "nest/bird.h"
 #include "lib/resource.h"
+#include "lib/string.h"
 #include "client/client.h"
 
 struct cmd_info {
index 9f1a16b6473b025f2fddb49f4f74ae6b1386dd15..451bb60ce42dfbab2856ffd509c1941d8833956d 100644 (file)
@@ -7,7 +7,6 @@
  */
 
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
 
index 557d8374135c5308ec3d679b48069b9e5eb24280..483bcaf324f67cfe073457c2884ba6291b24b234 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <errno.h>
 #include <stdlib.h>
-#include <string.h>
 #include <stdarg.h>
 
 #include "nest/bird.h"
index 0b9f3d309c3be4d546a6bbc63d09a820ac937f0f..656fc8900552d6b9e7ac278d67cdd4b5e010c700 100644 (file)
@@ -13,6 +13,7 @@ CF_HDR
 #include "lib/resource.h"
 #include "lib/socket.h"
 #include "lib/timer.h"
+#include "lib/string.h"
 #include "nest/protocol.h"
 #include "nest/iface.h"
 #include "nest/route.h"
index 413e88cb55a9fc51806087f0b46618536bd460ac..39085792a977543fa24987b53b3648ee11b2b320 100644 (file)
@@ -71,15 +71,6 @@ atributy, je budou moci pridat do tmp_attrs, aniz by sahly na rta.
 
 CF_HDR
 
-#include "nest/bird.h"
-#include "lib/resource.h"
-#include "lib/socket.h"
-#include "lib/timer.h"
-#include "nest/protocol.h"
-#include "nest/iface.h"
-#include "nest/route.h"
-#include <string.h>
-
 #define P(a,b) ((a<<8) | b)
 
 CF_DECLS
index 06cc42cfcdf03ff4bf9b2ef3b7fdc810238aa8a8..143f50e81fb42a80f3adcf7d51484ad586f3f452 100644 (file)
--- 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)
index bf5474a059002e057e1b8b7b646285509fd1a413..db3b54aa91643b6147b0189afde854d8308fa2cf 100644 (file)
@@ -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"
index 3c01a4f4574a7a74ca238a0d3cc1f3f0247f4aca..9f49be3aa9356bc8db20569667fbcc64710662cd 100644 (file)
@@ -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.
index 6f157cd6af587378f67fb81d93ac15939914fd11..cf7a9bbeacba3591d5dcb57d2da81a2134b6bf7d 100644 (file)
@@ -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];
index 9fec594c06af31c213a3a5a62d9df46f6be14139..ad284f07fdd589d733f9b5e101547bf543c8c4ca 100644 (file)
--- 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
index faf0334abc357a3f17f6165f943d910a6b9dc63e..c9c1dd63c34f9e86fc5faef36277a5a556effe33 100644 (file)
@@ -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;
index a8259ab536691ac99ab2c5d26b4aacb47d6895be..64fcf728488d8b235d32ded796632b41fb0bd05c 100644 (file)
@@ -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')
index ceaa0add870c39dbf72549e8d6ef8f6d9490d4e0..98bfe4e15b49a9fe23f2f07682717adf7c70a599 100644 (file)
@@ -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;
index 98c3ec5c2e799c1c45f6b27296f4bae3a7100641..e2e741c8679bf928562b4fbda1cf8113ee494ad4 100644 (file)
@@ -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 */
 
index 03affacc538ff7319540f826cdb716ed6aa6f6c8..14eaa360f8d98e9e7063624922c65df7ceded810 100644 (file)
@@ -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);
index fa17a83784c95e0ebe43746edfbb753c71a8507d..af6552046830df3316d0724c4efba35519a9456e 100644 (file)
@@ -17,7 +17,7 @@
  *  if possible.
  */
 
-#include <string.h>
+#include "lib/string.h"
 
 static inline u16
 get_u16(void *p)
index 661178c41d7f39675326fac9f936a8c3c5884edc..f7432a5526682ce500679717d8880959d80ad2c0 100644 (file)
@@ -6,8 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <string.h>
-
 #include "nest/bird.h"
 #include "nest/cli.h"
 #include "conf/conf.h"
index 95988ce51481fe10b4c69c58d36dba8d56d8b75b..c6a3d7d46a1d05078e2368e7240fd67cc771c861 100644 (file)
@@ -8,8 +8,6 @@
 
 #undef LOCAL_DEBUG
 
-#include <string.h>
-
 #include "nest/bird.h"
 #include "nest/protocol.h"
 #include "lib/resource.h"
index 8dc2e7eb175b596d19fdd5c010704b532392dfdd..63f596ef73f04ab77724e4c4f9818498c94dc50f 100644 (file)
@@ -6,7 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <string.h>
 #include <alloca.h>
 
 #include "nest/bird.h"
@@ -15,6 +14,7 @@
 #include "nest/iface.h"
 #include "nest/cli.h"
 #include "lib/resource.h"
+#include "lib/string.h"
 
 static slab *rta_slab;
 static pool *rta_pool;
index d42ed157ca0465f13560ab99a49139081489e1f4..1ad5600909872fee045292318ec59d4be8c07c6a 100644 (file)
@@ -8,8 +8,6 @@
 
 #undef LOCAL_DEBUG
 
-#include <string.h>
-
 #include "nest/bird.h"
 #include "nest/iface.h"
 #include "nest/protocol.h"
@@ -17,6 +15,7 @@
 #include "nest/rt-dev.h"
 #include "conf/conf.h"
 #include "lib/resource.h"
+#include "lib/string.h"
 
 static void
 dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
index 4d898763d58e6528d97aa4d0f8a0f514822d7656..6a8f80098b56a77c1021d1cc0df105193fbef0fd 100644 (file)
@@ -8,10 +8,9 @@
 
 #undef LOCAL_DEBUG
 
-#include <string.h>
-
 #include "nest/bird.h"
 #include "nest/route.h"
+#include "lib/string.h"
 
 #define HASH_DEF_ORDER 10
 #define HASH_HI_MARK *4
index 68ef52a943c3221bcfc5cd70e2088c3e19a45636..d04d06e28af9b299149e3bb30f6f5ff557a925fe 100644 (file)
@@ -6,8 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <string.h>
-
 #undef LOCAL_DEBUG
 
 #include "nest/bird.h"
@@ -20,6 +18,7 @@
 #include "lib/string.h"
 #include "conf/conf.h"
 #include "filter/filter.h"
+#include "lib/string.h"
 
 static slab *rte_slab;
 static linpool *rte_update_pool;
index c07d3347431b0e2a4b836eaa8a672744be393497..c2db08d1eea51972d0b4f666235a129489b1adf9 100644 (file)
@@ -13,8 +13,6 @@
 
 #define SIPH 64                /* FIXME Size Of IP header */
 
-#include <string.h>
-
 #include "nest/bird.h"
 
 #include "lib/checksum.h"
index 12eff1e85952c0277a5890ad27fab44f8747125c..f32476df481d61beaaa6f1861171fd8d4a5b6905 100644 (file)
@@ -9,9 +9,8 @@
 
 #define LOCAL_DEBUG
 
-#include <string.h>
-
 #include "nest/bird.h"
+#include "lib/string.h"
 
 #include "ospf.h"
 
index a14cb95a1605ee2bec1dc5683aa387f33108d257..b18c2b4f98753b5e364f63a6b2a15bfe7d557df8 100644 (file)
@@ -9,7 +9,6 @@
 
 #define LOCAL_DEBUG
 
-#include <string.h>
 #include <stdlib.h>
 
 #include "nest/bird.h"
@@ -21,6 +20,7 @@
 #include "lib/lists.h"
 #include "lib/timer.h"
 #include "lib/md5.h"
+#include "lib/string.h"
 
 #include "rip.h"
 
index 09bf5a2ea4a5170587795c2741e6ac1624a75cd1..4634ae1fae9498751c998d905d132ecf02f07c11 100644 (file)
@@ -27,7 +27,6 @@
 
 #define LOCAL_DEBUG
 
-#include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -39,6 +38,7 @@
 #include "lib/resource.h"
 #include "lib/lists.h"
 #include "lib/timer.h"
+#include "lib/string.h"
 
 #include "rip.h"
 
index 1aee2c7be19143b60660b1edff2beb1c1e9492fd..7df62ed0c4591a02376301d5a237b0f3959f1adc 100644 (file)
@@ -8,8 +8,6 @@
 
 #undef LOCAL_DEBUG
 
-#include <string.h>
-
 #include "nest/bird.h"
 #include "nest/iface.h"
 #include "nest/protocol.h"
index c7a5a8601b67f329f580d6bf322583a1665b6790..42f92877c6db4c06c27504f9051cf0dda1223d57 100644 (file)
@@ -6,7 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <string.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <fcntl.h>
@@ -22,6 +21,7 @@
 #include "lib/timer.h"
 #include "lib/unix.h"
 #include "lib/krt.h"
+#include "lib/string.h"
 
 static int krt_scan_fd = -1;
 
index 9168e9f9c10b4fc90660e15a497208fd29e005fd..86f13f0b623e78259ac22bfe58eca6047911efa0 100644 (file)
@@ -6,7 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <string.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <net/if.h>
@@ -24,6 +23,7 @@
 #include "lib/unix.h"
 #include "lib/krt.h"
 #include "lib/socket.h"
+#include "lib/string.h"
 #include "conf/conf.h"
 
 #include <asm/types.h>
index 0925609b881d87164072bfebe356cd7a298c091c..1ee1c073861ef259cacc641e2e2cae13a995e425 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
index da3df2d22c509f8267fb514e3f9e6e1511e00b3e..bd4a40a7532e40830a5589ff63aec96c9e968063 100644 (file)
@@ -6,7 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -22,6 +21,7 @@
 #include "nest/protocol.h"
 #include "lib/timer.h"
 #include "lib/krt.h"
+#include "lib/string.h"
 
 #include "unix.h"
 
index 72424506e9f5fcdff6125e3f577c97bde965ab46..bd5644864468b645bb0250169ce0213645b850e1 100644 (file)
@@ -6,7 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -21,6 +20,7 @@
 #include "nest/protocol.h"
 #include "lib/unix.h"
 #include "lib/krt.h"
+#include "lib/string.h"
 
 int
 krt_capable(rte *e)
index dcd921f0490e3e3b909beaba6ae826c58c6d5dd2..121ec9dcc0deb93877813fc01cdf7915a7a41e94 100644 (file)
@@ -9,7 +9,6 @@
 #define LOCAL_DEBUG
 
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -20,6 +19,7 @@
 #include "lib/resource.h"
 #include "lib/socket.h"
 #include "lib/event.h"
+#include "lib/string.h"
 #include "nest/route.h"
 #include "nest/protocol.h"
 #include "nest/iface.h"