Header cleanup: don't #include headers that libbb.h already includes.

This commit is contained in:
Rob Landley 2006-06-02 20:53:38 +00:00
parent ff97ee9abd
commit ecae66ac16
8 changed files with 13 additions and 39 deletions

View File

@ -9,16 +9,14 @@
* Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated
*/ */
#include "libbb.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <fnmatch.h> #include <fnmatch.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <arpa/inet.h>
#include <net/if.h> #include <net/if.h>
#include <net/if_arp.h> #include <net/if_arp.h>
@ -26,7 +24,6 @@
#include "utils.h" #include "utils.h"
#include "ip_common.h" #include "ip_common.h"
#include "libbb.h"
static struct static struct
{ {

View File

@ -1,21 +1,17 @@
/* /*
* iplink.c "ip link". * iplink.c "ip link".
* *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* *
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/ */
#include "libbb.h"
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <linux/version.h>
#include <errno.h> #include <errno.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
@ -23,19 +19,12 @@
#include <net/if_packet.h> #include <net/if_packet.h>
#include <netpacket/packet.h> #include <netpacket/packet.h>
#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1
#include <net/ethernet.h> #include <net/ethernet.h>
#else
#include <linux/if_ether.h>
#endif
#include "rt_names.h" #include "rt_names.h"
#include "utils.h" #include "utils.h"
#include "ip_common.h" #include "ip_common.h"
#include "libbb.h"
/* take from linux/sockios.h */ /* take from linux/sockios.h */
#define SIOCSIFNAME 0x8923 /* set interface name */ #define SIOCSIFNAME 0x8923 /* set interface name */
@ -96,7 +85,6 @@ static int do_chflags(char *dev, __u32 flags, __u32 mask)
static int do_changename(char *dev, char *newdev) static int do_changename(char *dev, char *newdev)
{ {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
struct ifreq ifr; struct ifreq ifr;
int fd; int fd;
int err; int err;
@ -114,8 +102,6 @@ static int do_changename(char *dev, char *newdev)
} }
close(fd); close(fd);
return err; return err;
#endif
return 0;
} }
static int set_qlen(char *dev, int qlen) static int set_qlen(char *dev, int qlen)

View File

@ -13,9 +13,10 @@
* Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized * Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized
*/ */
#include "libbb.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
@ -24,8 +25,6 @@
#include "utils.h" #include "utils.h"
#include "ip_common.h" #include "ip_common.h"
#include "libbb.h"
#ifndef RTAX_RTTVAR #ifndef RTAX_RTTVAR
#define RTAX_RTTVAR RTAX_HOPS #define RTAX_RTTVAR RTAX_HOPS
#endif #endif

View File

@ -13,16 +13,14 @@
* Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag
*/ */
#include "libbb.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <arpa/inet.h>
#include <netinet/ip.h> #include <netinet/ip.h>
#include <netinet/in.h>
#include <net/if.h> #include <net/if.h>
#include <net/if_arp.h> #include <net/if_arp.h>
@ -37,7 +35,6 @@
#include "utils.h" #include "utils.h"
#include "ip_common.h" #include "ip_common.h"
#include "libbb.h"
static int do_ioctl_get_ifindex(char *dev) static int do_ioctl_get_ifindex(char *dev)
{ {

View File

@ -10,10 +10,10 @@
* *
*/ */
#include "libbb.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <errno.h> #include <errno.h>
#include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
@ -21,7 +21,6 @@
#include <sys/uio.h> #include <sys/uio.h>
#include "libnetlink.h" #include "libnetlink.h"
#include "libbb.h"
void rtnl_close(struct rtnl_handle *rth) void rtnl_close(struct rtnl_handle *rth)
{ {

View File

@ -9,14 +9,14 @@
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/ */
#include <arpa/inet.h> #include "libbb.h"
#include <string.h> #include <string.h>
#include <net/if_arp.h> #include <net/if_arp.h>
#include "rt_names.h" #include "rt_names.h"
#include "utils.h" #include "utils.h"
#include "libbb.h"
const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen) const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen)
{ {

View File

@ -10,14 +10,11 @@
* *
*/ */
#include <stdio.h> #include "libbb.h"
#include <string.h> #include <string.h>
#include <stdlib.h>
#include <netinet/in.h>
#include "libnetlink.h" #include "libnetlink.h"
#include "ll_map.h" #include "ll_map.h"
#include "libbb.h"
struct idxmap struct idxmap
{ {

View File

@ -10,13 +10,12 @@
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
*/ */
#include <stdlib.h> #include "libbb.h"
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <arpa/inet.h>
#include "utils.h" #include "utils.h"
#include "libbb.h"
#include "inet_common.h" #include "inet_common.h"
int get_integer(int *val, char *arg, int base) int get_integer(int *val, char *arg, int base)