Merge bind-4.9.3-rel stuff ont main line...

This commit is contained in:
Peter Wemm 1996-01-07 06:21:58 +00:00
parent 7756c6b9ec
commit fe18bfce4b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13303
3 changed files with 46 additions and 9 deletions

View File

@ -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
}

View File

@ -70,10 +70,22 @@ char *argv[];
type = T_A;
else if (!strcasecmp(optarg, "NS"))
type = T_NS;
else if (!strcasecmp(optarg, "MD"))
type = T_MD;
else if (!strcasecmp(optarg, "MF"))
type = T_MF;
else if (!strcasecmp(optarg, "CNAME"))
type = T_CNAME;
else if (!strcasecmp(optarg, "SOA"))
type = T_SOA;
else if (!strcasecmp(optarg, "MB"))
type = T_MB;
else if (!strcasecmp(optarg, "MG"))
type = T_MG;
else if (!strcasecmp(optarg, "MR"))
type = T_MR;
else if (!strcasecmp(optarg, "NULL"))
type = T_NULL;
else if (!strcasecmp(optarg, "WKS"))
type = T_WKS;
else if (!strcasecmp(optarg, "PTR"))
@ -84,16 +96,34 @@ char *argv[];
type = T_MINFO;
else if (!strcasecmp(optarg, "MX"))
type = T_MX;
else if (!strcasecmp(optarg, "MG"))
type = T_MG;
else if (!strcasecmp(optarg, "RP"))
type = T_RP;
else if (!strcasecmp(optarg, "TXT"))
type = T_TXT;
else if (!strcasecmp(optarg, "RP"))
type = T_RP;
else if (!strcasecmp(optarg, "AFSDB"))
type = T_AFSDB;
else if (!strcasecmp(optarg, "ANY"))
type = T_ANY;
else if (!strcasecmp(optarg, "X25"))
type = T_X25;
else if (!strcasecmp(optarg, "ISDN"))
type = T_ISDN;
else if (!strcasecmp(optarg, "RT"))
type = T_RT;
else if (!strcasecmp(optarg, "NSAP"))
type = T_NSAP;
else if (!strcasecmp(optarg, "SIG"))
type = T_SIG;
else if (!strcasecmp(optarg, "KEY"))
type = T_KEY;
else if (!strcasecmp(optarg, "PX"))
type = T_PX;
else if (!strcasecmp(optarg, "GPOS"))
type = T_GPOS;
else if (!strcasecmp(optarg, "AAAA"))
type = T_AAAA;
else if (!strcasecmp(optarg, "LOC"))
type = T_LOC;
else {
fprintf(stderr, "Bad type (%s)\n", optarg);
exit(-1);

View File

@ -67,7 +67,7 @@ char copyright[] =
*/
#ifndef lint
static char rcsid[] = "$Id: host.c,v 1.4 1995/08/20 22:32:57 peter Exp $";
static char rcsid[] = "$Id: host.c,v 1.5 1995/10/23 16:07:56 peter Exp $";
#endif /* not lint */
#include <sys/types.h>
@ -813,7 +813,7 @@ pr_rr(cp, msg, file, filter)
case T_AFSDB:
case T_RT:
if (doprint)
if (type == T_MX)
if (type == T_MX && !verbose)
fprintf(file," (pri=%d) by ", _getshort(cp));
else
if (verbose)