Bug #17812 Fix the handling of some of the HAVE_* flags ifdef vs if. --jpa468
authorBernd Eckenfels <net-tools@lina.inka.de>
Sat, 1 Jan 2011 03:22:31 +0000 (03:22 +0000)
committerBernd Eckenfels <net-tools@lina.inka.de>
Sat, 1 Jan 2011 03:22:31 +0000 (03:22 +0000)
ifconfig.c
lib/interface.c
lib/net-support.h

index ab3f621..952e705 100644 (file)
@@ -3,7 +3,7 @@
  *              that either displays or sets the characteristics of
  *              one or more of the system's networking interfaces.
  *
- * Version:     $Id: ifconfig.c,v 1.58 2008/10/02 23:31:04 ecki Exp $
+ * Version:     $Id: ifconfig.c,v 1.59 2011-01-01 03:22:31 ecki Exp $
  *
  * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  *              and others.  Copyright 1993 MicroWalt Corporation
@@ -49,7 +49,7 @@
 #include <asm/types.h>
 
 
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
 #include <linux/if_slip.h>
 #endif
 
@@ -778,7 +778,7 @@ int main(int argc, char **argv)
                continue;
            }
 #endif
-#ifdef HAVE_AFINET
+#if HAVE_AFINET
            { /* ipv4 address a.b.c.d */
                unsigned long ip, nm, bc;
                safe_strncpy(host, *spp, (sizeof host));
@@ -871,7 +871,7 @@ int main(int argc, char **argv)
                continue;
            }
 #endif
-#ifdef HAVE_AFINET
+#if HAVE_AFINET
            {
                /* ipv4 address a.b.c.d */
                unsigned long ip, nm, bc;
index c9f5923..0e5e454 100644 (file)
@@ -7,7 +7,7 @@
    8/2000  Andi Kleen make the list operations a bit more efficient.
    People are crazy enough to use thousands of aliases now.
 
-   $Id: interface.c,v 1.34 2010/01/01 06:35:30 vapier Exp $
+   $Id: interface.c,v 1.35 2011-01-01 03:22:31 ecki Exp $
  */
 
 #include "config.h"
@@ -37,7 +37,7 @@
 #include <neteconet/ec.h>
 #endif
 
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
 #include <linux/if_slip.h>
 #include <net/if_arp.h>
 #endif
@@ -437,7 +437,7 @@ int if_fetch(struct interface *ife)
     else
        ife->mtu = ifr.ifr_mtu;
 
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
     if (ife->type == ARPHRD_SLIP || ife->type == ARPHRD_CSLIP ||
        ife->type == ARPHRD_SLIP6 || ife->type == ARPHRD_CSLIP6 ||
        ife->type == ARPHRD_ADAPT) {
@@ -682,8 +682,10 @@ void ife_print_long(struct interface *ptr)
 
     hf = ptr->type;
 
+#if HAVE_HWSLIP
     if (hf == ARPHRD_CSLIP || hf == ARPHRD_CSLIP6)
        can_compress = 1;
+#endif
 
     hw = get_hwntype(hf);
     if (hw == NULL)
index c963fe6..2820619 100644 (file)
@@ -237,7 +237,7 @@ extern char afname[];
 /* this is a 2.0.36 flag from /usr/src/linux/include/linux/route.h */
 #define RTF_NOTCACHED   0x0400          /* this route isn't cached        */
 
-#ifdef HAVE_AFECONET
+#if HAVE_AFECONET
 #ifndef AF_ECONET
 #define AF_ECONET       19      /* Acorn Econet */
 #endif