diff options
author | Phil Blundell <philb@gnu.org> | 1998-08-29 11:47:36 +0000 |
---|---|---|
committer | Phil Blundell <philb@gnu.org> | 1998-08-29 11:47:36 +0000 |
commit | 4b2cb283969eb299c212a677eb08b0cd05c0e80b (patch) | |
tree | f1add8f81116d27be1ec4e6ac0285a5d5bc239bb | |
parent | 979144702297a301a79a5190d43d47b2fe345696 (diff) | |
download | net-tools-4b2cb283969eb299c212a677eb08b0cd05c0e80b.tar.gz net-tools-4b2cb283969eb299c212a677eb08b0cd05c0e80b.tar.bz2 net-tools-4b2cb283969eb299c212a677eb08b0cd05c0e80b.zip |
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.
-rw-r--r-- | config.in | 4 | ||||
-rw-r--r-- | ifconfig.c | 16 | ||||
-rw-r--r-- | interface.c | 4 | ||||
-rw-r--r-- | lib/ax25.c | 4 | ||||
-rw-r--r-- | lib/hdlclapb.c | 3 | ||||
-rw-r--r-- | lib/hippi.c | 23 | ||||
-rw-r--r-- | lib/ipx.c | 4 | ||||
-rw-r--r-- | lib/ipx_gr.c | 4 | ||||
-rw-r--r-- | lib/netrom.c | 4 |
9 files changed, 41 insertions, 25 deletions
@@ -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. @@ -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 || diff --git a/interface.c b/interface.c index a944f9f..368c108 100644 --- a/interface.c +++ b/interface.c @@ -16,8 +16,12 @@ #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> @@ -24,7 +24,11 @@ #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> diff --git a/lib/hdlclapb.c b/lib/hdlclapb.c index ddf5b3e..c5a0ce7 100644 --- a/lib/hdlclapb.c +++ b/lib/hdlclapb.c @@ -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, diff --git a/lib/hippi.c b/lib/hippi.c index c525eac..ce58462 100644 --- a/lib/hippi.c +++ b/lib/hippi.c @@ -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> @@ -34,9 +33,13 @@ #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 @@ -19,7 +19,11 @@ #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> diff --git a/lib/ipx_gr.c b/lib/ipx_gr.c index 42a5cb9..1bacaa2 100644 --- a/lib/ipx_gr.c +++ b/lib/ipx_gr.c @@ -11,7 +11,11 @@ #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> diff --git a/lib/netrom.c b/lib/netrom.c index 1963dbf..9f024dc 100644 --- a/lib/netrom.c +++ b/lib/netrom.c @@ -30,7 +30,11 @@ #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> |