summaryrefslogtreecommitdiffstats
path: root/Modules/getnameinfo.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-12-02 10:15:37 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-12-02 10:15:37 (GMT)
commit44ddbde3aba39bd7a2edbaeb1163fa570051cab3 (patch)
tree5a4e2cb68879883080e77b85ed1beaaf9bd999ea /Modules/getnameinfo.c
parent080d5b3f0ba3a21811e3d3de35d4f8aa7cf408ad (diff)
downloadcpython-44ddbde3aba39bd7a2edbaeb1163fa570051cab3.zip
cpython-44ddbde3aba39bd7a2edbaeb1163fa570051cab3.tar.gz
cpython-44ddbde3aba39bd7a2edbaeb1163fa570051cab3.tar.bz2
Remove INET6 define. Use ENABLE_IPV6 instead.
Diffstat (limited to 'Modules/getnameinfo.c')
-rw-r--r--Modules/getnameinfo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/getnameinfo.c b/Modules/getnameinfo.c
index 4827bc6..d3c0ac5 100644
--- a/Modules/getnameinfo.c
+++ b/Modules/getnameinfo.c
@@ -58,7 +58,7 @@ static struct gni_afd {
int a_socklen;
int a_off;
} gni_afdl [] = {
-#ifdef INET6
+#ifdef ENABLE_IPV6
{PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6),
offsetof(struct sockaddr_in6, sin6_addr)},
#endif
@@ -102,7 +102,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
int family, len, i;
char *addr, *p;
u_long v4a;
-#ifdef INET6
+#ifdef ENABLE_IPV6
u_char pfx;
#endif
int h_error;
@@ -159,7 +159,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
if (v4a == 0 || v4a == IN_LOOPBACKNET)
flags |= NI_NUMERICHOST;
break;
-#ifdef INET6
+#ifdef ENABLE_IPV6
case AF_INET6:
pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0];
if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
@@ -177,7 +177,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
return ENI_MEMORY;
strcpy(host, numaddr);
} else {
-#ifdef INET6
+#ifdef ENABLE_IPV6
hp = getipnodebyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af, &h_error);
#else
hp = gethostbyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af);
@@ -190,13 +190,13 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
if (p) *p = '\0';
}
if (strlen(hp->h_name) > hostlen) {
-#ifdef INET6
+#ifdef ENABLE_IPV6
freehostent(hp);
#endif
return ENI_MEMORY;
}
strcpy(host, hp->h_name);
-#ifdef INET6
+#ifdef ENABLE_IPV6
freehostent(hp);
#endif
} else {