summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-01-07 06:21:58 +0000
committerpeter <peter@FreeBSD.org>1996-01-07 06:21:58 +0000
commitcd223e7db6b0414c4da3e98d230bc6cefeabb98b (patch)
tree8d03f6d932b348beb66de18c0c5e18135ceb6db3 /usr.bin/dig
parent46b2eb17c93175d7674fcb95f7d33e84cc5f78a7 (diff)
downloadFreeBSD-src-cd223e7db6b0414c4da3e98d230bc6cefeabb98b.zip
FreeBSD-src-cd223e7db6b0414c4da3e98d230bc6cefeabb98b.tar.gz
Merge bind-4.9.3-rel stuff ont main line...
Diffstat (limited to 'usr.bin/dig')
-rw-r--r--usr.bin/dig/dig.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/dig/dig.c b/usr.bin/dig/dig.c
index 0557412..b459120 100644
--- a/usr.bin/dig/dig.c
+++ b/usr.bin/dig/dig.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$Id: dig.c,v 1.4 1995/05/30 06:29:46 rgrimes Exp $";
+static char rcsid[] = "$Id: dig.c,v 1.5 1995/08/20 22:32:37 peter Exp $";
#endif
/*
@@ -288,6 +288,7 @@ main(argc, argv)
res_init();
_res.pfcode = PRF_DEF;
qtypeSet = 0;
+ bzero(domain, (sizeof domain));
gethostname(myhostname, (sizeof myhostname));
defsrv = strcat(defbuf, inet_ntoa(_res.nsaddr.sin_addr));
res_x = _res;
@@ -648,7 +649,8 @@ main(argc, argv)
continue;
}
eecode = 0;
- __fp_resstat(NULL, stdout);
+ if (_res.pfcode & RES_PRF_HEAD1)
+ __fp_resstat(NULL, stdout);
(void) gettimeofday(&start_time, NULL);
if ((bytes_in = n = res_send(packet, n,
answer, sizeof(answer))) < 0) {
@@ -902,14 +904,19 @@ res_re_init()
static char localdomain[] = "LOCALDOMAIN";
char *buf;
long pfcode = _res.pfcode;
+#if defined(__RES) && (__RES >= 19931104)
+ long ndots = _res.ndots;
+#endif
/* this is ugly but putenv() is more portable than setenv() */
buf = malloc((sizeof localdomain) +strlen(_res.defdname) +10/*fuzz*/);
sprintf(buf, "%s=%s", localdomain, _res.defdname);
putenv(buf); /* keeps the argument, so we won't free it */
- _res.options &= ~RES_INIT;
res_init();
_res.pfcode = pfcode;
+#if defined(__RES) && (__RES >= 19931104)
+ _res.ndots = ndots;
+#endif
}
OpenPOWER on IntegriCloud