diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-01 15:09:44 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-01 15:09:44 +0200 |
commit | 5342c3f3106b4afa2a76d3173f4827c4b8236da8 (patch) | |
tree | dacc6d57ae73220cf5d6db48f77911e8fb314c7c | |
parent | 345e093c2910e9e837de5b7cc5fb46752351f84d (diff) | |
download | busybox-w32-5342c3f3106b4afa2a76d3173f4827c4b8236da8.tar.gz busybox-w32-5342c3f3106b4afa2a76d3173f4827c4b8236da8.tar.bz2 busybox-w32-5342c3f3106b4afa2a76d3173f4827c4b8236da8.zip |
clean up redundant, commented-out and misplaced includes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | console-tools/setkeycodes.c | 2 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/ext2fs/bitops.h | 2 | ||||
-rw-r--r-- | libbb/xgethostbyname.c | 2 | ||||
-rw-r--r-- | networking/ifenslave.c | 2 | ||||
-rw-r--r-- | networking/interface.c | 42 | ||||
-rw-r--r-- | networking/libiproute/iplink.c | 3 |
6 files changed, 16 insertions, 37 deletions
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index 597272a2f..b7851016a 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c | |||
@@ -8,8 +8,6 @@ | |||
8 | * | 8 | * |
9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
10 | */ | 10 | */ |
11 | |||
12 | //#include <sys/ioctl.h> | ||
13 | #include "libbb.h" | 11 | #include "libbb.h" |
14 | 12 | ||
15 | /* From <linux/kd.h> */ | 13 | /* From <linux/kd.h> */ |
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/bitops.h b/e2fsprogs/old_e2fsprogs/ext2fs/bitops.h index b34bd98f7..7271a497b 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/bitops.h +++ b/e2fsprogs/old_e2fsprogs/ext2fs/bitops.h | |||
@@ -13,9 +13,7 @@ | |||
13 | * i386 bitops operations taken from <asm/bitops.h>, Copyright 1992, | 13 | * i386 bitops operations taken from <asm/bitops.h>, Copyright 1992, |
14 | * Linus Torvalds. | 14 | * Linus Torvalds. |
15 | */ | 15 | */ |
16 | |||
17 | #include <string.h> | 16 | #include <string.h> |
18 | //#include <strings.h> | ||
19 | 17 | ||
20 | extern int ext2fs_set_bit(unsigned int nr,void * addr); | 18 | extern int ext2fs_set_bit(unsigned int nr,void * addr); |
21 | extern int ext2fs_clear_bit(unsigned int nr, void * addr); | 19 | extern int ext2fs_clear_bit(unsigned int nr, void * addr); |
diff --git a/libbb/xgethostbyname.c b/libbb/xgethostbyname.c index f1839f7e6..7afa9b696 100644 --- a/libbb/xgethostbyname.c +++ b/libbb/xgethostbyname.c | |||
@@ -6,8 +6,6 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | |||
10 | //#include <netdb.h> | ||
11 | #include "libbb.h" | 9 | #include "libbb.h" |
12 | 10 | ||
13 | struct hostent* FAST_FUNC xgethostbyname(const char *name) | 11 | struct hostent* FAST_FUNC xgethostbyname(const char *name) |
diff --git a/networking/ifenslave.c b/networking/ifenslave.c index 28f0c0b6b..0b3ebf72a 100644 --- a/networking/ifenslave.c +++ b/networking/ifenslave.c | |||
@@ -102,7 +102,7 @@ | |||
102 | 102 | ||
103 | /* #include <net/if.h> - no. linux/if_bonding.h pulls in linux/if.h */ | 103 | /* #include <net/if.h> - no. linux/if_bonding.h pulls in linux/if.h */ |
104 | #include <linux/if.h> | 104 | #include <linux/if.h> |
105 | #include <net/if_arp.h> | 105 | //#include <net/if_arp.h> - not needed? |
106 | #include <linux/if_bonding.h> | 106 | #include <linux/if_bonding.h> |
107 | #include <linux/sockios.h> | 107 | #include <linux/sockios.h> |
108 | #include "fix_u32.h" /* hack, so we may include kernel's ethtool.h */ | 108 | #include "fix_u32.h" /* hack, so we may include kernel's ethtool.h */ |
diff --git a/networking/interface.c b/networking/interface.c index 0d5a0f97d..b59a61de4 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -33,14 +33,18 @@ | |||
33 | 33 | ||
34 | #include <net/if.h> | 34 | #include <net/if.h> |
35 | #include <net/if_arp.h> | 35 | #include <net/if_arp.h> |
36 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | ||
37 | # include <net/ethernet.h> | ||
38 | #else | ||
39 | # include <linux/if_ether.h> | ||
40 | #endif | ||
36 | #include "libbb.h" | 41 | #include "libbb.h" |
37 | #include "inet_common.h" | 42 | #include "inet_common.h" |
38 | 43 | ||
39 | |||
40 | #if ENABLE_FEATURE_HWIB | 44 | #if ENABLE_FEATURE_HWIB |
41 | /* #include <linux/if_infiniband.h> */ | 45 | /* #include <linux/if_infiniband.h> */ |
42 | #undef INFINIBAND_ALEN | 46 | # undef INFINIBAND_ALEN |
43 | #define INFINIBAND_ALEN 20 | 47 | # define INFINIBAND_ALEN 20 |
44 | #endif | 48 | #endif |
45 | 49 | ||
46 | #if ENABLE_FEATURE_IPV6 | 50 | #if ENABLE_FEATURE_IPV6 |
@@ -53,39 +57,35 @@ | |||
53 | #define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6" | 57 | #define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6" |
54 | 58 | ||
55 | #ifdef HAVE_AFINET6 | 59 | #ifdef HAVE_AFINET6 |
56 | 60 | # ifndef _LINUX_IN6_H | |
57 | #ifndef _LINUX_IN6_H | ||
58 | /* | 61 | /* |
59 | * This is in linux/include/net/ipv6.h. | 62 | * This is from linux/include/net/ipv6.h |
60 | */ | 63 | */ |
61 | |||
62 | struct in6_ifreq { | 64 | struct in6_ifreq { |
63 | struct in6_addr ifr6_addr; | 65 | struct in6_addr ifr6_addr; |
64 | uint32_t ifr6_prefixlen; | 66 | uint32_t ifr6_prefixlen; |
65 | unsigned int ifr6_ifindex; | 67 | unsigned int ifr6_ifindex; |
66 | }; | 68 | }; |
67 | 69 | # endif | |
68 | #endif | ||
69 | |||
70 | #endif /* HAVE_AFINET6 */ | 70 | #endif /* HAVE_AFINET6 */ |
71 | 71 | ||
72 | /* Defines for glibc2.0 users. */ | 72 | /* Defines for glibc2.0 users. */ |
73 | #ifndef SIOCSIFTXQLEN | 73 | #ifndef SIOCSIFTXQLEN |
74 | #define SIOCSIFTXQLEN 0x8943 | 74 | # define SIOCSIFTXQLEN 0x8943 |
75 | #define SIOCGIFTXQLEN 0x8942 | 75 | # define SIOCGIFTXQLEN 0x8942 |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | /* ifr_qlen is ifru_ivalue, but it isn't present in 2.0 kernel headers */ | 78 | /* ifr_qlen is ifru_ivalue, but it isn't present in 2.0 kernel headers */ |
79 | #ifndef ifr_qlen | 79 | #ifndef ifr_qlen |
80 | #define ifr_qlen ifr_ifru.ifru_mtu | 80 | # define ifr_qlen ifr_ifru.ifru_mtu |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #ifndef HAVE_TXQUEUELEN | 83 | #ifndef HAVE_TXQUEUELEN |
84 | #define HAVE_TXQUEUELEN 1 | 84 | # define HAVE_TXQUEUELEN 1 |
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | #ifndef IFF_DYNAMIC | 87 | #ifndef IFF_DYNAMIC |
88 | #define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses */ | 88 | # define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses */ |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | /* Display an Internet socket address. */ | 91 | /* Display an Internet socket address. */ |
@@ -711,14 +711,6 @@ static const struct hwtype loop_hwtype = { | |||
711 | .type = ARPHRD_LOOPBACK | 711 | .type = ARPHRD_LOOPBACK |
712 | }; | 712 | }; |
713 | 713 | ||
714 | #include <net/if_arp.h> | ||
715 | |||
716 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | ||
717 | #include <net/ethernet.h> | ||
718 | #else | ||
719 | #include <linux/if_ether.h> | ||
720 | #endif | ||
721 | |||
722 | /* Display an Ethernet address in readable format. */ | 714 | /* Display an Ethernet address in readable format. */ |
723 | static char* FAST_FUNC ether_print(unsigned char *ptr) | 715 | static char* FAST_FUNC ether_print(unsigned char *ptr) |
724 | { | 716 | { |
@@ -794,8 +786,6 @@ static int FAST_FUNC ether_input(const char *bufp, struct sockaddr *sap) | |||
794 | return 0; | 786 | return 0; |
795 | } | 787 | } |
796 | 788 | ||
797 | #include <net/if_arp.h> | ||
798 | |||
799 | static const struct hwtype ppp_hwtype = { | 789 | static const struct hwtype ppp_hwtype = { |
800 | .name = "ppp", | 790 | .name = "ppp", |
801 | .title = "Point-to-Point Protocol", | 791 | .title = "Point-to-Point Protocol", |
@@ -993,7 +983,6 @@ static void ife_print6(struct interface *ptr) | |||
993 | #define ife_print6(a) ((void)0) | 983 | #define ife_print6(a) ((void)0) |
994 | #endif | 984 | #endif |
995 | 985 | ||
996 | |||
997 | static void ife_print(struct interface *ptr) | 986 | static void ife_print(struct interface *ptr) |
998 | { | 987 | { |
999 | const struct aftype *ap; | 988 | const struct aftype *ap; |
@@ -1277,7 +1266,6 @@ int FAST_FUNC in_ib(const char *bufp, struct sockaddr *sap) | |||
1277 | } | 1266 | } |
1278 | #endif | 1267 | #endif |
1279 | 1268 | ||
1280 | |||
1281 | int FAST_FUNC display_interfaces(char *ifname) | 1269 | int FAST_FUNC display_interfaces(char *ifname) |
1282 | { | 1270 | { |
1283 | int status; | 1271 | int status; |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index de7d6407e..df8a354a1 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -6,9 +6,6 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | |||
10 | //#include <sys/ioctl.h> | ||
11 | //#include <sys/socket.h> | ||
12 | #include <net/if.h> | 9 | #include <net/if.h> |
13 | #include <net/if_packet.h> | 10 | #include <net/if_packet.h> |
14 | #include <netpacket/packet.h> | 11 | #include <netpacket/packet.h> |