diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
commit | 86f5c9906beac527f3d7966f24811b571a589e08 (patch) | |
tree | 1c9eba853c728b5d734506e1c66c269d96fe46ea /networking/libiproute | |
parent | 2edf52643d3eb3d13f26d31f9678cf122f2063bc (diff) | |
download | busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.gz busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.bz2 busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.zip |
- add platform.h.
- use shorter boilerplate while at it.
Diffstat (limited to 'networking/libiproute')
-rw-r--r-- | networking/libiproute/ip_common.h | 5 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 2 | ||||
-rw-r--r-- | networking/libiproute/utils.h | 9 |
3 files changed, 10 insertions, 6 deletions
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h index 25e9c6c81..71be8269e 100644 --- a/networking/libiproute/ip_common.h +++ b/networking/libiproute/ip_common.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifndef _IP_COMMON_H | ||
2 | #define _IP_COMMON_H 1 | ||
1 | extern int preferred_family; | 3 | extern int preferred_family; |
2 | extern char * _SL_; | 4 | extern char * _SL_; |
3 | 5 | ||
@@ -5,7 +7,7 @@ extern void ip_parse_common_args(int *argcp, char ***argvp); | |||
5 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); | 7 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); |
6 | extern int ipaddr_list_or_flush(int argc, char **argv, int flush); | 8 | extern int ipaddr_list_or_flush(int argc, char **argv, int flush); |
7 | extern int iproute_monitor(int argc, char **argv); | 9 | extern int iproute_monitor(int argc, char **argv); |
8 | extern void iplink_usage(void) __attribute__((noreturn)); | 10 | extern void iplink_usage(void) ATTRIBUTE_NORETURN; |
9 | extern void ipneigh_reset_filter(void); | 11 | extern void ipneigh_reset_filter(void); |
10 | extern int do_ipaddr(int argc, char **argv); | 12 | extern int do_ipaddr(int argc, char **argv); |
11 | extern int do_iproute(int argc, char **argv); | 13 | extern int do_iproute(int argc, char **argv); |
@@ -16,3 +18,4 @@ extern int do_iplink(int argc, char **argv); | |||
16 | extern int do_ipmonitor(int argc, char **argv); | 18 | extern int do_ipmonitor(int argc, char **argv); |
17 | extern int do_multiaddr(int argc, char **argv); | 19 | extern int do_multiaddr(int argc, char **argv); |
18 | extern int do_multiroute(int argc, char **argv); | 20 | extern int do_multiroute(int argc, char **argv); |
21 | #endif /* ip_common.h */ | ||
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index a15fc81dc..b622afd47 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -63,7 +63,7 @@ static int flush_update(void) | |||
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | 65 | ||
66 | static int print_route(struct sockaddr_nl *who __attribute__((unused)), | 66 | static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED, |
67 | struct nlmsghdr *n, void *arg) | 67 | struct nlmsghdr *n, void *arg) |
68 | { | 68 | { |
69 | FILE *fp = (FILE*)arg; | 69 | FILE *fp = (FILE*)arg; |
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index e79e177b9..3d223edf6 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "libnetlink.h" | 7 | #include "libnetlink.h" |
8 | #include "ll_map.h" | 8 | #include "ll_map.h" |
9 | #include "rtm_map.h" | 9 | #include "rtm_map.h" |
10 | #include "libbb.h" | ||
10 | 11 | ||
11 | extern int preferred_family; | 12 | extern int preferred_family; |
12 | extern int show_stats; | 13 | extern int show_stats; |
@@ -26,7 +27,7 @@ extern char * _SL_; | |||
26 | #define SPRINT_BSIZE 64 | 27 | #define SPRINT_BSIZE 64 |
27 | #define SPRINT_BUF(x) char x[SPRINT_BSIZE] | 28 | #define SPRINT_BUF(x) char x[SPRINT_BSIZE] |
28 | 29 | ||
29 | extern void incomplete_command(void) __attribute__((noreturn)); | 30 | extern void incomplete_command(void) ATTRIBUTE_NORETURN; |
30 | 31 | ||
31 | #define NEXT_ARG() do { argv++; if (--argc <= 0) incomplete_command(); } while(0) | 32 | #define NEXT_ARG() do { argv++; if (--argc <= 0) incomplete_command(); } while(0) |
32 | 33 | ||
@@ -76,9 +77,9 @@ extern int get_s8(__s8 *val, char *arg, int base); | |||
76 | extern const char *format_host(int af, int len, void *addr, char *buf, int buflen); | 77 | extern const char *format_host(int af, int len, void *addr, char *buf, int buflen); |
77 | extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen); | 78 | extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen); |
78 | 79 | ||
79 | void invarg(char *, char *) __attribute__((noreturn)); | 80 | void invarg(char *, char *) ATTRIBUTE_NORETURN; |
80 | void duparg(char *, char *) __attribute__((noreturn)); | 81 | void duparg(char *, char *) ATTRIBUTE_NORETURN; |
81 | void duparg2(char *, char *) __attribute__((noreturn)); | 82 | void duparg2(char *, char *) ATTRIBUTE_NORETURN; |
82 | int matches(char *arg, char *pattern); | 83 | int matches(char *arg, char *pattern); |
83 | extern int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits); | 84 | extern int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits); |
84 | 85 | ||