Make i18n default to off (and fix typo in config.in)
authorPhil Blundell <philb@gnu.org>
Sat, 29 Aug 1998 11:47:36 +0000 (11:47 +0000)
committerPhil Blundell <philb@gnu.org>
Sat, 29 Aug 1998 11:47:36 +0000 (11:47 +0000)
Cosmetic changes to ifconfig.  Fix lots of stuff to
compile properly with glibc2.1.
Fix HIPPI and HDLC/LAPB for new i18n code.

config.in
ifconfig.c
interface.c
lib/ax25.c
lib/hdlclapb.c
lib/hippi.c
lib/ipx.c
lib/ipx_gr.c
lib/netrom.c

index 9c39fdc..27273d5 100644 (file)
--- a/config.in
+++ b/config.in
@@ -43,9 +43,9 @@
 * on GNU gettext, only a brazilian portuguese catalog (translation)
 * is present, but others are *highly* welcome!
 *
-* (answer 'n' if you haye no system with GNU gettext support)
+* (answer 'n' if you have no system with GNU gettext support)
 *
-bool 'Does your system support GNU gettext?' I18N y
+bool 'Does your system support GNU gettext?' I18N n
 *
 *
 *             Protocol Families.
index 3c48a3a..76a67c6 100644 (file)
@@ -87,8 +87,12 @@ static const char *if_port_text[][4] = {
 #endif
 
 #if HAVE_AFIPX
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
 #include "ipx.h"
 #endif
+#endif
 #include "net-support.h"
 #include "pathnames.h"
 #include "version.h"
@@ -97,7 +101,7 @@ static const char *if_port_text[][4] = {
 #include "sockets.h"
 
 char *Release = RELEASE,
-     *Version = "ifconfig 1.34 (1998-06-30)";
+     *Version = "ifconfig 1.35 (1998-08-29)";
 
 int opt_a = 0;                         /* show all interfaces          */
 int opt_i = 0;                         /* show the statistics          */
@@ -258,12 +262,6 @@ ife_print(struct interface *ptr)
   if (ptr->flags & IFF_MULTICAST) printf(_("MULTICAST "));
   printf(_(" MTU:%d  Metric:%d\n"),
         ptr->mtu, ptr->metric?ptr->metric:1);
-  if (ptr->tx_queue_len != -1)
-    printf(_("          txqueuelen:%d\n"), ptr->tx_queue_len);
-#if 0
-  else
-    printf(_("          txqueuelen not available\n"));
-#endif
 
   /* If needed, display the interface statistics. */
   printf("          ");
@@ -281,9 +279,11 @@ ife_print(struct interface *ptr)
        ptr->stats.tx_packets, ptr->stats.tx_errors,
        ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
        ptr->stats.tx_carrier_errors);
-  printf(_("          Collisions:%lu "), ptr->stats.collisions);
+  printf(_("          collisions:%lu "), ptr->stats.collisions);
   if (can_compress)
     printf(_("compressed:%lu "), ptr->stats.tx_compressed);
+  if (ptr->tx_queue_len != -1)
+    printf(_("txqueuelen:%d "), ptr->tx_queue_len);
   printf("\n");
 
   if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma || 
index a944f9f..368c108 100644 (file)
 #include <ctype.h>
 
 #if HAVE_AFIPX
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
 #include "ipx.h"
 #endif
+#endif
 
 #if HAVE_AFECONET
 #include <linux/if_ec.h>
index 65b385b..506a132 100644 (file)
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netax25/ax25.h>
+#else
 #include <linux/ax25.h>
+#endif
 #include <net/if_arp.h>
 #include <stdlib.h>
 #include <stdio.h>
index ddf5b3e..c5a0ce7 100644 (file)
@@ -35,9 +35,6 @@
 #include <unistd.h>
 #include "net-support.h"
 #include "pathnames.h"
-#define  EXTERN
-#include "net-locale.h"
-
 
 struct hwtype hdlc_hwtype = {
   "hdlc",      NULL, /*"(Cisco) HDLC",*/       ARPHRD_HDLC,    0,
index c525eac..ce58462 100644 (file)
@@ -25,7 +25,6 @@
 #error "No HIPPI Support in your current Kernelsource Tree."
 #error "Disable HW Type HIPPI"
 #endif
-#include <linux/if_hippi.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include "net-support.h"
 #include "pathnames.h"
-#define  EXTERN
-#include "net-locale.h"
+#include "intl.h"
 
+/*
+ *     HIPPI magic constants.
+ */
+
+#define HIPPI_ALEN     6               /* Bytes in one HIPPI hw-addr      */
 
 extern struct hwtype hippi_hwtype;
 
@@ -62,7 +65,7 @@ pr_shippi(struct sockaddr *sap)
   static char buf[64];
 
   if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
-    return(NLS_CATBUFF (catfd, hippiSet, hippi_none, "[NONE SET]", buf, 64));
+    return(strncpy(buf, _("[NONE SET]"), 64));
   return(pr_hippi(sap->sa_data));
 }
 
@@ -88,8 +91,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
          else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
          else {
 #ifdef DEBUG
-               fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug1,
-                                           "in_hippi(%s): invalid hippi address!\n"), orig);
+               fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
 #endif
                errno = EINVAL;
                return(-1);
@@ -101,8 +103,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
          else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
          else {
 #ifdef DEBUG
-               fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug2,
-                                           "in_hippi(%s): invalid hippi address!\n"), orig);
+               fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
 #endif
                errno = EINVAL;
                return(-1);
@@ -114,9 +115,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
        if (*bufp == ':') {
                if (i == HIPPI_ALEN) {
 #ifdef DEBUG
-                       fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug3,
-                                                   "in_hippi(%s): trailing : ignored!\n"),
-                                                                       orig)
+                       fprintf(stderr, _("in_hippi(%s): trailing : ignored!\n"), orig)
 #endif
                                                ; /* nothing */
                }
@@ -127,7 +126,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
   /* That's it.  Any trailing junk? */
   if ((i == HIPPI_ALEN) && (*bufp != '\0')) {
 #ifdef DEBUG
-       fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug4, "in_hippi(%s): trailing junk!\n"), orig);
+       fprintf(stderr, _("in_hippi(%s): trailing junk!\n"), orig);
        errno = EINVAL;
        return(-1);
 #endif
index eca9214..dfd8873 100644 (file)
--- a/lib/ipx.c
+++ b/lib/ipx.c
 #include <asm/types.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
 #include "ipx.h"
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
index 42a5cb9..1bacaa2 100644 (file)
 #include <asm/types.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
 #include "ipx.h"
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
index 1963dbf..9f024dc 100644 (file)
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <net/if_arp.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netax25/ax25.h>
+#else
 #include <linux/ax25.h>
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>