Header cleanup: don't #include headers that libbb.h already includes.
authorRob Landley <rob@landley.net>
Fri, 2 Jun 2006 20:53:38 +0000 (20:53 -0000)
committerRob Landley <rob@landley.net>
Fri, 2 Jun 2006 20:53:38 +0000 (20:53 -0000)
networking/libiproute/ipaddress.c
networking/libiproute/iplink.c
networking/libiproute/iproute.c
networking/libiproute/iptunnel.c
networking/libiproute/libnetlink.c
networking/libiproute/ll_addr.c
networking/libiproute/ll_map.c
networking/libiproute/utils.c

index a742506212f33a823e1be3d6a0dcce68d8d1f1c4..a048cff993b2a07353c5581ef2d2640f3fae78a8 100644 (file)
@@ -9,16 +9,14 @@
  *     Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated
  */
 
+#include "libbb.h"
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 
 #include <fnmatch.h>
-#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
-#include <arpa/inet.h>
-
 #include <net/if.h>
 #include <net/if_arp.h>
 
@@ -26,7 +24,6 @@
 #include "utils.h"
 #include "ip_common.h"
 
-#include "libbb.h"
 
 static struct
 {
index 12677d52263025dd4fb4226412ec4f7498e4a9fe..2797f0250df3ce88c6a15093daeee9f5fb0d9ecc 100644 (file)
@@ -1,21 +1,17 @@
 /*
  * 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>
  *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
+#include "libbb.h"
+
 #include <sys/ioctl.h>
 #include <sys/socket.h>
-#include <linux/version.h>
 
 #include <errno.h>
-#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
 #include <net/if_packet.h>
 #include <netpacket/packet.h>
 
-#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1
 #include <net/ethernet.h>
-#else
-#include <linux/if_ether.h>
-#endif
 
 #include "rt_names.h"
 #include "utils.h"
 #include "ip_common.h"
 
-#include "libbb.h"
-
-
 /* take from linux/sockios.h */
 #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)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
        struct ifreq ifr;
        int fd;
        int err;
@@ -114,8 +102,6 @@ static int do_changename(char *dev, char *newdev)
        }
        close(fd);
        return err;
-#endif
-       return 0;
 }
 
 static int set_qlen(char *dev, int qlen)
index a67bc2e440da56b1a6c7380dbd9bee81cd02d609..6052a30235f6b744e24c42cdb47df932421310c1 100644 (file)
  * Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized
  */
 
+#include "libbb.h"
+
 #include <sys/socket.h>
 
-#include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -24,8 +25,6 @@
 #include "utils.h"
 #include "ip_common.h"
 
-#include "libbb.h"
-
 #ifndef RTAX_RTTVAR
 #define RTAX_RTTVAR RTAX_HOPS
 #endif
index 23b5d50137f71253bdf7f2a092a6cf2b36af3d21..1b1458e1ec2602eba9967d765650f7b1835f2e52 100644 (file)
  * Phil Karn <karn@ka9q.ampr.org>      990408: "pmtudisc" flag
  */
 
+#include "libbb.h"
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 
-#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
-#include <arpa/inet.h>
 #include <netinet/ip.h>
-#include <netinet/in.h>
 
 #include <net/if.h>
 #include <net/if_arp.h>
@@ -37,7 +35,6 @@
 #include "utils.h"
 #include "ip_common.h"
 
-#include "libbb.h"
 
 static int do_ioctl_get_ifindex(char *dev)
 {
index ad5bcd70f4c91a6ef76406cb79ab341c54c61886..93d6d67f0eb209411f86261417a6d3aff4de0d35 100644 (file)
  *
  */
 
+#include "libbb.h"
 #include <sys/socket.h>
 
 #include <errno.h>
-#include <stdio.h>
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
@@ -21,7 +21,6 @@
 #include <sys/uio.h>
 
 #include "libnetlink.h"
-#include "libbb.h"
 
 void rtnl_close(struct rtnl_handle *rth)
 {
index c4c44646319dd0884d6c8aa65693f893f4e764f2..bb89a45a8cf0cacd6ddbe01209861f32ce536a54 100644 (file)
@@ -9,14 +9,14 @@
  * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
  */
 
-#include <arpa/inet.h>
+#include "libbb.h"
+
 #include <string.h>
 #include <net/if_arp.h>
 
 #include "rt_names.h"
 #include "utils.h"
 
-#include "libbb.h"
 
 const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen)
 {
index 24487eb3df36487b02b9e8bd3ae23101facbc77e..0ac5ea95632d2091f9eb62ba412cc326cceaec97 100644 (file)
  *
  */
 
-#include <stdio.h>
+#include "libbb.h"
 #include <string.h>
-#include <stdlib.h>
-#include <netinet/in.h>
 
 #include "libnetlink.h"
 #include "ll_map.h"
-#include "libbb.h"
 
 struct idxmap
 {
index 984f7bed9e6f808e03df051354b987081ec7316b..3a161ead06f6aa58ab5f41f346626ea975117830 100644 (file)
  * Rani Assaf <rani@magic.metawire.com> 980929:        resolve addresses
  */
 
-#include <stdlib.h>
+#include "libbb.h"
+
 #include <string.h>
 #include <unistd.h>
-#include <arpa/inet.h>
 
 #include "utils.h"
-#include "libbb.h"
 #include "inet_common.h"
 
 int get_integer(int *val, char *arg, int base)