diff options
author | Roland McGrath <roland@gnu.org> | 1995-07-26 10:14:02 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-07-26 10:14:02 +0000 |
commit | 3d61b63cc722951e3a5261e6bc3f0488eb35d441 (patch) | |
tree | 19195b08df7f3f992f0d539205df60ff690cd0f6 /resolv/res_query.c | |
parent | 958f803fc021993cc2ee1d4157d0092b830368aa (diff) | |
download | glibc-3d61b63cc722951e3a5261e6bc3f0488eb35d441.zip glibc-3d61b63cc722951e3a5261e6bc3f0488eb35d441.tar.gz glibc-3d61b63cc722951e3a5261e6bc3f0488eb35d441.tar.bz2 |
* asia, backward, europe, leapseconds, southamerica: New data from
ADO's 95e.
* inet/Makefile (routines): Removed inet_addr.
* inet/inet_addr.c: Moved to resolv/ subdirectory.
* resolv/Makefile (routines): Added inet_addr.
* resolv/inet_addr.c: Incorporated from BIND 4.9.3-BETA24 release.
* resolv/gethnamaddr.c: Likewise.
* resolv/getnetbyaddr.c: Likewise.
* resolv/getnetbyname.c: Likewise.
* resolv/getnetent.c: Likewise.
* resolv/getnetnamadr.c: Likewise.
* resolv/herror.c: Likewise.
* resolv/nsap_addr.c: Likewise.
* resolv/res_comp.c: Likewise.
* resolv/res_debug.c: Likewise.
* resolv/res_init.c: Likewise.
* resolv/res_mkquery.c: Likewise.
* resolv/res_query.c: Likewise.
* resolv/res_send.c: Likewise.
* resolv/resolv.h: Likewise.
* resolv/sethostent.c: Likewise.
* resolv/arpa/nameser.h: Likewise.
* inet/netdb.h: Incorporated from BIND 4.9.3-BETA24 release.
[__GNU_LIBRARY__]: Include <rpc/netdb.h> instead of repeating
its declarations (and doing so only #ifdef sun!).
* posix/sys/types.h [__USE_BSD] (__BIT_TYPES_DEFINED__): New macro.
[__USE_BSD] [__GNUC__] (int64_t, u_int64_t, register_t): New typedefs.
Diffstat (limited to 'resolv/res_query.c')
-rw-r--r-- | resolv/res_query.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/resolv/res_query.c b/resolv/res_query.c index 0d11889..eb0301f 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -324,6 +324,10 @@ res_querydomain(name, domain, class, type, answer, anslen) const char *longname = nbuf; int n; + if ((_res.options & RES_INIT) == 0 && res_init() == -1) { + h_errno = NETDB_INTERNAL; + return (-1); + } #ifdef DEBUG if (_res.options & RES_DEBUG) printf(";; res_querydomain(%s, %s, %d, %d)\n", @@ -356,9 +360,12 @@ __hostalias(name) char buf[BUFSIZ]; static char abuf[MAXDNAME]; + if (_res.options & RES_NOALIASES) + return (NULL); file = getenv("HOSTALIASES"); if (file == NULL || (fp = fopen(file, "r")) == NULL) return (NULL); + setbuf(fp, NULL); buf[sizeof(buf) - 1] = '\0'; while (fgets(buf, sizeof(buf), fp)) { for (cp1 = buf; *cp1 && !isspace(*cp1); ++cp1) |