Include "lib/string.h" instead of <string.h>. It should give us bzero()
and other non-portable functions on all systems.
This commit is contained in:
parent
c00d31befa
commit
221135d6bf
34 changed files with 24 additions and 49 deletions
|
@ -7,7 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -21,6 +20,7 @@
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
#include "lib/string.h"
|
||||||
#include "client/client.h"
|
#include "client/client.h"
|
||||||
|
|
||||||
static char *opt_list = "s:v";
|
static char *opt_list = "s:v";
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
#include "lib/string.h"
|
||||||
#include "client/client.h"
|
#include "client/client.h"
|
||||||
|
|
||||||
struct cmd_info {
|
struct cmd_info {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
|
|
@ -13,6 +13,7 @@ CF_HDR
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
#include "lib/socket.h"
|
#include "lib/socket.h"
|
||||||
#include "lib/timer.h"
|
#include "lib/timer.h"
|
||||||
|
#include "lib/string.h"
|
||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
#include "nest/iface.h"
|
#include "nest/iface.h"
|
||||||
#include "nest/route.h"
|
#include "nest/route.h"
|
||||||
|
|
|
@ -71,15 +71,6 @@ atributy, je budou moci pridat do tmp_attrs, aniz by sahly na rta.
|
||||||
|
|
||||||
CF_HDR
|
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)
|
#define P(a,b) ((a<<8) | b)
|
||||||
|
|
||||||
CF_DECLS
|
CF_DECLS
|
||||||
|
|
2
lib/ip.c
2
lib/ip.c
|
@ -6,11 +6,11 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "lib/ip.h"
|
#include "lib/ip.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
char *
|
char *
|
||||||
ip_scope_text(unsigned scope)
|
ip_scope_text(unsigned scope)
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
|
|
@ -4,17 +4,16 @@
|
||||||
* (c) 1999 Martin Mares <mj@ucw.cz>
|
* (c) 1999 Martin Mares <mj@ucw.cz>
|
||||||
*
|
*
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "lib/ip.h"
|
#include "lib/ip.h"
|
||||||
#include "lib/bitops.h"
|
#include "lib/bitops.h"
|
||||||
#include "lib/endian.h"
|
#include "lib/endian.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See RFC 2373 for explanation of IPv6 addressing issues.
|
* See RFC 2373 for explanation of IPv6 addressing issues.
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#define _BIRD_IPV6_H_
|
#define _BIRD_IPV6_H_
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <string.h>
|
#include "lib/string.h"
|
||||||
|
|
||||||
typedef struct ipv6_addr {
|
typedef struct ipv6_addr {
|
||||||
u32 addr[4];
|
u32 addr[4];
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
* Adapted for BIRD by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
|
* Adapted for BIRD by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h> /* for memcpy() */
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
#include "lib/string.h"
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
|
||||||
#ifdef CPU_LITTLE_ENDIAN
|
#ifdef CPU_LITTLE_ENDIAN
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
struct lp_chunk {
|
struct lp_chunk {
|
||||||
struct lp_chunk *next;
|
struct lp_chunk *next;
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/* we use this so that we can do without the ctype library */
|
/* we use this so that we can do without the ctype library */
|
||||||
#define is_digit(c) ((c) >= '0' && (c) <= '9')
|
#define is_digit(c) ((c) >= '0' && (c) <= '9')
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
struct pool {
|
struct pool {
|
||||||
resource r;
|
resource r;
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
#undef FAKE_SLAB /* Turn on if you want to debug memory allocations */
|
#undef FAKE_SLAB /* Turn on if you want to debug memory allocations */
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#define _BIRD_STRING_H_
|
#define _BIRD_STRING_H_
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
int bsprintf(char *str, const char *fmt, ...);
|
int bsprintf(char *str, const char *fmt, ...);
|
||||||
int bvsprintf(char *str, const char *fmt, va_list args);
|
int bvsprintf(char *str, const char *fmt, va_list args);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* if possible.
|
* if possible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include "lib/string.h"
|
||||||
|
|
||||||
static inline u16
|
static inline u16
|
||||||
get_u16(void *p)
|
get_u16(void *p)
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "nest/cli.h"
|
#include "nest/cli.h"
|
||||||
#include "conf/conf.h"
|
#include "conf/conf.h"
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
#undef LOCAL_DEBUG
|
#undef LOCAL_DEBUG
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
@ -15,6 +14,7 @@
|
||||||
#include "nest/iface.h"
|
#include "nest/iface.h"
|
||||||
#include "nest/cli.h"
|
#include "nest/cli.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
static slab *rta_slab;
|
static slab *rta_slab;
|
||||||
static pool *rta_pool;
|
static pool *rta_pool;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
#undef LOCAL_DEBUG
|
#undef LOCAL_DEBUG
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "nest/iface.h"
|
#include "nest/iface.h"
|
||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
|
@ -17,6 +15,7 @@
|
||||||
#include "nest/rt-dev.h"
|
#include "nest/rt-dev.h"
|
||||||
#include "conf/conf.h"
|
#include "conf/conf.h"
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
|
dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
|
||||||
|
|
|
@ -8,10 +8,9 @@
|
||||||
|
|
||||||
#undef LOCAL_DEBUG
|
#undef LOCAL_DEBUG
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "nest/route.h"
|
#include "nest/route.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
#define HASH_DEF_ORDER 10
|
#define HASH_DEF_ORDER 10
|
||||||
#define HASH_HI_MARK *4
|
#define HASH_HI_MARK *4
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#undef LOCAL_DEBUG
|
#undef LOCAL_DEBUG
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
@ -20,6 +18,7 @@
|
||||||
#include "lib/string.h"
|
#include "lib/string.h"
|
||||||
#include "conf/conf.h"
|
#include "conf/conf.h"
|
||||||
#include "filter/filter.h"
|
#include "filter/filter.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
static slab *rte_slab;
|
static slab *rte_slab;
|
||||||
static linpool *rte_update_pool;
|
static linpool *rte_update_pool;
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
|
|
||||||
#define SIPH 64 /* FIXME Size Of IP header */
|
#define SIPH 64 /* FIXME Size Of IP header */
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
|
||||||
#include "lib/checksum.h"
|
#include "lib/checksum.h"
|
||||||
|
|
|
@ -9,9 +9,8 @@
|
||||||
|
|
||||||
#define LOCAL_DEBUG
|
#define LOCAL_DEBUG
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
#include "ospf.h"
|
#include "ospf.h"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
#define LOCAL_DEBUG
|
#define LOCAL_DEBUG
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
@ -21,6 +20,7 @@
|
||||||
#include "lib/lists.h"
|
#include "lib/lists.h"
|
||||||
#include "lib/timer.h"
|
#include "lib/timer.h"
|
||||||
#include "lib/md5.h"
|
#include "lib/md5.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
#include "rip.h"
|
#include "rip.h"
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#define LOCAL_DEBUG
|
#define LOCAL_DEBUG
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -39,6 +38,7 @@
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
#include "lib/lists.h"
|
#include "lib/lists.h"
|
||||||
#include "lib/timer.h"
|
#include "lib/timer.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
#include "rip.h"
|
#include "rip.h"
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
#undef LOCAL_DEBUG
|
#undef LOCAL_DEBUG
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
#include "nest/iface.h"
|
#include "nest/iface.h"
|
||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -22,6 +21,7 @@
|
||||||
#include "lib/timer.h"
|
#include "lib/timer.h"
|
||||||
#include "lib/unix.h"
|
#include "lib/unix.h"
|
||||||
#include "lib/krt.h"
|
#include "lib/krt.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
static int krt_scan_fd = -1;
|
static int krt_scan_fd = -1;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
@ -24,6 +23,7 @@
|
||||||
#include "lib/unix.h"
|
#include "lib/unix.h"
|
||||||
#include "lib/krt.h"
|
#include "lib/krt.h"
|
||||||
#include "lib/socket.h"
|
#include "lib/socket.h"
|
||||||
|
#include "lib/string.h"
|
||||||
#include "conf/conf.h"
|
#include "conf/conf.h"
|
||||||
|
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
@ -22,6 +21,7 @@
|
||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
#include "lib/timer.h"
|
#include "lib/timer.h"
|
||||||
#include "lib/krt.h"
|
#include "lib/krt.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
#include "unix.h"
|
#include "unix.h"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
@ -21,6 +20,7 @@
|
||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
#include "lib/unix.h"
|
#include "lib/unix.h"
|
||||||
#include "lib/krt.h"
|
#include "lib/krt.h"
|
||||||
|
#include "lib/string.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
krt_capable(rte *e)
|
krt_capable(rte *e)
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#define LOCAL_DEBUG
|
#define LOCAL_DEBUG
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -20,6 +19,7 @@
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
#include "lib/socket.h"
|
#include "lib/socket.h"
|
||||||
#include "lib/event.h"
|
#include "lib/event.h"
|
||||||
|
#include "lib/string.h"
|
||||||
#include "nest/route.h"
|
#include "nest/route.h"
|
||||||
#include "nest/protocol.h"
|
#include "nest/protocol.h"
|
||||||
#include "nest/iface.h"
|
#include "nest/iface.h"
|
||||||
|
|
Loading…
Reference in a new issue