Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp only use getaddrinfo() et al if both NI_NUMERICH...
details: https://anonhg.NetBSD.org/src/rev/afaf393d418b
branches: trunk
changeset: 482126:afaf393d418b
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Feb 14 21:46:26 2000 +0000
description:
only use getaddrinfo() et al if both NI_NUMERICHOST *and* INET6 are defined...
(allows --disable-ipv6 in lukemftp's configure script to disable this as
well, which is good for testing when it appears getaddrinfo() is borken)
diffstat:
usr.bin/ftp/fetch.c | 8 ++++----
usr.bin/ftp/ftp.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 60928a95b9a1 -r afaf393d418b usr.bin/ftp/fetch.c
--- a/usr.bin/ftp/fetch.c Mon Feb 14 21:42:50 2000 +0000
+++ b/usr.bin/ftp/fetch.c Mon Feb 14 21:46:26 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.104 2000/01/31 22:01:04 lukem Exp $ */
+/* $NetBSD: fetch.c,v 1.105 2000/02/14 21:46:26 lukem Exp $ */
/*-
* Copyright (c) 1997-1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.104 2000/01/31 22:01:04 lukem Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.105 2000/02/14 21:46:26 lukem Exp $");
#endif /* not lint */
/*
@@ -451,7 +451,7 @@
char *proxyauth;
char *wwwauth;
{
-#ifdef NI_NUMERICHOST
+#if defined(NI_NUMERICHOST) && defined(INET6)
struct addrinfo hints, *res, *res0 = NULL;
int error;
char hbuf[NI_MAXHOST];
@@ -665,7 +665,7 @@
}
} /* ! EMPTYSTRING(proxyenv) */
-#ifndef NI_NUMERICHOST
+#if !defined(NI_NUMERICHOST) || !defined(INET6)
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
diff -r 60928a95b9a1 -r afaf393d418b usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Mon Feb 14 21:42:50 2000 +0000
+++ b/usr.bin/ftp/ftp.c Mon Feb 14 21:46:26 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.90 2000/01/31 22:01:04 lukem Exp $ */
+/* $NetBSD: ftp.c,v 1.91 2000/02/14 21:46:27 lukem Exp $ */
/*-
* Copyright (c) 1996-1999 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$NetBSD: ftp.c,v 1.90 2000/01/31 22:01:04 lukem Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.91 2000/02/14 21:46:27 lukem Exp $");
#endif
#endif /* not lint */
@@ -186,7 +186,7 @@
char *port;
{
int s = -1, len, error;
-#ifdef NI_NUMERICHOST
+#if defined(NI_NUMERICHOST) && defined(INET6)
struct addrinfo hints, *res, *res0;
char hbuf[MAXHOSTNAMELEN];
#else
@@ -199,7 +199,7 @@
char *cause = "unknown";
int family;
-#ifdef NI_NUMERICHOST
+#if defined(NI_NUMERICHOST) && defined(INET6)
memset((char *)&hisctladdr, 0, sizeof (hisctladdr));
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;
Home |
Main Index |
Thread Index |
Old Index