diff options
Diffstat (limited to 'src/lib/libc/net/getnameinfo.c')
| -rw-r--r-- | src/lib/libc/net/getnameinfo.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/lib/libc/net/getnameinfo.c b/src/lib/libc/net/getnameinfo.c index 000ce85523..8b2ca299ef 100644 --- a/src/lib/libc/net/getnameinfo.c +++ b/src/lib/libc/net/getnameinfo.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: getnameinfo.c,v 1.6 2000/01/05 04:50:48 itojun Exp $ */ | 1 | /* $OpenBSD: getnameinfo.c,v 1.7 2000/01/17 08:15:27 itojun Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
| @@ -39,14 +39,7 @@ | |||
| 39 | * modified). | 39 | * modified). |
| 40 | */ | 40 | */ |
| 41 | 41 | ||
| 42 | #if 0 | ||
| 43 | #ifdef HAVE_CONFIG_H | ||
| 44 | #include "config.h" | ||
| 45 | #endif | ||
| 46 | #else | ||
| 47 | #define HAVE_SA_LEN | ||
| 48 | #define INET6 | 42 | #define INET6 |
| 49 | #endif | ||
| 50 | 43 | ||
| 51 | #include <sys/types.h> | 44 | #include <sys/types.h> |
| 52 | #include <sys/socket.h> | 45 | #include <sys/socket.h> |
| @@ -59,16 +52,6 @@ | |||
| 59 | #include <string.h> | 52 | #include <string.h> |
| 60 | #include <stddef.h> | 53 | #include <stddef.h> |
| 61 | 54 | ||
| 62 | #if 0 | ||
| 63 | #ifndef HAVE_PORTABLE_PROTOTYPE | ||
| 64 | #include "cdecl_ext.h" | ||
| 65 | #endif | ||
| 66 | |||
| 67 | #ifndef HAVE_ADDRINFO | ||
| 68 | #include "addrinfo.h" | ||
| 69 | #endif | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #define SUCCESS 0 | 55 | #define SUCCESS 0 |
| 73 | #define ANY 0 | 56 | #define ANY 0 |
| 74 | #define YES 1 | 57 | #define YES 1 |
| @@ -127,10 +110,8 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) | |||
| 127 | if (sa == NULL) | 110 | if (sa == NULL) |
| 128 | return ENI_NOSOCKET; | 111 | return ENI_NOSOCKET; |
| 129 | 112 | ||
| 130 | #ifdef HAVE_SA_LEN /*XXX*/ | ||
| 131 | if (sa->sa_len != salen) | 113 | if (sa->sa_len != salen) |
| 132 | return ENI_SALEN; | 114 | return ENI_SALEN; |
| 133 | #endif | ||
| 134 | 115 | ||
| 135 | family = sa->sa_family; | 116 | family = sa->sa_family; |
| 136 | for (i = 0; afdl[i].a_af; i++) | 117 | for (i = 0; afdl[i].a_af; i++) |
| @@ -180,11 +161,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) | |||
| 180 | if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a)) | 161 | if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a)) |
| 181 | flags |= NI_NUMERICHOST; | 162 | flags |= NI_NUMERICHOST; |
| 182 | v4a >>= IN_CLASSA_NSHIFT; | 163 | v4a >>= IN_CLASSA_NSHIFT; |
| 183 | #if 0 | ||
| 184 | if (v4a == 0 || v4a == IN_LOOPBACKNET) | ||
| 185 | #else | ||
| 186 | if (v4a == 0) | 164 | if (v4a == 0) |
| 187 | #endif | ||
| 188 | flags |= NI_NUMERICHOST; | 165 | flags |= NI_NUMERICHOST; |
| 189 | break; | 166 | break; |
| 190 | #ifdef INET6 | 167 | #ifdef INET6 |
