Commit 4b2cb283 authored by Phil Blundell's avatar Phil Blundell

Make i18n default to off (and fix typo in config.in)

Cosmetic changes to ifconfig.  Fix lots of stuff to
compile properly with glibc2.1.
Fix HIPPI and HDLC/LAPB for new i18n code.
parent 97914470
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
* on GNU gettext, only a brazilian portuguese catalog (translation) * on GNU gettext, only a brazilian portuguese catalog (translation)
* is present, but others are *highly* welcome! * 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. * Protocol Families.
......
...@@ -87,8 +87,12 @@ static const char *if_port_text[][4] = { ...@@ -87,8 +87,12 @@ static const char *if_port_text[][4] = {
#endif #endif
#if HAVE_AFIPX #if HAVE_AFIPX
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h" #include "ipx.h"
#endif #endif
#endif
#include "net-support.h" #include "net-support.h"
#include "pathnames.h" #include "pathnames.h"
#include "version.h" #include "version.h"
...@@ -97,7 +101,7 @@ static const char *if_port_text[][4] = { ...@@ -97,7 +101,7 @@ static const char *if_port_text[][4] = {
#include "sockets.h" #include "sockets.h"
char *Release = RELEASE, 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_a = 0; /* show all interfaces */
int opt_i = 0; /* show the statistics */ int opt_i = 0; /* show the statistics */
...@@ -258,12 +262,6 @@ ife_print(struct interface *ptr) ...@@ -258,12 +262,6 @@ ife_print(struct interface *ptr)
if (ptr->flags & IFF_MULTICAST) printf(_("MULTICAST ")); if (ptr->flags & IFF_MULTICAST) printf(_("MULTICAST "));
printf(_(" MTU:%d Metric:%d\n"), printf(_(" MTU:%d Metric:%d\n"),
ptr->mtu, ptr->metric?ptr->metric:1); 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. */ /* If needed, display the interface statistics. */
printf(" "); printf(" ");
...@@ -281,9 +279,11 @@ ife_print(struct interface *ptr) ...@@ -281,9 +279,11 @@ ife_print(struct interface *ptr)
ptr->stats.tx_packets, ptr->stats.tx_errors, ptr->stats.tx_packets, ptr->stats.tx_errors,
ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors, ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
ptr->stats.tx_carrier_errors); ptr->stats.tx_carrier_errors);
printf(_(" Collisions:%lu "), ptr->stats.collisions); printf(_(" collisions:%lu "), ptr->stats.collisions);
if (can_compress) if (can_compress)
printf(_("compressed:%lu "), ptr->stats.tx_compressed); printf(_("compressed:%lu "), ptr->stats.tx_compressed);
if (ptr->tx_queue_len != -1)
printf(_("txqueuelen:%d "), ptr->tx_queue_len);
printf("\n"); printf("\n");
if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma || if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma ||
......
...@@ -16,8 +16,12 @@ ...@@ -16,8 +16,12 @@
#include <ctype.h> #include <ctype.h>
#if HAVE_AFIPX #if HAVE_AFIPX
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h" #include "ipx.h"
#endif #endif
#endif
#if HAVE_AFECONET #if HAVE_AFECONET
#include <linux/if_ec.h> #include <linux/if_ec.h>
......
...@@ -24,7 +24,11 @@ ...@@ -24,7 +24,11 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netax25/ax25.h>
#else
#include <linux/ax25.h> #include <linux/ax25.h>
#endif
#include <net/if_arp.h> #include <net/if_arp.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -35,9 +35,6 @@ ...@@ -35,9 +35,6 @@
#include <unistd.h> #include <unistd.h>
#include "net-support.h" #include "net-support.h"
#include "pathnames.h" #include "pathnames.h"
#define EXTERN
#include "net-locale.h"
struct hwtype hdlc_hwtype = { struct hwtype hdlc_hwtype = {
"hdlc", NULL, /*"(Cisco) HDLC",*/ ARPHRD_HDLC, 0, "hdlc", NULL, /*"(Cisco) HDLC",*/ ARPHRD_HDLC, 0,
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#error "No HIPPI Support in your current Kernelsource Tree." #error "No HIPPI Support in your current Kernelsource Tree."
#error "Disable HW Type HIPPI" #error "Disable HW Type HIPPI"
#endif #endif
#include <linux/if_hippi.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
...@@ -34,9 +33,13 @@ ...@@ -34,9 +33,13 @@
#include <unistd.h> #include <unistd.h>
#include "net-support.h" #include "net-support.h"
#include "pathnames.h" #include "pathnames.h"
#define EXTERN #include "intl.h"
#include "net-locale.h"
/*
* HIPPI magic constants.
*/
#define HIPPI_ALEN 6 /* Bytes in one HIPPI hw-addr */
extern struct hwtype hippi_hwtype; extern struct hwtype hippi_hwtype;
...@@ -62,7 +65,7 @@ pr_shippi(struct sockaddr *sap) ...@@ -62,7 +65,7 @@ pr_shippi(struct sockaddr *sap)
static char buf[64]; static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0) 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)); return(pr_hippi(sap->sa_data));
} }
...@@ -88,8 +91,7 @@ in_hippi(char *bufp, struct sockaddr *sap) ...@@ -88,8 +91,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10; else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else { else {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug1, fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
"in_hippi(%s): invalid hippi address!\n"), orig);
#endif #endif
errno = EINVAL; errno = EINVAL;
return(-1); return(-1);
...@@ -101,8 +103,7 @@ in_hippi(char *bufp, struct sockaddr *sap) ...@@ -101,8 +103,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10; else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
else { else {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug2, fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
"in_hippi(%s): invalid hippi address!\n"), orig);
#endif #endif
errno = EINVAL; errno = EINVAL;
return(-1); return(-1);
...@@ -114,9 +115,7 @@ in_hippi(char *bufp, struct sockaddr *sap) ...@@ -114,9 +115,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
if (*bufp == ':') { if (*bufp == ':') {
if (i == HIPPI_ALEN) { if (i == HIPPI_ALEN) {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug3, fprintf(stderr, _("in_hippi(%s): trailing : ignored!\n"), orig)
"in_hippi(%s): trailing : ignored!\n"),
orig)
#endif #endif
; /* nothing */ ; /* nothing */
} }
...@@ -127,7 +126,7 @@ in_hippi(char *bufp, struct sockaddr *sap) ...@@ -127,7 +126,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
/* That's it. Any trailing junk? */ /* That's it. Any trailing junk? */
if ((i == HIPPI_ALEN) && (*bufp != '\0')) { if ((i == HIPPI_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG #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; errno = EINVAL;
return(-1); return(-1);
#endif #endif
......
...@@ -19,7 +19,11 @@ ...@@ -19,7 +19,11 @@
#include <asm/types.h> #include <asm/types.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h" #include "ipx.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
#include <asm/types.h> #include <asm/types.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h" #include "ipx.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
......
...@@ -30,7 +30,11 @@ ...@@ -30,7 +30,11 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <net/if_arp.h> #include <net/if_arp.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netax25/ax25.h>
#else
#include <linux/ax25.h> #include <linux/ax25.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment