diff options
Diffstat (limited to 'resolv/res_query.c')
-rw-r--r-- | resolv/res_query.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/resolv/res_query.c b/resolv/res_query.c index 5b51af8451..45c591ae27 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -635,46 +635,6 @@ res_querydomain (const char *name, const char *domain, int class, int type, (__resolv_context_get (), name, domain, class, type, answer, anslen); } -const char * -__res_context_hostalias (struct resolv_context *ctx, - const char *name, char *dst, size_t siz) -{ - char *file, *cp1, *cp2; - char buf[BUFSIZ]; - FILE *fp; - - if (ctx->resp->options & RES_NOALIASES) - return (NULL); - file = getenv("HOSTALIASES"); - if (file == NULL || (fp = fopen(file, "rce")) == NULL) - return (NULL); - setbuf(fp, NULL); - buf[sizeof(buf) - 1] = '\0'; - while (fgets(buf, sizeof(buf), fp)) { - for (cp1 = buf; *cp1 && !isspace(*cp1); ++cp1) - ; - if (!*cp1) - break; - *cp1 = '\0'; - if (__libc_ns_samename(buf, name) == 1) { - while (isspace(*++cp1)) - ; - if (!*cp1) - break; - for (cp2 = cp1 + 1; *cp2 && !isspace(*cp2); ++cp2) - ; - *cp2 = '\0'; - strncpy(dst, cp1, siz - 1); - dst[siz - 1] = '\0'; - fclose(fp); - return (dst); - } - } - fclose(fp); - return (NULL); -} -libresolv_hidden_def (__res_context_hostalias) - /* Common part of res_hostalias and hostalias. */ static const char * context_hostalias_common (struct resolv_context *ctx, |