diff --context --recurs m:\bindb32/BSD/Makefile.inc m:\bindrel/BSD/Makefile.inc
*** m:\bindb32/BSD/Makefile.inc	Mon Dec 25 21:59:28 1995
--- m:\bindrel/BSD/Makefile.inc	Wed Jan 03 13:32:27 1996
***************
*** 1,12 ****
! # $Id: Makefile.inc,v 8.2 1995/06/19 08:34:25 vixie Exp $
  
! .ifndef (Mk.Inc)
! Mk.Inc?=defined
  
! BIND_DIR=	${.CURDIR}/../BIND
  
! VER!=		awk -F' *= *' '$$1 == "VER" { print $$2 ; exit }' \
! 		${BIND_DIR}/Makefile
  
  PIDDIR=		/var/run
  INDOT=
--- 1,12 ----
! # $Id: Makefile.inc,v 8.3 1995/12/31 23:28:00 vixie Exp $
  
! .ifndef (Mk.Inc)
! Mk.Inc?=defined
  
! BIND_DIR=	${.CURDIR}/../BIND
  
! VER!=		awk -F' *= *' '$$1 == "VER" { print $$2 ; exit }' \
! 		${BIND_DIR}/Makefile
  
  PIDDIR=		/var/run
  INDOT=
***************
*** 18,23 ****
--- 18,24 ----
  CONFIG?=	-DUSE_OPTIONS_H
  INCLUDE?=	-I. -I${BIND_DIR} -I${BIND_DIR}/include
  CFLAGS=		-O2 ${INCLUDE} ${CONFIG}
+ LDADD+=		-lresolv
  
  BINGRP=		bin
  BINOWN=		bin
diff --context --recurs m:\bindb32/BSD/named-xfer/Makefile m:\bindrel/BSD/named-xfer/Makefile
*** m:\bindb32/BSD/named-xfer/Makefile	Mon Dec 25 21:59:28 1995
--- m:\bindrel/BSD/named-xfer/Makefile	Wed Jan 03 13:32:26 1996
***************
*** 1,10 ****
! # $Id: Makefile,v 8.1 1994/12/15 06:23:46 vixie Exp $
! 
! .PATH:	${.CURDIR}/../BIND/named \
! 	${.CURDIR}/../BIND/man
! 
! PROG=	named-xfer
! SRCS=	named-xfer.c db_glue.c storage.c dmalloc.c
  #LDADD+=	-lutil
  #DPADD+=	${LIBUTIL}
  
--- 1,11 ----
! # $Id: Makefile,v 8.2 1995/12/31 23:28:01 vixie Exp $
! 
! .PATH:	${.CURDIR}/../BIND/named \
! 	${.CURDIR}/../named \
! 	${.CURDIR}/../BIND/man
! 
! PROG=	named-xfer
! SRCS=	named-xfer.c db_glue.c storage.c dmalloc.c version.c
  #LDADD+=	-lutil
  #DPADD+=	${LIBUTIL}
  
diff --context --recurs m:\bindb32/CHANGES m:\bindrel/CHANGES
*** m:\bindb32/CHANGES	Mon Dec 25 21:59:29 1995
--- m:\bindrel/CHANGES	Wed Jan 03 13:32:28 1996
***************
*** 1,4 ****
! $Id: CHANGES,v 8.23 1995/12/25 07:48:08 vixie Exp $
  
  	--- 4.9.3-beta32 released ---
  
--- 1,56 ----
! $Id: CHANGES,v 8.26 1995/12/31 23:27:58 vixie Exp $
! 
! 	--- 4.9.3-rel released ---
! 
! 573. [contrib]	put in "951231" version of contrib/host.
! 
! 572. [doc]	new file doc/info/SCO-2 concerning <sys/param.h> porting.
! 
! 571. [bug]	zones whose master files contained only $INCLUDEs were
! 		incorrectly considered to not have any RR's (old bug.)
! 
! 570. [doc]	trivial man/named.8 tweak.
! 
! 569. [doc]	minor documentation tweak to shres/solaris/ISSUES.
! 
! 	--- 4.9.3-beta34 released ---
! 
! 568. [bug]	very minor initialization bug fixed in tools/dig.c.
! 
! 567. [bug]	disabled VALIDATE; all this code is trash and will be removed
! 		along with ALLOW_UPDATES very early in the next alpha cycle.
! 		we are now back to the B26 level of stability, with several
! 		minor bug fixes from intervening betas.
! 
! 566. [bug]	fixed memory leak introduced in #565.
! 
! 	--- 4.9.3-beta33 released ---
! 
! 565. [proto]	we were generating truncated RRsets due to VALIDATE bugs.
! 
! 564. [proto]	we weren't stopping early enough on some kinds of truncation.
! 
! 563. [doc]	added doc/info/Solaris, concerning Sun Patch-ID# 102165-02.
! 
! 562. [bug]	named/ns_resp.c had an overzealous #ifdef.
! 
! 561. [port]	tools/nslookup/getinfo.c had an ANSI C nit.
! 
! 560. [port]	shres/netbsd and Makefile's netbsd stuff was wrong.
! 
! 559. [doc]	shres/* documentation had more pathname problems.
! 
! 558. [port]	SCO OSE5 portability problem (minor).
! 
! 557. [doc]	added doc/misc/style.txt out of my archives.
! 
! 556. [contrib]	updated contrib/arlib, contrib/dnsparse (really!).
! 
! 555. [bug]	quoted newlines were still broken even after #509.
! 
! 554. [bug]	dangling CNAME cache chains could make named dump core.
! 
! 553. [bug]	forwarders didn't work well with VALIDATE.
  
  	--- 4.9.3-beta32 released ---
  
diff --context --recurs m:\bindb32/Makefile m:\bindrel/Makefile
*** m:\bindb32/Makefile	Mon Dec 25 21:59:29 1995
--- m:\bindrel/Makefile	Wed Jan 03 13:32:27 1996
***************
*** 1,16 ****
  # Makefile for BIND>=4.9 top level
  # vixie@decwrl December, 1992 [original]
  #
! # $Id: Makefile,v 8.24 1995/12/25 07:48:08 vixie Exp $
  
! ## ++Copyright++ 1989
  ## -
! ## Copyright (c) 1989
! ##    The Regents of the University of California.  All rights reserved.
  ## 
! ## Redistribution and use in source and binary forms, with or without
! ## modification, are permitted provided that the following conditions
! ## are met:
  ## 1. Redistributions of source code must retain the above copyright
  ##    notice, this list of conditions and the following disclaimer.
  ## 2. Redistributions in binary form must reproduce the above copyright
--- 1,16 ----
  # Makefile for BIND>=4.9 top level
  # vixie@decwrl December, 1992 [original]
  #
! # $Id: Makefile,v 8.27 1995/12/31 23:27:58 vixie Exp $
  
! ## ++Copyright++ 1989
  ## -
! ## Copyright (c) 1989
! ##    The Regents of the University of California.  All rights reserved.
  ## 
! ## Redistribution and use in source and binary forms, with or without
! ## modification, are permitted provided that the following conditions
! ## are met:
  ## 1. Redistributions of source code must retain the above copyright
  ##    notice, this list of conditions and the following disclaimer.
  ## 2. Redistributions in binary form must reproduce the above copyright
***************
*** 56,62 ****
  ## -
  ## --Copyright--
  
! VER = 4.9.3-BETA32
  SHELL = /bin/sh
  MAKE = make
  DESTDIR =
--- 56,62 ----
  ## -
  ## --Copyright--
  
! VER = 4.9.3-REL
  SHELL = /bin/sh
  MAKE = make
  DESTDIR =
***************
*** 102,107 ****
--- 102,113 ----
  SHCC =
  SHLD =
  
+ # (NetBSD - for details on shared library building, see shres/netbsd/INSTALL)
+ #uncomment next three lines to build a shared library version of libresolv
+ #SHRES = shres/netbsd
+ #SHCC = cc
+ #PIC = -fpic
+ 
  #(Linux - on modern systems, all you need to do is rename or remove
  # compat/include/sys/cdefs.h.  See doc/info/Linux for more information.)
  #CC = gcc $(CPPFLAGS)
***************
*** 243,248 ****
--- 249,257 ----
  #to emulate this naming, INDOT should be set to 'in.' while XFER_INDOT 
  #should be empty. also, under solaris2.x, use 'make install' at your own risk.
  #don't include sys/stream.h via netinet/in.h by defining _SYS_STREAM_H.
+ #->and note that sun moved their nslookup to /usr/sbin for some odd reason;
+ #  when you install this one in /usr/bin you should delete sun's or else you
+ #  will get confusing results since you never know which nslookup you're using.
  #PIDDIR = /etc
  #LEX = lex
  #uncomment next line for Sun C compiler
diff --context --recurs m:\bindb32/OPTIONS m:\bindrel/OPTIONS
*** m:\bindb32/OPTIONS	Mon Dec 25 21:59:29 1995
--- m:\bindrel/OPTIONS	Wed Jan 03 13:32:27 1996
***************
*** 1,15 ****
  OPTIONS
      Original: Paul Vixie, 28Mar92
!     Revised: $Id: OPTIONS,v 8.4 1995/12/24 06:43:57 vixie Exp $
  
! Options available in this version of BIND are controlled by conf/options.h,
! rather than by $(DEFS) in the Makefile.  The options are:
  
! DEBUG (origin: U C Berkeley)
! 	enables the -d command line option, and allows SIGUSR1 to increment
! and SIGUSR2 to clear the internal variable "debug", which in turn controls
! hundreds of fprintf()'s out to /usr/tmp/named.run.
! 	you probably want this.  it makes the binary bigger but not slower (or
  at least not much slower), but SIGUSR[12] are the only way you'll track down
  misconfigured name servers that hose you down with billions of bogus requests.
  	you may need this, it is on by default.
--- 1,15 ----
  OPTIONS
      Original: Paul Vixie, 28Mar92
!     Revised: $Id: OPTIONS,v 8.5 1995/12/29 21:08:13 vixie Exp $
  
! Options available in this version of BIND are controlled by conf/options.h,
! rather than by $(DEFS) in the Makefile.  The options are:
  
! DEBUG (origin: U C Berkeley)
! 	enables the -d command line option, and allows SIGUSR1 to increment
! and SIGUSR2 to clear the internal variable "debug", which in turn controls
! hundreds of fprintf()'s out to /usr/tmp/named.run.
! 	you probably want this.  it makes the binary bigger but not slower (or
  at least not much slower), but SIGUSR[12] are the only way you'll track down
  misconfigured name servers that hose you down with billions of bogus requests.
  	you may need this, it is on by default.
***************
*** 203,209 ****
  authoritative (for validation purposes) for even the sub-domains that it has
  delegated to others. RRs are validated against the data we have in cache
  already. Invalid records are neither cached nor returned.
! 	it is on by default.
  
  NCACHE (origin: USC/ISI)
  	enables negative caching. We cache only authoritative NXDOMAIN or
--- 203,210 ----
  authoritative (for validation purposes) for even the sub-domains that it has
  delegated to others. RRs are validated against the data we have in cache
  already. Invalid records are neither cached nor returned.
! 	it is off by default because it is hopeless, and the code will all
! be ripped out of BIND in the near future.
  
  NCACHE (origin: USC/ISI)
  	enables negative caching. We cache only authoritative NXDOMAIN or
diff --context --recurs m:\bindb32/README m:\bindrel/README
*** m:\bindb32/README	Mon Dec 25 21:59:28 1995
--- m:\bindrel/README	Wed Jan 03 13:32:27 1996
***************
*** 1,15 ****
! The official way to get BIND is:	ftp ftp.vix.com		NOT TRUE YET!!
! 					cd pub/bind		NOT TRUE YET!!
! 					binary			NOT TRUE YET!!
! 					get bind.tar.gz		NOT TRUE YET!!
! 
! The official mailing lists are:		bind-users@vix.com	- users/admins
!   (use *-request@* for admin mail)	bind-workers@vix.com	- developers
! 
! The official Usenet newsgroups are:	comp.protocols.tcp-ip.domains
! 					
  BIND is currently sponsored by:		The Internet Software Consortium
  					(send to <info@isc.org> for details.)
  
  ----- 4.9.3 BETA11, BETA12 release - December, 1994 - paul@vix.com
  
--- 1,19 ----
! The official way to get BIND is:	ftp ftp.vix.com
! 					cd pub/bind/release
! 					binary
! 					get bind.tar.gz
! 
! The official mailing lists are:		bind-users@vix.com	- users/admins
!   (use *-request@* for admin mail)	bind-workers@vix.com	- developers
! 
! The official Usenet newsgroups are:	comp.protocols.tcp-ip.domains
! 					
  BIND is currently sponsored by:		The Internet Software Consortium
  					(send to <info@isc.org> for details.)
+ 
+ ----- 4.9.3 BETA33 - December, 1995 - paul@vix.com
+ 
+ Take a look around in doc/misc/ and contrib/.  Reread INSTALL.  Have fun.
  
  ----- 4.9.3 BETA11, BETA12 release - December, 1994 - paul@vix.com
  
Only in m:\bindrel: bind-4.9.3-REL.tar
diff --context --recurs m:\bindb32/conf/options.h m:\bindrel/conf/options.h
*** m:\bindb32/conf/options.h	Mon Dec 25 21:59:16 1995
--- m:\bindrel/conf/options.h	Wed Jan 03 13:32:09 1996
***************
*** 1,16 ****
  /* options.h - specify the conditionally-compiled features
   * vix 28mar92 [moved out of the Makefile because they were getting too big]
   *
!  * $Id: options.h,v 8.6 1995/12/22 10:20:19 vixie Exp $
   */
  
! /*
!  * ++Copyright++
   * -
!  * Copyright (c) 
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,16 ----
  /* options.h - specify the conditionally-compiled features
   * vix 28mar92 [moved out of the Makefile because they were getting too big]
   *
!  * $Id: options.h,v 8.7 1995/12/29 21:08:13 vixie Exp $
   */
  
! /*
!  * ++Copyright++
   * -
!  * Copyright (c) 
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 95,101 ****
  #define DOTTED_SERIAL	/* if you want to be able to specify dotted serial#s */
  /*#define SENSIBLE_DOTS	/* if you want dotted serial#s to make numeric sense */
  #define NCACHE		/* negative caching (anant@isi.edu) */
! #define VALIDATE	/* validation procedure (anant@isi.edu, marka) */
  /*#define SHORT_FNAMES	/* file names used in named-xfer need to be short */
  #define RESOLVSORT	/* allow sorting of addresses in gethostbyname (mpa) */
  #define STUBS		/* allow transfers of NS only for a zone (mpa) */
--- 95,101 ----
  #define DOTTED_SERIAL	/* if you want to be able to specify dotted serial#s */
  /*#define SENSIBLE_DOTS	/* if you want dotted serial#s to make numeric sense */
  #define NCACHE		/* negative caching (anant@isi.edu) */
! /*#define VALIDATE	/* validation procedure (anant@isi.edu) (BUGGY!) */
  /*#define SHORT_FNAMES	/* file names used in named-xfer need to be short */
  #define RESOLVSORT	/* allow sorting of addresses in gethostbyname (mpa) */
  #define STUBS		/* allow transfers of NS only for a zone (mpa) */
diff --context --recurs m:\bindb32/contrib/arlib/Makefile m:\bindrel/contrib/arlib/Makefile
*** m:\bindb32/contrib/arlib/Makefile	Tue Jan 10 12:17:07 1995
--- m:\bindrel/contrib/arlib/Makefile	Wed Jan 03 13:32:20 1996
***************
*** 1,16 ****
  #
! # (C)1992, 1994 by Darren Reed.
! # avalon@coombs.anu.edu.au
! #
! CC=cc
! RM=/bin/rm
! MV=/bin/mv
! CP=/bin/cp
! CHMOD=/bin/chmod
! CFLAGS=-g -I../../include
! LIBDIR=/usr/local/lib
  MANDIR=/usr/local/man
! RES=-L../../res/ -lresolv -l44bsd
  
  all: libares.a example
  
--- 1,16 ----
  #
! # (C)1992, 1994, 1995 by Darren Reed.
! # darrenr@cyber.com.au
! #
! CC=cc
! RM=/bin/rm
! MV=/bin/mv
! CP=/bin/cp
! CHMOD=/bin/chmod
! CFLAGS=-g -I../../include -I../../compat/include
! LIBDIR=/usr/local/lib
  MANDIR=/usr/local/man
! RES=-L../../res/ -lresolv #-l44bsd
  
  all: libares.a example
  
diff --context --recurs m:\bindb32/contrib/arlib/arlib.c m:\bindrel/contrib/arlib/arlib.c
*** m:\bindb32/contrib/arlib/arlib.c	Mon Apr 18 19:56:28 1994
--- m:\bindrel/contrib/arlib/arlib.c	Wed Jan 03 13:32:19 1996
***************
*** 27,42 ****
  static	char	ar_dot[] = ".";
  static	int	ar_resfd = -1, ar_vc = 0;
  static	struct	reslist	*ar_last, *ar_first;
  
  /*
!  * Statistics structure.
   */
! static	struct	resstats {
! 	int	re_errors;
! 	int	re_nu_look;
! 	int	re_na_look;
! 	int	re_replies;
! 	int	re_requests;
  	int	re_resends;
  	int	re_sent;
  	int	re_timeouts;
--- 27,43 ----
  static	char	ar_dot[] = ".";
  static	int	ar_resfd = -1, ar_vc = 0;
  static	struct	reslist	*ar_last, *ar_first;
+ static	int	do_query_name(), do_query_number(), ar_resend_query();
  
  /*
!  * Statistics structure.
   */
! static	struct	resstats {
! 	int	re_errors;
! 	int	re_nu_look;
! 	int	re_na_look;
! 	int	re_replies;
! 	int	re_requests;
  	int	re_resends;
  	int	re_sent;
  	int	re_timeouts;
***************
*** 94,101 ****
--- 95,104 ----
  	    {
  		if (_res.options & RES_USEVC)
  		    {
+ 			struct	sockaddr_in *sip;
  			int	i;
  
+ 			sip = _res.nsaddr_list;
  			ar_vc = 1;
  			ar_resfd = socket(AF_INET, SOCK_STREAM, 0);
  
***************
*** 103,109 ****
  			 * Try each name server listed in sequence until we
  			 * succeed or run out.
  			 */
! 			while (connect(ar_resfd, &(_res.nsaddr_list[i++]),
  					sizeof(struct sockaddr)))
  			    {
  				(void)close(ar_resfd);
--- 106,112 ----
  			 * Try each name server listed in sequence until we
  			 * succeed or run out.
  			 */
! 			while (connect(ar_resfd, (struct sockaddr *)sip++,
  					sizeof(struct sockaddr)))
  			    {
  				(void)close(ar_resfd);
***************
*** 344,350 ****
  		for (i = 0; i < rcount; i++)
  		    {
  			if (sendto(ar_resfd, msg, len, 0,
! 				   &(_res.nsaddr_list[i]),
  				sizeof(struct sockaddr_in)) == len)
  			    {
  				ar_reinfo.re_sent++;
--- 347,353 ----
  		for (i = 0; i < rcount; i++)
  		    {
  			if (sendto(ar_resfd, msg, len, 0,
! 				   (struct sockaddr *)&(_res.nsaddr_list[i]),
  				sizeof(struct sockaddr_in)) == len)
  			    {
  				ar_reinfo.re_sent++;
***************
*** 473,479 ****
  	char	hname[65];
  	int	len;
  
! 	len = strlen(strncpy(hname, name, sizeof(hname)-1));
  
  	if (rptr && (hname[len-1] != '.'))
  	    {
--- 476,482 ----
  	char	hname[65];
  	int	len;
  
! 	len = strlen((char *)strncpy(hname, name, sizeof(hname)-1));
  
  	if (rptr && (hname[len-1] != '.'))
  	    {
diff --context --recurs m:\bindb32/contrib/arlib/arlib.h m:\bindrel/contrib/arlib/arlib.h
*** m:\bindb32/contrib/arlib/arlib.h	Mon Dec 25 21:59:24 1995
--- m:\bindrel/contrib/arlib/arlib.h	Wed Jan 03 13:32:20 1996
***************
*** 53,59 ****
  extern	int     ar_gethostbyaddr(char *, char *, int);
  extern	int     ar_init(int);
  extern	int     ar_open();
! extern	long    ar_timeout(long, char *, int);
  #else
  extern	struct	hostent	*ar_answer();
  extern	void    ar_close();
--- 53,59 ----
  extern	int     ar_gethostbyaddr(char *, char *, int);
  extern	int     ar_init(int);
  extern	int     ar_open();
! extern	long    ar_timeout(time_t, char *, int);
  #else
  extern	struct	hostent	*ar_answer();
  extern	void    ar_close();
diff --context --recurs m:\bindb32/contrib/arlib/sample.c m:\bindrel/contrib/arlib/sample.c
*** m:\bindb32/contrib/arlib/sample.c	Mon Feb 21 07:02:57 1994
--- m:\bindrel/contrib/arlib/sample.c	Wed Jan 03 13:32:20 1996
***************
*** 58,72 ****
  		if (isalpha(*line))
  		{
  			(void)printf("Asking about [%s] #%d.\n",line, ++seq);
! 			(void)ar_gethostbyname(line, &seq, sizeof(seq));
! 			lookup++;
! 		}
! 		else if (isdigit(*line))
! 		{
! 			(void)printf("Asking about IP#[%s] #%d.\n",
! 				line, ++seq);
! 			adr.s_addr = inet_addr(line);
! 			(void)ar_gethostbyaddr(&adr, &seq, sizeof(seq));
  			lookup++;
  		}
  		if (lookup)
--- 58,73 ----
  		if (isalpha(*line))
  		{
  			(void)printf("Asking about [%s] #%d.\n",line, ++seq);
! 			(void)ar_gethostbyname(line, (char *)&seq, sizeof(seq));
! 			lookup++;
! 		}
! 		else if (isdigit(*line))
! 		{
! 			(void)printf("Asking about IP#[%s] #%d.\n",
! 				line, ++seq);
! 			adr.s_addr = inet_addr(line);
! 			(void)ar_gethostbyaddr((char *)&adr, (char *)&seq,
! 						sizeof(seq));
  			lookup++;
  		}
  		if (lookup)
diff --context --recurs m:\bindb32/contrib/dnsparse/README m:\bindrel/contrib/dnsparse/README
*** m:\bindb32/contrib/dnsparse/README	Tue Sep 11 18:07:27 1990
--- m:\bindrel/contrib/dnsparse/README	Wed Jan 03 13:32:13 1996
***************
*** 1,13 ****
!   $Id: README,v 2.0 90/09/11 11:06:43 hakanson Rel $
  
  --------------------------------------------------------------------------
  
! 			dnsparse kit, version 2.0
  
! 		 Copyright (c) 1990, Marion Hakanson
  
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 1, or (at your option)
      any later version.
  
--- 1,13 ----
!   $Id: README,v 2.6 1995/12/24 20:17:42 hakanson Rel $
  
  --------------------------------------------------------------------------
  
! 			dnsparse kit, version 2.1
  
! 		 Copyright (c) 1990, 1991, Marion Hakanson
  
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 1, or (at your option)
      any later version.
  
***************
*** 28,48 ****
  
  To run dns2hosts, or anything which uses the dnsparse.pl library
  (currently just dnstest and dnsmkptr), one must first compile
! "dnslex.c" into a program "dnslex" and install it somewhere in your
! search path.  The "dnsparse.pl" file must also be somewhere in the
! perl library search path, and perl must be available.
  
  Typically how one generates new host table(s) from the DNS zone files is
  to have the zones and their master file pathnames in "zonelist", and
! then do something like (in csh syntax):
! 
! set ver=YY.MM.DD
! foreach dom ( ogi admin.ogi cbs.ogi cse.ogi ese.ogi mse.ogi )
!   echo $dom
!   set fil="HOSTS.${dom}.$ver"
!   ./dns2hosts -d${dom}.edu `cat zonelist` > $fil
!   chmod a-w,a+r $fil
! end
  
  NOTE: you may need to edit by hand to reorder multiply-homed hosts!
  
--- 28,42 ----
  
  To run dns2hosts, or anything which uses the dnsparse.pl library
  (currently just dnstest and dnsmkptr), one must first compile
! "dnslex.c" into a program "dnslex" in the current directory, as the
! "dnsparse.pl" library will invoke it as "./dnslex".  Feel free to
! modify the invocation path to suit your needs.  The "dnsparse.pl" file
! must also be somewhere in the perl library search path, and perl must
! be available.
  
  Typically how one generates new host table(s) from the DNS zone files is
  to have the zones and their master file pathnames in "zonelist", and
! then use the enclosed "mkhosts" script to spit out zone-specific files.
  
  NOTE: you may need to edit by hand to reorder multiply-homed hosts!
  
***************
*** 62,66 ****
  it requires further study.
  
  -- 
! Marion Hakanson         Domain: hakanson@cse.ogi.edu
!                         UUCP  : {hp-pcd,tektronix}!ogicse!hakanson
--- 56,59 ----
  it requires further study.
  
  -- 
! Marion Hakanson <hakanson@cse.ogi.edu>
diff --context --recurs m:\bindb32/contrib/dnsparse/dnslex.c m:\bindrel/contrib/dnsparse/dnslex.c
*** m:\bindb32/contrib/dnsparse/dnslex.c	Mon Dec 25 21:59:20 1995
--- m:\bindrel/contrib/dnsparse/dnslex.c	Wed Jan 03 13:32:13 1996
***************
*** 1,14 ****
  #ifndef lint
! char rcsid_[] = "Id: dnslex.c,v 2.0 90/09/11 11:07:31 hakanson Rel $";
! char rcsid[] = "BIND $Id: dnslex.c,v 1.2 1994/04/09 03:43:03 vixie Exp $";
! #endif /* lint */
  
  /*
!  * A lexical analyzer for DNS master files.
!  *   Marion Hakanson (hakanson@cse.ogi.edu)
!  *   Oregon Graduate Institute of Science and Technology
   *
!  * Copyright (c) 1990, Marion Hakanson.
   *
   * You may distribute under the terms of the GNU General Public License
   * as specified in the README file that comes with the dnsparse kit.
--- 1,13 ----
  #ifndef lint
! char rcsid[] = "$Id: dnslex.c,v 2.1 1991/08/29 15:45:49 hakanson Rel $";
! #endif /* lint */
  
  /*
!  * A lexical analyzer for DNS master files.
!  *   Marion Hakanson (hakanson@cse.ogi.edu)
!  *   Oregon Graduate Institute of Science and Technology
   *
!  * Copyright (c) 1990, Marion Hakanson.
   *
   * You may distribute under the terms of the GNU General Public License
   * as specified in the README file that comes with the dnsparse kit.
***************
*** 37,63 ****
  
  #include <stdio.h>
  
! #if !defined(SYSV) && !defined(__STDC__)
  #define strchr index	/* system dependent */
! #define strrchr index
  extern char *strchr(), *strrchr();
- #endif
  
  extern getopt(), optind, opterr;
  extern char *optarg;
- 
- /*
-  *  Because Convex has true library function feof() which is
-  *  patently wrong (it test bit _IOREAD) we need feof() as
-  *  a macro.
-  *  Because also stdio.h is also broken on ConvexOS 10.2 we
-  *  don't get the macro. So we are left to our own devices
-  *  with it.
-  */
- 
- #if defined(__convex__) && !defined(feof)
- #  define   feof(p)	((p)->_flag&_IOEOF)
- #endif
  
  #define FALSE 0
  #define TRUE  1
--- 36,49 ----
  
  #include <stdio.h>
  
! #ifdef BSD
  #define strchr index	/* system dependent */
! #define strrchr rindex
! #endif /* BSD */
  extern char *strchr(), *strrchr();
  
  extern getopt(), optind, opterr;
  extern char *optarg;
  
  #define FALSE 0
  #define TRUE  1
diff --context --recurs m:\bindb32/contrib/dnsparse/dnsparse.pl m:\bindrel/contrib/dnsparse/dnsparse.pl
*** m:\bindb32/contrib/dnsparse/dnsparse.pl	Tue Sep 11 18:07:39 1990
--- m:\bindrel/contrib/dnsparse/dnsparse.pl	Wed Jan 03 13:32:14 1996
***************
*** 1,15 ****
  #!/usr/bin/perl
  #
! # $Id: dnsparse.pl,v 2.0 90/09/11 11:07:36 hakanson Rel $
  #
! # Subroutines to parse DNS master (RFC-1035) format files.
! #   Marion Hakanson (hakanson@cse.ogi.edu)
! #   Oregon Graduate Institute of Science and Technology
  #
! # Copyright (c) 1990, Marion Hakanson.
  #
! # You may distribute under the terms of the GNU General Public License
! # as specified in the README file that comes with the dnsparse kit.
  #
  # Note that this file is not standalone.  It requires the dnslex C program,
  # and it provides subroutines for a calling Perl program.
--- 1,15 ----
  #!/usr/bin/perl
  #
! # $Id: dnsparse.pl,v 2.1 1993/10/21 00:58:32 bruce Rel $
  #
! # Subroutines to parse DNS master (RFC-1035) format files.
! #   Marion Hakanson (hakanson@cse.ogi.edu)
! #   Oregon Graduate Institute of Science and Technology
  #
! # Copyright (c) 1990, Marion Hakanson.
  #
! # You may distribute under the terms of the GNU General Public License
! # as specified in the README file that comes with the dnsparse kit.
  #
  # Note that this file is not standalone.  It requires the dnslex C program,
  # and it provides subroutines for a calling Perl program.
***************
*** 38,44 ****
  $prog =~ s?^.*/??;
  
  # Defaults
! $dnslex = 'dnslex';
  $delim  = ':';
  
  # Package globals
--- 38,44 ----
  $prog =~ s?^.*/??;
  
  # Defaults
! $dnslex = './dnslex';
  $delim  = ':';
  
  # Package globals
Only in m:\bindrel/contrib/dnsparse: domlist
Only in m:\bindrel/contrib/dnsparse: mkhosts
diff --context --recurs m:\bindb32/contrib/dnsparse/zonelist m:\bindrel/contrib/dnsparse/zonelist
*** m:\bindb32/contrib/dnsparse/zonelist	Thu Jan 25 23:55:31 1990
--- m:\bindrel/contrib/dnsparse/zonelist	Wed Jan 03 13:32:14 1996
***************
*** 1,12 ****
! /usr/local/named/conf/zone.ogi,ogi.edu
! /usr/local/named/conf/zone.ogi.admin,admin.ogi.edu
! /usr/local/named/conf/zone.ogi.cbs,cbs.ogi.edu
! /usr/local/named/conf/zone.ogi.cse,cse.ogi.edu
! /usr/local/named/conf/zone.ogi.ese,ese.ogi.edu
! /usr/local/named/conf/zone.ogi.mse,mse.ogi.edu
! /usr/local/named/conf/zone.ogc,ogc.edu
! /usr/local/named/conf/zone.ogc.admin,admin.ogc.edu
! /usr/local/named/conf/zone.ogc.cbs,cbs.ogc.edu
! /usr/local/named/conf/zone.ogc.cse,cse.ogc.edu
! /usr/local/named/conf/zone.ogc.ese,ese.ogc.edu
! /usr/local/named/conf/zone.ogc.mse,mse.ogc.edu
--- 1,10 ----
! /usr/etc/local/named/conf/zone.ogi,ogi.edu
! /usr/etc/local/named/conf/zone.ogi.admin,admin.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.atmos,atmos.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.cbs,cbs.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.ccalmr,ccalmr.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.conted,conted.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.cse,cse.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.eeap,eeap.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.ese,ese.ogi.edu
! /usr/etc/local/named/conf/zone.ogi.mse,mse.ogi.edu
diff --context --recurs m:\bindb32/contrib/host/Makefile m:\bindrel/contrib/host/Makefile
*** m:\bindb32/contrib/host/Makefile	Tue Oct 24 22:43:17 1995
--- m:\bindrel/contrib/host/Makefile	Sat Dec 30 22:24:39 1995
***************
*** 1,13 ****
! #	@(#)Makefile            e07@nikhef.nl (Eric Wassenaar) 951024
  
  # ----------------------------------------------------------------------
! # Adapt the installation directories to your local standards.
  # ----------------------------------------------------------------------
  
! # This is where the host executable will go.
! DESTBIN = /usr/local/bin
  
! # This is where the host manual page will go.
  DESTMAN = /usr/local/man
  
  BINDIR = $(DESTBIN)
--- 1,13 ----
! #	@(#)Makefile            e07@nikhef.nl (Eric Wassenaar) 951230
  
  # ----------------------------------------------------------------------
! # Adapt the installation directories to your local standards.
  # ----------------------------------------------------------------------
  
! # This is where the host executable will go.
! DESTBIN = /usr/local/bin
  
! # This is where the host manual page will go.
  DESTMAN = /usr/local/man
  
  BINDIR = $(DESTBIN)
***************
*** 22,27 ****
--- 22,31 ----
  SYSDEFS = -D_BSD -D_BSD_INCLUDES -U__STR__ -DBIT_ZERO_ON_LEFT
  #endif
   
+ #if defined(SCO) && You have either OpenDeskTop 3 or OpenServer 5
+ SYSDEFS = -DSYSV
+ #endif
+  
  #if defined(ultrix) && You are using the default ultrix <resolv.h>
  SYSDEFS = -DULTRIX_RESOLV
  #endif
***************
*** 87,99 ****
--- 91,108 ----
  # Linking definitions.
  # libresolv.a should contain the resolver library of BIND 4.8.2 or later.
  # Link it in only if your default library is different.
+ # SCO keeps its own default resolver library inside libsocket.a
+ #
  # lib44bsd.a contains various utility routines, and comes with BIND 4.9.*
  # You may need it if you link with the 4.9.* resolver library.
+ #
  # libnet.a contains the getnet...() getserv...() getproto...() calls.
  # It is safe to leave it out and use your default library.
  # With BIND 4.9.3 the getnet...() calls are in the resolver library.
  # ----------------------------------------------------------------------
  
+ RES = -lsocket				#if defined(SCO) && default
+ RES =
  RES = ../res/libresolv.a
  RES = -lresolv
  
***************
*** 178,183 ****
--- 187,193 ----
  ABBREVIATIONS = mb mg mr minfo				# deprecated
  ABBREVIATIONS = md mf null				# obsolete
  ABBREVIATIONS = rp afsdb x25 isdn rt nsap nsap-ptr	# new
+ ABBREVIATIONS = sig key px gpos aaaa loc		# very new
  ABBREVIATIONS = uinfo uid gid unspec			# nonstandard
  ABBREVIATIONS = maila mailb any				# filters
  
diff --context --recurs m:\bindb32/contrib/host/RELEASE_NOTES m:\bindrel/contrib/host/RELEASE_NOTES
*** m:\bindb32/contrib/host/RELEASE_NOTES	Tue Oct 24 22:38:07 1995
--- m:\bindrel/contrib/host/RELEASE_NOTES	Sat Dec 30 23:35:40 1995
***************
*** 1,15 ****
! 	@(#)RELEASE_NOTES       e07@nikhef.nl (Eric Wassenaar) 951024
  
! yymmdd		Description of changes per release
! TODO		Things that still need to be done
! WISHLIST	Wishes expressed by various people
! NOTES		Important issues to keep in mind
! MISC		Miscellaneous reminders
  
  # ----------------------------------------------------------------------
! # Description of changes per release
  # ----------------------------------------------------------------------
  
  951024
  	Avoid potential alignment conflicts.
  		Allocate socket addresses of type struct sockaddr_in
--- 1,23 ----
! 	@(#)RELEASE_NOTES       e07@nikhef.nl (Eric Wassenaar) 951231
  
! yymmdd		Description of changes per release
! TODO		Things that still need to be done
! WISHLIST	Wishes expressed by various people
! NOTES		Important issues to keep in mind
! MISC		Miscellaneous reminders
  
  # ----------------------------------------------------------------------
! # Description of changes per release
  # ----------------------------------------------------------------------
  
+ 951231
+ 	Cosmetic changes.
+ 		Print all relevant messages in debug mode to stdout,
+ 		and appropriately prefix them with ";; " to conform
+ 		with the BIND 4.9.3 conventions.
+ 	Miscellaneous changes.
+ 		Consider the all-ones broadcast address a fake address.
+ 
  951024
  	Avoid potential alignment conflicts.
  		Allocate socket addresses of type struct sockaddr_in
***************
*** 695,700 ****
--- 703,709 ----
  		the BIND 4.8 version. This utility can handle both versions,
  		but you cannot link with an 4.9 library after compilation
  		with the 4.8 include files, and vice versa.
+ 
  	Old resolver libraries.
  		The res_mkquery() routine in the SUN-supplied resolver
  		library on SunOS <= 4.1.3 adds the default domain to given
***************
*** 705,721 ****
--- 714,733 ----
  		This will not be fixed in host. The documentation states that
  		you need BIND 4.8.2 or higher.
  		Problem noted by Peter Koch <pk@TechFak.Uni-Bielefeld.DE>.
+ 
  	Vendor-specific resolver libraries.
  		Some vendors supply resolver libraries with configurable
  		lookup strategies for gethostbyname/gethostbyaddr, e.g. to
  		consult DNS, NIS, /etc/hosts, or other databases, in specific
  		order. Such libraries are to be avoided when linking host.
  		It is meant to query the DNS and DNS only.
+ 
  	SUN's resolver library on solaris 2.x
  		If you are on solaris 2.x and you don't have a proper BIND
  		resolver library to link with, but have to use the broken
  		default library, you can define NO_YP_LOOKUP in the Makefile
  		to prevent gethostbyname/gethostbyaddr querying the YP/NIS.
+ 		SUN will probably implement BIND 4.9.3 after its release.
  
  # ----------------------------------------------------------------------
  # MISC
***************
*** 731,736 ****
--- 743,749 ----
  		  Affects the varargs modules.
  		Suggestions by Dietrich Wiegandt <dietrich@dxcern.cern.ch>
  		and David Cherkus <cherkus@zk3.dec.com>.
+ 
  	Compatibility with BIND 4.9.
  		Don't use the u_long types any more.
  		The 'struct state' is now 'struct __res_state'.
***************
*** 738,745 ****
--- 751,760 ----
  		New resolver library prints to stdout with leading ";" but
  		unfortunately not everywhere. It prints to stderr sometimes
  		also with ";" but does not so in the perror() messages.
+ 		(Things have been corrected in BIND 4.9.3).
  		BIND 4.9 prints FQDN with trailing dot.
  		BIND 4.9 prints TXT strings within double quotes.
+ 
  	New features of BIND 4.9.3.
  		Don't use sizeof() for u_int, u_short, struct in_addr, and
  		HEADER, but use predefined constants for entities that have
diff --context --recurs m:\bindb32/contrib/host/conf.h m:\bindrel/contrib/host/conf.h
*** m:\bindb32/contrib/host/conf.h	Sat Mar 18 14:54:11 1995
--- m:\bindrel/contrib/host/conf.h	Sat Dec 30 22:34:12 1995
***************
*** 1,16 ****
  /*
  ** Various configuration definitions.
  **
! **	@(#)conf.h              e07@nikhef.nl (Eric Wassenaar) 950318
! */
  
  /*
!  * A special version of res_send() is included, which returns additional
!  * errno statuses, and which corrects some flaws in the BIND 4.8 version.
   */
  
! #if !defined(HOST_RES_SEND) && !defined(BIND_RES_SEND)
! #if defined(BIND_49)
  #define BIND_RES_SEND		/* use the default BIND res_send() */
  #else
  #define HOST_RES_SEND		/* use the special host res_send() */
--- 1,16 ----
  /*
  ** Various configuration definitions.
  **
! **	@(#)conf.h              e07@nikhef.nl (Eric Wassenaar) 951230
! */
  
  /*
!  * A special version of res_send() is included, which returns additional
!  * errno statuses, and which corrects some flaws in the BIND 4.8 version.
   */
  
! #if !defined(HOST_RES_SEND) && !defined(BIND_RES_SEND)
! #if defined(BIND_49)
  #define BIND_RES_SEND		/* use the default BIND res_send() */
  #else
  #define HOST_RES_SEND		/* use the special host res_send() */
***************
*** 51,53 ****
--- 51,63 ----
   */
  
  #define T_LOC_VERSION	0	/* must be zero */
+ 
+ /*
+  * Prefix for messages on stdout in debug mode.
+  */
+ 
+ #if defined(BIND_49)
+ #define DBPREFIX	";; "
+ #else
+ #define DBPREFIX	""
+ #endif
diff --context --recurs m:\bindb32/contrib/host/host.c m:\bindrel/contrib/host/host.c
*** m:\bindb32/contrib/host/host.c	Tue Oct 24 22:39:44 1995
--- m:\bindrel/contrib/host/host.c	Sun Dec 31 01:42:54 1995
***************
*** 36,51 ****
   */
  
  #ifndef lint
! static char Version[] = "@(#)host.c	e07@nikhef.nl (Eric Wassenaar) 951024";
  #endif
  
! #if defined(apollo) && defined(lint)
! #define __attribute(x)
  #endif
  
! #define justfun			/* this is only for fun */
! #undef  obsolete		/* old code left as a reminder */
! #undef  notyet			/* new code for possible future use */
  
  /*
   *			New features
--- 36,51 ----
   */
  
  #ifndef lint
! static char Version[] = "@(#)host.c	e07@nikhef.nl (Eric Wassenaar) 951231";
  #endif
  
! #if defined(apollo) && defined(lint)
! #define __attribute(x)
  #endif
  
! #define justfun			/* this is only for fun */
! #undef  obsolete		/* old code left as a reminder */
! #undef  notyet			/* new code for possible future use */
  
  /*
   *			New features
***************
*** 283,292 ****
  #include <arpa/nameser.h>
  #include <resolv.h>
  
- #include "type.h"		/* types should be in <arpa/nameser.h> */
- #include "exit.h"		/* exit codes come from <sysexits.h> */
  #include "port.h"		/* various portability definitions */
  #include "conf.h"		/* various configuration definitions */
  
  typedef int	bool;		/* boolean type */
  #define TRUE	1
--- 283,292 ----
  #include <arpa/nameser.h>
  #include <resolv.h>
  
  #include "port.h"		/* various portability definitions */
  #include "conf.h"		/* various configuration definitions */
+ #include "type.h"		/* types should be in <arpa/nameser.h> */
+ #include "exit.h"		/* exit codes come from <sysexits.h> */
  
  typedef int	bool;		/* boolean type */
  #define TRUE	1
***************
*** 312,318 ****
  #endif
  
  #define NOT_DOTTED_QUAD	((ipaddr_t)-1)
! 
  #define LOCALHOST_ADDR	((ipaddr_t)0x7f000001)
  
  #if PACKETSZ > 1024
--- 312,318 ----
  #endif
  
  #define NOT_DOTTED_QUAD	((ipaddr_t)-1)
! #define BROADCAST_ADDR	((ipaddr_t)0xffffffff)
  #define LOCALHOST_ADDR	((ipaddr_t)0x7f000001)
  
  #if PACKETSZ > 1024
***************
*** 350,356 ****
  EXTERN int errno;
  EXTERN int h_errno;		/* defined in gethostnamadr.c */
  EXTERN res_state_t _res;	/* defined in res_init.c */
! extern char *version;		/* program version number */
  
  char **optargv = NULL;		/* argument list including default options */
  int optargc = 0;		/* number of arguments in new argument list */
--- 350,357 ----
  EXTERN int errno;
  EXTERN int h_errno;		/* defined in gethostnamadr.c */
  EXTERN res_state_t _res;	/* defined in res_init.c */
! extern char *dbprefix;		/* prefix for debug messages (send.c) */
! extern char *version;		/* program version number (vers.c) */
  
  char **optargv = NULL;		/* argument list including default options */
  int optargc = 0;		/* number of arguments in new argument list */
***************
*** 376,381 ****
--- 377,384 ----
  
  ipaddr_t address;		/* internet address of A record */
  
+ char *listhost = NULL;		/* actual host queried during zone listing */
+ 
  char serverbuf[MAXDNAME+1];
  char *server = NULL;		/* name of explicit server to query */
  
***************
*** 430,437 ****
  bool bindcompat = FALSE;	/* enforce full BIND DNSRCH compatibility */
  bool classprint = FALSE;	/* print class value in non-verbose mode */
  
- char *listhost = NULL;		/* actual host queried during zone listing */
- 
  #include "defs.h"		/* declaration of functions */
  
  #define lower(c)	(((c) >= 'A' && (c) <= 'Z') ? (c) + 'a' - 'A' : (c))
--- 433,438 ----
***************
*** 448,454 ****
  #define samehead(a,b)	(strncasecmp(a,b,sizeof(b)-1) == 0)
  
  #define fakename(a)	(samehead(a,"localhost.") || samehead(a,"loopback."))
! #define fakeaddr(a)	(((a) == 0) || ((a) == htonl(LOCALHOST_ADDR)))
  #define incopy(a)	*((struct in_addr *)a)
  
  #define newlist(a,n,t)	(t *)xalloc((ptr_t *)a, (siz_t)((n)*sizeof(t)))
--- 449,456 ----
  #define samehead(a,b)	(strncasecmp(a,b,sizeof(b)-1) == 0)
  
  #define fakename(a)	(samehead(a,"localhost.") || samehead(a,"loopback."))
! #define nulladdr(a)	(((a) == 0) || ((a) == BROADCAST_ADDR))
! #define fakeaddr(a)	(nulladdr(a) || ((a) == htonl(LOCALHOST_ADDR)))
  #define incopy(a)	*((struct in_addr *)a)
  
  #define newlist(a,n,t)	(t *)xalloc((ptr_t *)a, (siz_t)((n)*sizeof(t)))
***************
*** 1831,1837 ****
  	if (n < 0)
  	{
  		if (debug)
! 			(void) fprintf(stderr, "res_mkquery failed\n");
  		h_errno = NO_RECOVERY;
  		return(-1);
  	}
--- 1833,1839 ----
  	if (n < 0)
  	{
  		if (debug)
! 			printf("%sres_mkquery failed\n", dbprefix);
  		h_errno = NO_RECOVERY;
  		return(-1);
  	}
***************
*** 1840,1846 ****
  	if (n < 0)
  	{
  		if (debug)
! 			(void) fprintf(stderr, "res_send failed\n");
  		h_errno = TRY_AGAIN;
  		return(-1);
  	}
--- 1842,1848 ----
  	if (n < 0)
  	{
  		if (debug)
! 			printf("%sres_send failed\n", dbprefix);
  		h_errno = TRY_AGAIN;
  		return(-1);
  	}
***************
*** 4050,4063 ****
  	if (n < 0)
  	{
  		if (debug)
! 			(void) fprintf(stderr, "res_mkquery failed\n");
  		h_errno = NO_RECOVERY;
  		return(FALSE);
  	}
  
  	if (debug)
  	{
! 		printf("get_zone()\n");
  		pr_query((qbuf_t *)&query, n, stdout);
  	}
  
--- 4052,4065 ----
  	if (n < 0)
  	{
  		if (debug)
! 			printf("%sres_mkquery failed\n", dbprefix);
  		h_errno = NO_RECOVERY;
  		return(FALSE);
  	}
  
  	if (debug)
  	{
! 		printf("%sget_zone()\n", dbprefix);
  		pr_query((qbuf_t *)&query, n, stdout);
  	}
  
***************
*** 4123,4129 ****
  
  		if (debug > 1)
  		{
! 			printf("got answer, %d bytes:\n", n);
  			pr_query((qbuf_t *)&answer, n, stdout);
  		}
  
--- 4125,4131 ----
  
  		if (debug > 1)
  		{
! 			printf("%sgot answer, %d bytes:\n", dbprefix, n);
  			pr_query((qbuf_t *)&answer, n, stdout);
  		}
  
***************
*** 4138,4144 ****
  
  		if (bp->rcode != NOERROR || ancount == 0)
  		{
! 			if (verbose)
  				print_status(&answer);
  
  			switch (bp->rcode)
--- 4140,4146 ----
  
  		if (bp->rcode != NOERROR || ancount == 0)
  		{
! 			if (debug || verbose)
  				print_status(&answer);
  
  			switch (bp->rcode)
***************
*** 6025,6031 ****
  	ancount = ntohs(bp->ancount);
  	failed = (bp->rcode != NOERROR || ancount == 0);
  
! 	printf("Query %s, %d answer%s%s, %sstatus: %s\n",
  		failed ? "failed" : "done",
  		ancount, plural(ancount),
  		bp->tc ? " (truncated)" : "",
--- 6027,6034 ----
  	ancount = ntohs(bp->ancount);
  	failed = (bp->rcode != NOERROR || ancount == 0);
  
! 	printf("%sQuery %s, %d answer%s%s, %sstatus: %s\n",
! 		verbose ? "" : dbprefix,
  		failed ? "failed" : "done",
  		ancount, plural(ancount),
  		bp->tc ? " (truncated)" : "",
diff --context --recurs m:\bindb32/contrib/host/send.c m:\bindrel/contrib/host/send.c
*** m:\bindb32/contrib/host/send.c	Fri Oct 06 22:06:12 1995
--- m:\bindrel/contrib/host/send.c	Sat Dec 30 23:27:11 1995
***************
*** 18,33 ****
   */
  
  #ifndef lint
! static char Version[] = "@(#)send.c	e07@nikhef.nl (Eric Wassenaar) 951006";
! #endif
  
! #if defined(apollo) && defined(lint)
! #define __attribute(x)
! #endif
! 
! #include <stdio.h>
! #include <errno.h>
! #include <setjmp.h>
  #include <signal.h>
  #include <sys/time.h>
  
--- 18,33 ----
   */
  
  #ifndef lint
! static char Version[] = "@(#)send.c	e07@nikhef.nl (Eric Wassenaar) 951231";
! #endif
  
! #if defined(apollo) && defined(lint)
! #define __attribute(x)
! #endif
! 
! #include <stdio.h>
! #include <errno.h>
! #include <setjmp.h>
  #include <signal.h>
  #include <sys/time.h>
  
***************
*** 52,57 ****
--- 52,59 ----
  extern int errno;
  extern res_state_t _res;	/* defined in res_init.c */
  
+ char *dbprefix = DBPREFIX;	/* prefix for debug messages to stdout */
+ 
  static int timeout;		/* connection read timeout */
  static struct sockaddr_in from;	/* address of inbound packet */
  static struct sockaddr *from_sa = (struct sockaddr *)&from;
***************
*** 115,121 ****
  
  	if (bitset(RES_DEBUG, _res.options))
  	{
! 		printf("res_send()\n");
  		pr_query(query, querylen, stdout);
  	}
  
--- 117,123 ----
  
  	if (bitset(RES_DEBUG, _res.options))
  	{
! 		printf("%sres_send()\n", dbprefix);
  		pr_query(query, querylen, stdout);
  	}
  
***************
*** 146,153 ****
  		addr = &nslist(ns);
  retry:
  		if (bitset(RES_DEBUG, _res.options))
! 			printf("Querying server (# %d) %s address = %s\n", ns+1,
! 			    v_circuit ? "tcp" : "udp", inet_ntoa(addr->sin_addr));
  
  		if (v_circuit)
  		{
--- 148,155 ----
  		addr = &nslist(ns);
  retry:
  		if (bitset(RES_DEBUG, _res.options))
! 			printf("%sQuerying server (# %d) %s address = %s\n", dbprefix,
! 			    ns+1, v_circuit ? "tcp" : "udp", inet_ntoa(addr->sin_addr));
  
  		if (v_circuit)
  		{
***************
*** 173,179 ****
  			if (n > 0 && bp->tc)
  			{
  				if (bitset(RES_DEBUG, _res.options))
! 					(void) fprintf(stderr, "truncated answer\n");
  
  				if (!bitset(RES_IGNTC, _res.options))
  				{
--- 175,181 ----
  			if (n > 0 && bp->tc)
  			{
  				if (bitset(RES_DEBUG, _res.options))
! 					printf("%struncated answer\n", dbprefix);
  
  				if (!bitset(RES_IGNTC, _res.options))
  				{
***************
*** 202,208 ****
  
  		if (bitset(RES_DEBUG, _res.options))
  		{
! 			printf("got answer, %d bytes:\n", n);
  			pr_query(answer, n, stdout);
  		}
  
--- 204,210 ----
  
  		if (bitset(RES_DEBUG, _res.options))
  		{
! 			printf("%sgot answer, %d bytes:\n", dbprefix, n);
  			pr_query(answer, n, stdout);
  		}
  
***************
*** 286,292 ****
  	}
  
  	if (bitset(RES_DEBUG, _res.options))
! 		printf("connected to %s\n", inet_ntoa(addr->sin_addr));
  
  /*
   * Send the query buffer.
--- 288,294 ----
  	}
  
  	if (bitset(RES_DEBUG, _res.options))
! 		printf("%sconnected to %s\n", dbprefix, inet_ntoa(addr->sin_addr));
  
  /*
   * Send the query buffer.
***************
*** 400,406 ****
  	{
  		if (bitset(RES_DEBUG, _res.options))
  		{
! 			printf("old answer:\n");
  			pr_query(answer, n, stdout);
  		}
  		goto wait;
--- 402,408 ----
  	{
  		if (bitset(RES_DEBUG, _res.options))
  		{
! 			printf("%sold answer:\n", dbprefix);
  			pr_query(answer, n, stdout);
  		}
  		goto wait;
***************
*** 623,629 ****
  		}
  
  		if (bitset(RES_DEBUG, _res.options))
! 			(void) fprintf(stderr, "response truncated\n");
  
  		/* set truncation flag */
  		bp->tc = 1;
--- 625,631 ----
  		}
  
  		if (bitset(RES_DEBUG, _res.options))
! 			printf("%sresponse truncated\n", dbprefix);
  
  		/* set truncation flag */
  		bp->tc = 1;
diff --context --recurs m:\bindb32/contrib/host/vers.c m:\bindrel/contrib/host/vers.c
*** m:\bindb32/contrib/host/vers.c	Tue Oct 24 22:42:25 1995
--- m:\bindrel/contrib/host/vers.c	Sat Dec 30 23:29:43 1995
***************
*** 1,8 ****
  #ifndef lint
! static char Version[] = "@(#)vers.c	e07@nikhef.nl (Eric Wassenaar) 951024";
! #endif
! 
! char *version = "951024";
  
  #if defined(apollo)
  int h_errno = 0;
--- 1,8 ----
  #ifndef lint
! static char Version[] = "@(#)vers.c	e07@nikhef.nl (Eric Wassenaar) 951231";
! #endif
! 
! char *version = "951231";
  
  #if defined(apollo)
  int h_errno = 0;
diff --context --recurs m:\bindb32/doc/bog/ack.me m:\bindrel/doc/bog/ack.me
*** m:\bindb32/doc/bog/ack.me	Mon Dec 25 21:59:06 1995
--- m:\bindrel/doc/bog/ack.me	Wed Jan 03 13:31:54 1996
***************
*** 240,245 ****
--- 240,254 ----
  SRI International,
  Menlo Park, California.
  August 1994.
+ .ip [RFC1713]
+ Romao, A.,
+ .q "Tools for DNS debugging"
+ .ul
+ Internet Request For Comment 1713, also FYI27
+ Network Information Center,
+ SRI International,
+ Menlo Park, California.
+ November 1994.
  .ip [Terry]
  Terry, D. B.,
  Painter, M.,
Only in m:\bindrel/doc/bog: ack.me.orig
diff --context --recurs m:\bindb32/doc/bog/file.lst m:\bindrel/doc/bog/file.lst
*** m:\bindb32/doc/bog/file.lst	Sun Dec 24 07:02:36 1995
--- m:\bindrel/doc/bog/file.lst	Sun Dec 31 23:30:38 1995
***************
*** 2924,2953 ****
            ter, SRI International,  Menlo  Park,  California.
            August 1994.
  
! [Terry]   Terry,  D.  B.,  Painter,  M.,  Riggle, D. W., and
!           Zhou,  S.,  _T_h_e  _B_e_r_k_e_l_e_y  _I_n_t_e_r_n_e_t  _N_a_m_e   _D_o_m_a_i_n
!           _S_e_r_v_e_r_.   Proceedings  USENIX  Summer  Conference,
!           Salt Lake City, Utah.  June 1984, pages 23-31.
! 
! [Zhou]    Zhou, S., _T_h_e _D_e_s_i_g_n  _a_n_d  _I_m_p_l_e_m_e_n_t_a_t_i_o_n  _o_f  _t_h_e
!           _B_e_r_k_e_l_e_y  _I_n_t_e_r_n_e_t  _N_a_m_e  _D_o_m_a_i_n  _(_B_I_N_D_)  _S_e_r_v_e_r_s_.
!           UCB/CSD 84/177.  University of California,  Berke-
!           ley, Computer Science Division.  May 1984.
  
  [Mockapetris]
!           Mockapetris,  P.,  Dunlap,  K,  _D_e_v_e_l_o_p_m_e_n_t _o_f _t_h_e
!           _D_o_m_a_i_n _N_a_m_e  _S_y_s_t_e_m  ACM  Computer  Communications
            Review 18, 4:123-133.  Proceedings ACM SIGCOMM '88
            Symposium, August 1988.
  
  [Liu]     Liu, C., Albitz, P., _D_N_S _a_n_d _B_I_N_D O'Reilly & Asso-
!           ciates,    Sebastopol,   CA,   502   pages,   ISBN
            0-937175-82-X 1992
- 
- 
- 
- 
- 
  
  
  
--- 2924,2953 ----
            ter, SRI International,  Menlo  Park,  California.
            August 1994.
  
! [RFC1713] Romao,  A.,  "Tools  for  DNS  debugging" _I_n_t_e_r_n_e_t
!           _R_e_q_u_e_s_t  _F_o_r  _C_o_m_m_e_n_t  _1_7_1_3_,  _a_l_s_o  _F_Y_I_2_7  Network
!           Information Center, SRI International, Menlo Park,
!           California.  November 1994.
! 
! [Terry]   Terry, D. B., Painter,  M.,  Riggle,  D.  W.,  and
!           Zhou,   S.,  _T_h_e  _B_e_r_k_e_l_e_y  _I_n_t_e_r_n_e_t  _N_a_m_e  _D_o_m_a_i_n
!           _S_e_r_v_e_r_.   Proceedings  USENIX  Summer  Conference,
!           Salt Lake City, Utah.  June 1984, pages 23-31.
! 
! [Zhou]    Zhou,  S.,  _T_h_e  _D_e_s_i_g_n  _a_n_d _I_m_p_l_e_m_e_n_t_a_t_i_o_n _o_f _t_h_e
!           _B_e_r_k_e_l_e_y  _I_n_t_e_r_n_e_t  _N_a_m_e  _D_o_m_a_i_n  _(_B_I_N_D_)  _S_e_r_v_e_r_s_.
!           UCB/CSD  84/177.  University of California, Berke-
!           ley, Computer Science Division.  May 1984.
  
  [Mockapetris]
!           Mockapetris, P., Dunlap,  K,  _D_e_v_e_l_o_p_m_e_n_t  _o_f  _t_h_e
!           _D_o_m_a_i_n  _N_a_m_e  _S_y_s_t_e_m  ACM  Computer Communications
            Review 18, 4:123-133.  Proceedings ACM SIGCOMM '88
            Symposium, August 1988.
  
  [Liu]     Liu, C., Albitz, P., _D_N_S _a_n_d _B_I_N_D O'Reilly & Asso-
!           ciates,   Sebastopol,   CA,   502   pages,    ISBN
            0-937175-82-X 1992
  
  
  
diff --context --recurs m:\bindb32/doc/bog/file.psf m:\bindrel/doc/bog/file.psf
*** m:\bindb32/doc/bog/file.psf	Sun Dec 24 07:02:29 1995
--- m:\bindrel/doc/bog/file.psf	Sun Dec 31 23:30:31 1995
***************
*** 1,15 ****
  %!PS-Adobe-3.0
  %%Creator: groff version 1.09
! %%CreationDate: Sat Dec 23 23:02:28 1995
! %%DocumentNeededResources: font Times-Bold
! %%+ font Times-Italic
! %%+ font Times-Roman
! %%DocumentSuppliedResources: procset grops 1.09 0
! %%Pages: 28
! %%PageOrder: Ascend
! %%Orientation: Portrait
! %%EndComments
! %%BeginProlog
  %%BeginResource: procset grops 1.09 0
  /setpacking where{
  pop
--- 1,15 ----
  %!PS-Adobe-3.0
  %%Creator: groff version 1.09
! %%CreationDate: Sun Dec 31 15:30:30 1995
! %%DocumentNeededResources: font Times-Bold
! %%+ font Times-Italic
! %%+ font Times-Roman
! %%DocumentSuppliedResources: procset grops 1.09 0
! %%Pages: 29
! %%PageOrder: Ascend
! %%Orientation: Portrait
! %%EndComments
! %%BeginProlog
  %%BeginResource: procset grops 1.09 0
  /setpacking where{
  pop
***************
*** 2785,2813 ****
  (Internet Request F)2.763 F .263(or Comment 1664)-1.05 F F2(Netw)144
  554.4 Q(ork Information Center)-.1 E 2.5(,S)-.4 G
  (RI International, Menlo P)-2.5 E(ark, California.)-.15 E(August 1994.)5
! E([T)72 570.6 Q 41.33(erry] T)-.7 F(erry)-.7 E 4.678(,D)-.65 G 4.678(.B)
! -4.678 G 2.178(., P)-4.678 F(ainter)-.15 E 4.678(,M)-.4 G 2.178
! (., Riggle, D. W)-4.678 F 2.178(., and Zhou, S.,)-.92 F F3 2.178
! (The Berk)4.678 F(ele)-.1 E 4.677(yI)-.3 G 2.177(nternet Name)-4.677 F
! .747(Domain Server)144 582.6 R(.)-1.11 E F2 .747
! (Proceedings USENIX Summer Conference, Salt Lak)5.747 F 3.247(eC)-.1 G
! (ity)-3.247 E 3.247(,U)-.65 G 3.247(tah. June)-3.247 F
! (1984, pages 23-31.)144 594.6 Q 41.73([Zhou] Zhou,)72 610.8 R(S.,)2.746
! E F3 .246(The Design and Implementation of the Berk)2.746 F(ele)-.1 E
! 2.746(yI)-.3 G .245(nternet Name Domain \(BIND\))-2.746 F(Server)144
! 622.8 Q(s.)-.1 E F2 .464(UCB/CSD 84/177.)5.464 F(Uni)5.464 E -.15(ve)
! -.25 G .464(rsity of California, Berk).15 F(ele)-.1 E 1.765 -.65(y, C)
! -.15 H .465(omputer Science Di).65 F(vi-)-.25 E 2.5(sion. May)144 634.8
! R(1984.)2.5 E 12.85([Mockapetris] Mockapetris,)72 651 R -1.11(P.)3.463 G
! 3.463(,D)1.11 G .963(unlap, K,)-3.463 F F3(De)3.463 E .963
  (velopment of the Domain Name System)-.15 F F2 -.4(AC)3.462 G 3.462(MC)
! .4 G(omputer)-3.462 E 2.057(Communications Re)144 663 R(vie)-.25 E 4.557
! (w1)-.25 G 2.057(8, 4:123-133.)-4.557 F 2.058(Proceedings A)7.057 F
! 2.058(CM SIGCOMM '88)-.4 F(Sympo-)7.058 E(sium, August 1988.)144 675 Q
! 48.95([Liu] Liu,)72 691.2 R 1.09(C., Albitz, P)3.59 F(.,)-1.11 E F3 1.09
  (DNS and BIND)3.59 F F2 1.09
  (O'Reilly & Associates, Sebastopol, CA, 502 pages,)3.59 F
! (ISBN 0-937175-82-X 1992)144 703.2 Q EP
  %%Trailer
  end
  %%EOF
--- 2785,2826 ----
  (Internet Request F)2.763 F .263(or Comment 1664)-1.05 F F2(Netw)144
  554.4 Q(ork Information Center)-.1 E 2.5(,S)-.4 G
  (RI International, Menlo P)-2.5 E(ark, California.)-.15 E(August 1994.)5
! E 23.94([RFC1713] Romao,)72 570.6 R .174(A., \231T)2.674 F .174
! (ools for DNS deb)-.8 F(ugging\232)-.2 E F3 .173(Internet Request F)
! 2.673 F .173(or Comment 1713, also FYI27)-1.05 F F2(Netw)144 582.6 Q
! .018(ork Information Center)-.1 F 2.519(,S)-.4 G .019
! (RI International, Menlo P)-2.519 F .019(ark, California.)-.15 F(No)
! 5.019 E -.15(ve)-.15 G .019(mber 1994.).15 F([T)72 598.8 Q 41.33
! (erry] T)-.7 F(erry)-.7 E 4.678(,D)-.65 G 4.678(.B)-4.678 G 2.178(., P)
! -4.678 F(ainter)-.15 E 4.678(,M)-.4 G 2.178(., Riggle, D. W)-4.678 F
! 2.178(., and Zhou, S.,)-.92 F F3 2.178(The Berk)4.678 F(ele)-.1 E 4.677
! (yI)-.3 G 2.177(nternet Name)-4.677 F .747(Domain Server)144 610.8 R(.)
! -1.11 E F2 .747(Proceedings USENIX Summer Conference, Salt Lak)5.747 F
! 3.247(eC)-.1 G(ity)-3.247 E 3.247(,U)-.65 G 3.247(tah. June)-3.247 F
! (1984, pages 23-31.)144 622.8 Q 41.73([Zhou] Zhou,)72 639 R(S.,)2.746 E
! F3 .246(The Design and Implementation of the Berk)2.746 F(ele)-.1 E
! 2.746(yI)-.3 G .245(nternet Name Domain \(BIND\))-2.746 F(Server)144 651
! Q(s.)-.1 E F2 .464(UCB/CSD 84/177.)5.464 F(Uni)5.464 E -.15(ve)-.25 G
! .464(rsity of California, Berk).15 F(ele)-.1 E 1.765 -.65(y, C)-.15 H
! .465(omputer Science Di).65 F(vi-)-.25 E 2.5(sion. May)144 663 R(1984.)
! 2.5 E 12.85([Mockapetris] Mockapetris,)72 679.2 R -1.11(P.)3.463 G 3.463
! (,D)1.11 G .963(unlap, K,)-3.463 F F3(De)3.463 E .963
  (velopment of the Domain Name System)-.15 F F2 -.4(AC)3.462 G 3.462(MC)
! .4 G(omputer)-3.462 E 2.057(Communications Re)144 691.2 R(vie)-.25 E
! 4.557(w1)-.25 G 2.057(8, 4:123-133.)-4.557 F 2.058(Proceedings A)7.057 F
! 2.058(CM SIGCOMM '88)-.4 F(Sympo-)7.058 E(sium, August 1988.)144 703.2 Q
! EP
! %%Page: 29 29
! %%BeginPageSetup
! BP
! %%EndPageSetup
! /F0 10/Times-Bold@0 SF(Name Ser)72 60 Q -.1(ve)-.1 G 2.5(rO).1 G
! (perations Guide f)-2.5 E(or)-.25 E/F1 9/Times-Bold@0 SF 206.564
! (BIND SMM)2.5 F F0(:10-29)A/F2 10/Times-Roman@0 SF 48.95([Liu] Liu,)72
! 96 R 1.09(C., Albitz, P)3.59 F(.,)-1.11 E/F3 10/Times-Italic@0 SF 1.09
  (DNS and BIND)3.59 F F2 1.09
  (O'Reilly & Associates, Sebastopol, CA, 502 pages,)3.59 F
! (ISBN 0-937175-82-X 1992)144 108 Q EP
  %%Trailer
  end
  %%EOF
Only in m:\bindrel/doc/info: AIX4
Only in m:\bindrel/doc/info: SCO-2
Only in m:\bindrel/doc/info: Solaris
Only in m:\bindrel/doc/info: interactive-2
Only in m:\bindb32/doc/info: solaris
diff --context --recurs m:\bindb32/man/named.8 m:\bindrel/man/named.8
*** m:\bindb32/man/named.8	Mon Dec 25 21:59:12 1995
--- m:\bindrel/man/named.8	Wed Jan 03 13:32:01 1996
***************
*** 138,153 ****
  secondary	6.32.128.IN-ADDR.ARPA	128.32.137.8 128.32.137.3	cc.rev.bak
  primary	0.0.127.IN-ADDR.ARPA					localhost.rev
  forwarders	10.0.0.78 10.2.0.78
! limit	max-xfers 10
! limit	datasize 64M
! options	forward-only query-log fake-iquery
  
! .DT
  .fi
! .in
! The ``directory'' line causes the server to change its working directory to
! the directory specified.  This can be important for the correct processing
! of \s-1$INCLUDE\s+1 files in primary zone files.
  .LP
  The ``cache'' line specifies that data in ``root.cache'' is to be placed in
  the backup cache.  Its main use is to specify data such as locations of root
--- 138,153 ----
  secondary	6.32.128.IN-ADDR.ARPA	128.32.137.8 128.32.137.3	cc.rev.bak
  primary	0.0.127.IN-ADDR.ARPA					localhost.rev
  forwarders	10.0.0.78 10.2.0.78
! limit	transfers-in 10
! limit	datasize 64M
! options	forward-only query-log fake-iquery
  
! .DT
  .fi
! .in
! The ``directory'' line causes the server to change its working directory to
! the directory specified.  This can be important for the correct processing
! of \s-1$INCLUDE\s+1 files in primary zone files.
  .LP
  The ``cache'' line specifies that data in ``root.cache'' is to be placed in
  the backup cache.  Its main use is to specify data such as locations of root
***************
*** 407,415 ****
  .nf
  .ta \w'/var/tmp/named_dump.db   'u
  /etc/named.boot	name server configuration boot file
! /etc/named.pid	the process id (/var/run/named.pid on newer systems)
! /var/tmp/named.run	debug output
  /var/tmp/named_dump.db	dump of the name server database
  /var/tmp/named.stats	nameserver statistics data
  .fi
  .SH "SEE ALSO"
--- 407,416 ----
  .nf
  .ta \w'/var/tmp/named_dump.db   'u
  /etc/named.boot	name server configuration boot file
! /etc/named.pid	the process id (on older systems)
! /var/run/named.pid	the process id (on newer systems)
  /var/tmp/named_dump.db	dump of the name server database
+ /var/tmp/named.run	debug output
  /var/tmp/named.stats	nameserver statistics data
  .fi
  .SH "SEE ALSO"
diff --context --recurs m:\bindb32/named/db_load.c m:\bindrel/named/db_load.c
*** m:\bindb32/named/db_load.c	Mon Dec 25 21:59:12 1995
--- m:\bindrel/named/db_load.c	Wed Jan 03 13:32:02 1996
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)db_load.c	4.38 (Berkeley) 3/2/91";
! static char rcsid[] = "$Id: db_load.c,v 8.13 1995/12/22 10:20:30 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)db_load.c	4.38 (Berkeley) 3/2/91";
! static char rcsid[] = "$Id: db_load.c,v 8.15 1995/12/31 23:28:17 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 169,175 ****
  	struct zoneinfo *zp;
  	const char *def_domain;
  {
! 	static int read_soa, read_ns;
  	register char *cp;
  	register struct map *mp;
  	char domain[MAXDNAME];
--- 169,175 ----
  	struct zoneinfo *zp;
  	const char *def_domain;
  {
! 	static int read_soa, read_ns, rrcount;
  	register char *cp;
  	register struct map *mp;
  	char domain[MAXDNAME];
***************
*** 182,188 ****
  	u_int32_t ttl;
  	struct databuf *dp;
  	FILE *fp;
! 	int slineno, i, errs, didinclude, rrcount;
  	register u_int32_t n;
  	struct stat sb;
  	struct in_addr ina;
--- 182,188 ----
  	u_int32_t ttl;
  	struct databuf *dp;
  	FILE *fp;
! 	int slineno, i, errs, didinclude;
  	register u_int32_t n;
  	struct stat sb;
  	struct in_addr ina;
***************
*** 193,201 ****
  
  	errs = 0;
  	didinclude = 0;
- 	rrcount = 0;
  	if (!def_domain) {
  		/* This is not the result of a $INCLUDE. */
  		read_soa = 0;
  		read_ns = 0;
  		clev = db_getclev(in_origin);
--- 193,201 ----
  
  	errs = 0;
  	didinclude = 0;
  	if (!def_domain) {
  		/* This is not the result of a $INCLUDE. */
+ 		rrcount = 0;
  		read_soa = 0;
  		read_ns = 0;
  		clev = db_getclev(in_origin);
***************
*** 434,440 ****
  				makename(data, origin);
  				cp = data + strlen((char *)data) + 1;
  				if (!getword((char *)cp,
! 					     (sizeof data) - (cp - data), fp, 1))
  					goto err;
  				makename(cp, origin);
  				cp += strlen((char *)cp) + 1;
--- 434,441 ----
  				makename(data, origin);
  				cp = data + strlen((char *)data) + 1;
  				if (!getword((char *)cp,
! 					     (sizeof data) - (cp - data),
! 					     fp, 1))
  					goto err;
  				makename(cp, origin);
  				cp += strlen((char *)cp) + 1;
***************
*** 693,702 ****
  				while ((i = getc(fp), *cp = i, i != EOF)
                                         && *cp != '\n'
                                         && (n < MAXDATA)) {
!                                   cp++; n++;
                                  }
                                  if (*cp == '\n') /* leave \n for getword */
!                                     ungetc(*cp, fp);
                                  *cp = '\0';
  				/* now process the whole line */
  				n = loc_aton(buf, (u_char *)data);
--- 694,703 ----
  				while ((i = getc(fp), *cp = i, i != EOF)
                                         && *cp != '\n'
                                         && (n < MAXDATA)) {
! 					cp++; n++;
                                  }
                                  if (*cp == '\n') /* leave \n for getword */
! 					ungetc(*cp, fp);
                                  *cp = '\0';
  				/* now process the whole line */
  				n = loc_aton(buf, (u_char *)data);
***************
*** 888,942 ****
  }
  
  /* int
!  * getword(buf, size, fp, escape)
   *	get next word, skipping blanks & comments.
   * parameters:
   *	buf - destination
   *	size - of destination
   *	fp - file to read from
   * return value:
   *	0 = no word; perhaps EOL or EOF
   *	1 = word was read
   */
  int
! getword(buf, size, fp, escape)
  	char *buf;
  	int size;
  	FILE *fp;
! 	int escape;
  {
! 	register char *cp;
  	register int c;
  
! 	empty_token = 0;
! 	for (cp = buf; (c = getc(fp)) != EOF; ) {
  		if (c == ';') {
  			while ((c = getc(fp)) != EOF && c != '\n')
! 				;
  			c = '\n';
  		}
  		if (c == '\n') {
  			if (cp != buf)
  				ungetc(c, fp);
  			else
  				lineno++;
  			break;
  		}
- 		if (isspace(c)) {
- 			while (isspace(c = getc(fp)) && c != '\n')
- 				;
- 			ungetc(c, fp);
- 			if (cp != buf)		/* Trailing whitespace */
- 				break;
- 			continue;		/* Leading whitespace */
- 		}
  		if (c == '"') {
! 			while ((c = getc(fp)) != EOF && c != '"' && c != '\n') {
  				if (c == '\\') {
  					if ((c = getc(fp)) == EOF)
  						c = '\\';
! 					if (escape &&
! 						((c == '\\' || c == '.'))) {
  						if (cp >= buf+size-1)
  							break;
  						*cp++ = '\\';
--- 889,943 ----
  }
  
  /* int
!  * getword(buf, size, fp, preserve)
   *	get next word, skipping blanks & comments.
+  *	'\' '\n' outside of "quotes" is considered a blank.
   * parameters:
   *	buf - destination
   *	size - of destination
   *	fp - file to read from
+  *	preserve - should we preserve \ before \\ and \.?
   * return value:
   *	0 = no word; perhaps EOL or EOF
   *	1 = word was read
   */
  int
! getword(buf, size, fp, preserve)
  	char *buf;
  	int size;
  	FILE *fp;
! 	int preserve;
  {
! 	register char *cp = buf;
  	register int c;
  
! 	empty_token = 0;	/* XXX global side effect. */
! 	while ((c = getc(fp)) != EOF) {
  		if (c == ';') {
+ 			/* Comment.  Skip to end of line. */
  			while ((c = getc(fp)) != EOF && c != '\n')
! 				NULL;
  			c = '\n';
  		}
  		if (c == '\n') {
+ 			/*
+ 			 * Unescaped newline.  It's a terminator unless we're
+ 			 * already midway into a token.
+ 			 */
  			if (cp != buf)
  				ungetc(c, fp);
  			else
  				lineno++;
  			break;
  		}
  		if (c == '"') {
! 			/* "Quoted string."  Gather the whole string here. */
! 			while ((c = getc(fp)) != EOF && c!='"' && c!='\n') {
  				if (c == '\\') {
  					if ((c = getc(fp)) == EOF)
  						c = '\\';
! 					if (preserve &&
! 					    (c == '\\' || c == '.')) {
  						if (cp >= buf+size-1)
  							break;
  						*cp++ = '\\';
***************
*** 948,974 ****
  					break;
  				*cp++ = c;
  			}
  			if (c == '\n') {
  				lineno++;
  				break;
  			}
  			if ((c = getc(fp)) != EOF)
  				ungetc(c, fp);
! 			if (c == EOF || isspace(c) || c == '\n') {
  				*cp = '\0';
  				return (1);
  			}
! 			else
! 				continue;
  		}
  		if (c == '\\') {
  			if ((c = getc(fp)) == EOF)
  				c = '\\';
! 			if (escape && ((c == '\\' || c == '.'))) {
  				if (cp >= buf+size-1)
  					break;
  				*cp++ = '\\';
  			}
  		}
  		if (cp >= buf+size-1)
  			break;
--- 949,990 ----
  					break;
  				*cp++ = c;
  			}
+ 			/*
+ 			 * Newline string terminators are
+ 			 * not token terminators.
+ 			 */
  			if (c == '\n') {
  				lineno++;
  				break;
  			}
+ 			/* Sample following character, check for terminator. */
  			if ((c = getc(fp)) != EOF)
  				ungetc(c, fp);
! 			if (c == EOF || isspace(c)) {
  				*cp = '\0';
  				return (1);
  			}
! 			continue;
  		}
  		if (c == '\\') {
+ 			/* Do escape processing. */
  			if ((c = getc(fp)) == EOF)
  				c = '\\';
! 			if (preserve && (c == '\\' || c == '.')) {
  				if (cp >= buf+size-1)
  					break;
  				*cp++ = '\\';
  			}
+ 		}
+ 		if (isspace(c)) {
+ 			/* Blank of some kind.  Skip run. */
+ 			while (isspace(c = getc(fp)) && c != '\n')
+ 				NULL;
+ 			ungetc(c, fp);
+ 			/* Blank means terminator if the token is nonempty. */
+ 			if (cp != buf)		/* Trailing whitespace */
+ 				break;
+ 			continue;		/* Leading whitespace */
  		}
  		if (cp >= buf+size-1)
  			break;
diff --context --recurs m:\bindb32/named/ns_init.c m:\bindrel/named/ns_init.c
*** m:\bindb32/named/ns_init.c	Mon Dec 25 21:59:12 1995
--- m:\bindrel/named/ns_init.c	Wed Jan 03 13:32:02 1996
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_init.c	4.38 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: ns_init.c,v 8.11 1995/12/22 10:20:30 vixie Exp $";
! #endif /* not lint */
  
! /*
!  * ++Copyright++ 1986, 1990
   * -
!  * Copyright (c) 1986, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_init.c	4.38 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: ns_init.c,v 8.12 1995/12/29 07:16:18 vixie Exp $";
! #endif /* not lint */
  
! /*
!  * ++Copyright++ 1986, 1990
   * -
!  * Copyright (c) 1986, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 69,75 ****
  #include <stdio.h>
  #include <errno.h>
  #include <ctype.h>
- #include <assert.h>
  
  #include "named.h"
  
--- 69,74 ----
diff --context --recurs m:\bindb32/named/ns_main.c m:\bindrel/named/ns_main.c
*** m:\bindb32/named/ns_main.c	Mon Dec 25 21:59:14 1995
--- m:\bindrel/named/ns_main.c	Wed Jan 03 13:32:04 1996
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_main.c	4.55 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_main.c,v 8.11 1995/12/22 10:20:30 vixie Exp $";
  #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1989, 1990
   * -
!  * Copyright (c) 1986, 1989, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_main.c	4.55 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_main.c,v 8.12 1995/12/29 07:16:18 vixie Exp $";
  #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1989, 1990
   * -
!  * Copyright (c) 1986, 1989, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 933,939 ****
  		exit(1);
  	}
  	ntp = NULL;
! #if defined(AF_LINK) && !defined(RISCOS_BSD)
  #define my_max(a, b) (a > b ? a : b)
  #define my_size(p)	my_max((p).sa_len, sizeof(p))
  #else
--- 933,939 ----
  		exit(1);
  	}
  	ntp = NULL;
! #if defined(AF_LINK) && !defined(RISCOS_BSD) && !defined(M_UNIX)
  #define my_max(a, b) (a > b ? a : b)
  #define my_size(p)	my_max((p).sa_len, sizeof(p))
  #else
diff --context --recurs m:\bindb32/named/ns_req.c m:\bindrel/named/ns_req.c
*** m:\bindb32/named/ns_req.c	Mon Dec 25 21:59:12 1995
--- m:\bindrel/named/ns_req.c	Wed Jan 03 13:32:02 1996
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_req.c	4.47 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_req.c,v 8.14 1995/12/22 21:55:45 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_req.c	4.47 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_req.c,v 8.15 1995/12/29 07:16:18 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 750,762 ****
  		return (Finish);
  #endif
  
  	/*
  	 * If we're already out of room in the response, we're done.
  	 */
  	if (hp->tc)
  		return (Finish);
  
- fetchns:
  	/*
   	 * Look for name servers to refer to and fill in the authority
   	 * section or record the address for forwarding the query
--- 750,762 ----
  		return (Finish);
  #endif
  
+ fetchns:
  	/*
  	 * If we're already out of room in the response, we're done.
  	 */
  	if (hp->tc)
  		return (Finish);
  
  	/*
   	 * Look for name servers to refer to and fill in the authority
   	 * section or record the address for forwarding the query
diff --context --recurs m:\bindb32/named/ns_resp.c m:\bindrel/named/ns_resp.c
*** m:\bindb32/named/ns_resp.c	Thu Dec 28 13:41:29 1995
--- m:\bindrel/named/ns_resp.c	Wed Jan 03 13:32:02 1996
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_resp.c	4.65 (Berkeley) 3/3/91";
! static char rcsid[] = "$Id: ns_resp.c,v 8.16 1995/12/24 06:44:21 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_resp.c	4.65 (Berkeley) 3/3/91";
! static char rcsid[] = "$Id: ns_resp.c,v 8.18 1995/12/29 21:08:13 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 178,186 ****
  	register struct databuf *ns, *ns2;
  	register u_char *cp;
  	u_char *eom = msg + msglen;
- #ifdef VALIDATE
  	register u_char *tempcp;
  	struct sockaddr_in *server = &from_addr;
  #endif
  	struct sockaddr_in *nsa;
  	struct databuf *nsp[NSMAX];
--- 178,188 ----
  	register struct databuf *ns, *ns2;
  	register u_char *cp;
  	u_char *eom = msg + msglen;
  	register u_char *tempcp;
+ #ifdef VALIDATE
  	struct sockaddr_in *server = &from_addr;
+ 	struct { char *name; int type, class; u_int cred; } defer_rm[99];
+ 	int defer_rm_count;
  #endif
  	struct sockaddr_in *nsa;
  	struct databuf *nsp[NSMAX];
***************
*** 689,707 ****
  	validanswer = 0;
  	nscount = 0;
  	cname = 0;
  
  	for (i = 0; i < count; i++) {
  		struct databuf *ns3 = NULL;
  		u_char cred;
  		int VCode;
! 		u_int16_t type;
  
  		if (cp >= eom) {
  			formerrmsg = outofDataFinal;
  			goto formerr;
  		}
  
! 		/* Get the DNAME and be prepared to skip this RR. */
  		tempcp = cp;
  		n = dn_expand(msg, eom, tempcp, name, sizeof name);
  		if (n <= 0) {
--- 691,712 ----
  	validanswer = 0;
  	nscount = 0;
  	cname = 0;
+ #ifdef VALIDATE
+ 	defer_rm_count = 0;
+ #endif
  
  	for (i = 0; i < count; i++) {
  		struct databuf *ns3 = NULL;
  		u_char cred;
  		int VCode;
! 		u_int16_t type, class;
  
  		if (cp >= eom) {
  			formerrmsg = outofDataFinal;
  			goto formerr;
  		}
  
! 		/* Get the DNAME. */
  		tempcp = cp;
  		n = dn_expand(msg, eom, tempcp, name, sizeof name);
  		if (n <= 0) {
***************
*** 709,715 ****
  			goto formerr;
  		}
  		tempcp += n;
! 		GETSHORT(type, tempcp);	/* type */
  
  		/*
  		 * See if there are any NS RRs in the authority section
--- 714,721 ----
  			goto formerr;
  		}
  		tempcp += n;
! 		GETSHORT(type, tempcp);
! 		GETSHORT(class, tempcp);
  
  		/*
  		 * See if there are any NS RRs in the authority section
***************
*** 735,768 ****
  			formerrmsg = outofDataFinal;
  			goto formerr;
  		}
! 		/*
! 		 * dovalidate() currently tells us to trust anything from a
! 		 * forwarder, but we should only trust the answer section,
! 		 * as the authority and additional data sections may have
! 		 * been just passed on by the forwarder verbatim.  If the
! 		 * forwarder is using this version of the algorithm, the
! 		 * response will only be forwarded verbatim if the answer
! 		 * section it receives is totally validated.  If the answer
! 		 * section of a response the forwarder receives is not
! 		 * validated, its response to us will be synthesized using
! 		 * cached data which has passed validation, possibly after
! 		 * the forwarder has fetched more data.
! 		 * 
! 		 * If we are using a forwarder, we probably don't need the
! 		 * authority and additional data anyway, but in case we
! 		 * do, we can fetch it quickly from the forwarder if the
! 		 * data passed validation and was cached. If priming
! 		 * allow the additional data to be cached.
! 		 *
! 		 * Possible efficiency enhancement: count data in the
! 		 * answer section as validated for the purposes of
! 		 * forwarding the response to the client if the data
! 		 * matches our cached data, even though we wouldn't
! 		 * otherwise trust the data coming from this source.
! 		 * But how to handle the TTLs?
! 		 */
! 		if (VCode == INVALID || (fwd != NULL && i >= ancount &&
! 				!(qp->q_flags & Q_PRIMING))) {
  			/*
  			 * If anything in the answer section fails
  			 * validation this means that it definitely did
--- 741,747 ----
  			formerrmsg = outofDataFinal;
  			goto formerr;
  		}
! 		if (VCode == INVALID && !(qp->q_flags & Q_SYSTEM)) {
  			/*
  			 * If anything in the answer section fails
  			 * validation this means that it definitely did
***************
*** 776,781 ****
--- 755,787 ----
  			 */
  			if (i < ancount)
  				restart = 1;
+ 			/*
+ 			 * Restart or no, if we're here it means we are not
+ 			 * going to cache this RR.  That being the case, we
+ 			 * must burn down whatever partial RRset we've got
+ 			 * in the cache now, lest we inadvertently answer
+ 			 * with a truncated RRset in some future section.
+ 			 */
+ 			for (c = 0; c < defer_rm_count; c++)
+ 				if (!strcasecmp(defer_rm[c].name, name) &&
+ 				    defer_rm[c].class == class &&
+ 				    defer_rm[c].type == type)
+ 					break;
+ 			if (c < defer_rm_count) {
+ 				if (defer_rm[c].cred < cred)
+ 					defer_rm[c].cred = cred;
+ 			} else {
+ 				if (defer_rm_count+1 >=
+ 				    (sizeof defer_rm / sizeof defer_rm[0])) {
+ 					formerrmsg = "too many RRs in ns_resp";
+ 					goto formerr;
+ 				}
+ 				defer_rm[defer_rm_count].name = savestr(name);
+ 				defer_rm[defer_rm_count].type = type;
+ 				defer_rm[defer_rm_count].class = class;
+ 				defer_rm[defer_rm_count].cred = cred;
+ 				defer_rm_count++;
+ 			}
  		} else {
  #endif
  		if (i < ancount) {
***************
*** 798,809 ****
  #endif
  		if (n < 0) {
  			dprintf(1, (ddt, "resp: leaving, doupdate failed\n"));
- 			/* Don't go to return_msg like before ... */
  			formerrmsg = outofDataFinal;
  			goto formerr;
  		}
  		cp += n;
  	}
  
  	if (cp > eom) {
  		formerrmsg = outofDataAFinal;
--- 804,853 ----
  #endif
  		if (n < 0) {
  			dprintf(1, (ddt, "resp: leaving, doupdate failed\n"));
  			formerrmsg = outofDataFinal;
  			goto formerr;
  		}
  		cp += n;
  	}
+ #ifdef VALIDATE
+ 	if (defer_rm_count > 0) {
+ 		for (i = 0; i < defer_rm_count; i++) {
+ 			register struct databuf *db = NULL;
+ 
+ 			fname = "";
+ 			htp = hashtab;		/* lookup relative to root */
+ 			np = nlookup(defer_rm[i].name, &htp, &fname, 0);
+ 			if (np && fname == defer_rm[i].name &&
+ 			    defer_rm[i].class != C_ANY &&
+ 			    defer_rm[i].type != T_ANY) {
+ 				/*
+ 				 * If doupdate() wouldn't have cached this
+ 				 * RR anyway, there's no need to delete it.
+ 				 */
+ 				for (db = np->n_data;
+ 				     db != NULL;
+ 				     db = db->d_next) {
+ 					if (!db->d_zone &&
+ 					    match(db, defer_rm[i].class,
+ 						  defer_rm[i].type) &&
+ 					    db->d_cred >= defer_rm[i].cred) {
+ 						break;
+ 					}
+ 				}
+ 				if (db == NULL)
+ 					delete_all(np, defer_rm[i].class,
+ 						   defer_rm[i].type);
+ 				/* XXX: should delete name node if empty? */
+ 			}
+ 			syslog(LOG_DEBUG, "defer_rm [%s %s %s] (np%#x, db%#x)",
+ 			       defer_rm[i].name,
+ 			       p_class(defer_rm[i].class),
+ 			       p_type(defer_rm[i].type),
+ 			       np, db);
+ 			free(defer_rm[i].name);
+ 		}
+ 	}
+ #endif
  
  	if (cp > eom) {
  		formerrmsg = outofDataAFinal;
***************
*** 848,869 ****
  #endif
  
  	/*
- 	 * If we got an incomplete answer or part of the the
- 	 * answer didn't pass validation, meaning that we
- 	 * have a dangling CNAME *AND* this is the first time,
- 	 * save the original query message so that we can prepare
- 	 * the final answer to the client when the the query is
- 	 * complete.
- 	 *
- 	 */
- 	if (cname && restart && !qp->q_cmsglen) {
- 		qp->q_cmsg = qp->q_msg;
- 		qp->q_cmsglen = qp->q_msglen;
- 		qp->q_msg = NULL;
- 		qp->q_msglen = 0;
- 	}
- 
- 	/*
  	 * An answer to a T_ANY query or a successful answer to a
  	 * regular query with no indirection, then just return answer.
  	 */
--- 892,897 ----
***************
*** 978,983 ****
--- 1006,1015 ----
  		    foundname, count, founddata, cname));
  
   fetch_ns:
+ 
+ 	if (hp->tc)
+ 		goto return_newmsg;
+ 
  	/*
   	 * Look for name servers to refer to and fill in the authority
   	 * section or record the address for forwarding the query
***************
*** 1099,1105 ****
  		dprintf(1, (ddt, "q_cname = %d\n", qp->q_cname));
  		dprintf(3, (ddt,
  			    "resp: building recursive query; nslookup\n"));
! 		if (qp->q_msg)
  			(void) free(qp->q_msg);
  		if ((qp->q_msg = (u_char *)malloc(BUFSIZ)) == NULL) {
  			syslog(LOG_NOTICE, "resp: malloc error\n");
--- 1131,1140 ----
  		dprintf(1, (ddt, "q_cname = %d\n", qp->q_cname));
  		dprintf(3, (ddt,
  			    "resp: building recursive query; nslookup\n"));
! 		if (!qp->q_cmsg) {
! 			qp->q_cmsg = qp->q_msg;
! 			qp->q_cmsglen = qp->q_msglen;
! 		} else if (qp->q_msg)
  			(void) free(qp->q_msg);
  		if ((qp->q_msg = (u_char *)malloc(BUFSIZ)) == NULL) {
  			syslog(LOG_NOTICE, "resp: malloc error\n");
***************
*** 2531,2537 ****
  /*
   *  This is best thought of as a "cache invalidate" function.
   *  It is called whenever a piece of data is determined to have
!  *  timed out.  It is better to have no information, than to
   *  have partial information you pass off as complete.
   */
  void
--- 2566,2573 ----
  /*
   *  This is best thought of as a "cache invalidate" function.
   *  It is called whenever a piece of data is determined to have
!  *  become invalid either through a timeout or a validation
!  *  failure.  It is better to have no information, than to
   *  have partial information you pass off as complete.
   */
  void
Only in m:\bindb32/named: ns_resp.c.orig
Only in m:\bindb32/named: patch1.txt
diff --context --recurs m:\bindb32/shres/netbsd/INSTALL m:\bindrel/shres/netbsd/INSTALL
*** m:\bindb32/shres/netbsd/INSTALL	Mon Dec 25 21:59:27 1995
--- m:\bindrel/shres/netbsd/INSTALL	Wed Jan 03 13:32:25 1996
***************
*** 18,33 ****
  and probably others (apologies if I've forgotten you).
  
  1.  Get and unpack a copy of BIND 4.9.3.  (This document is from that
!     distribution, as shres/INSTALL.)  BIND's home site is
!     gatekeeper.dec.com, and it lives in /pub/misc/vixie.  *** FIXME XXX
  
!     In the remainder of this document, $BINDSRC represents the directory
!     you unpacked the BIND distribution into.
  
! 2.  Configure it to your tastes by editing $BINDSRC/conf/options.h,
!     using $BINDSRC/OPTIONS as a guide to the available choices.  Not all
!     of the options affect the resolver library, but you probably want
!     the new named as well.  The one supplied with NetBSD 1.0 is from
      BIND 4.8.3.
  
  3.  (Optional) Use "make DST=NetBSD links" to create a shadow source
--- 18,33 ----
  and probably others (apologies if I've forgotten you).
  
  1.  Get and unpack a copy of BIND 4.9.3.  (This document is from that
!     distribution, as shres/netbsd/INSTALL.) See <URL:http://www.isc.org/isc/> 
!     for more information, including a pointer to the latest version.
  
!     In the remainder of this document, $BINDSRC represents the directory
!     you unpacked the BIND distribution into.
  
! 2.  Configure it to your tastes by editing $BINDSRC/conf/options.h,
!     using $BINDSRC/OPTIONS as a guide to the available choices.  Not all
!     of the options affect the resolver library, but you probably want
!     the new named as well.  The one supplied with NetBSD 1.0 is from
      BIND 4.8.3.
  
  3.  (Optional) Use "make DST=NetBSD links" to create a shadow source
***************
*** 72,75 ****
  BIND 4.9.3 resolver routines.
  
  
! #ident	   "@(#)bind/shres/netbsd:$Name:  $:$Id: INSTALL,v 8.1 1995/12/22 21:57:03 vixie Exp $"
--- 72,75 ----
  BIND 4.9.3 resolver routines.
  
  
! #ident	   "@(#)bind/shres/netbsd:$Name:  $:$Id: INSTALL,v 8.2 1995/12/29 07:16:23 vixie Exp $"
diff --context --recurs m:\bindb32/shres/netbsd/makeshlib m:\bindrel/shres/netbsd/makeshlib
*** m:\bindb32/shres/netbsd/makeshlib	Mon Dec 25 21:59:28 1995
--- m:\bindrel/shres/netbsd/makeshlib	Wed Jan 03 13:32:25 1996
***************
*** 3,18 ****
  #
  # makeshlib - installs libresolv_pic.a into SunOS 4.x or *BSD libc.so
  #
! #ident	   "@(#)bind/shres/netbsd:$Name:  $:$Id: makeshlib,v 8.2 1995/12/24 06:44:24 vixie Exp $"
  #
! # by Chris Davis <ckd@kei.com>
! # based on code by Piete Brooks <pb@cl.cam.ac.uk>
! #              and Dave Morrison <drmorris@mit.edu>
! # with additions by Greg A. Woods <woods@planix.com>
! # NetBSD support added by Matt Ragan <matt@ibmoto.com>
! # code cleanup and more error checking by Greg A. Woods <woods@planix.com>
  #
! # NOTE:  BIND doesn't build a profiled libresolv_p.a, but probably should.
  
  #
  # bindtree should be set to the root directory of the BIND distribution,
--- 3,18 ----
  #
  # makeshlib - installs libresolv_pic.a into SunOS 4.x or *BSD libc.so
  #
! #ident	   "@(#)bind/shres/netbsd:$Name:  $:$Id: makeshlib,v 8.3 1995/12/29 07:16:23 vixie Exp $"
  #
! # by Chris Davis <ckd@kei.com>
! # based on code by Piete Brooks <pb@cl.cam.ac.uk>
! #              and Dave Morrison <drmorris@mit.edu>
! # with additions by Greg A. Woods <woods@planix.com>
! # NetBSD support added by Matt Ragan <matt@ibmoto.com>
! # code cleanup and more error checking by Greg A. Woods <woods@planix.com>
  #
! # NOTE:  BIND doesn't build a profiled libresolv_p.a, but probably should.
  
  #
  # bindtree should be set to the root directory of the BIND distribution,
***************
*** 276,284 ****
  
  # we won't bother testing the SunOS libcs5.so* -- it should be OK....
  
! LD_LIBRARY_PATH=`pwd` date
  
! echo -n 'Does the output of date shown above look normal? [n] '
  read answer junk
  
  case "$answer" in
--- 276,284 ----
  
  # we won't bother testing the SunOS libcs5.so* -- it should be OK....
  
! LD_LIBRARY_PATH=`pwd` who am i
  
! echo -n 'Does the output of who shown above look normal? [n] '
  read answer junk
  
  case "$answer" in
***************
*** 326,332 ****
  
  case "${arch}" in
  SunOS)
! 	echo "For a simple test of $SHLIBNAME run 'trace /usr/bin/date'"
  	echo "and check which shared library is used."
  	echo "Run 'trace /usr/5bin/cat < /dev/null' to test $SH5LIBNAME."
  	;;
--- 326,332 ----
  
  case "${arch}" in
  SunOS)
! 	echo "For a simple test of $SHLIBNAME run 'trace /usr/bin/who'"
  	echo "and check which shared library is used."
  	echo "Run 'trace /usr/5bin/cat < /dev/null' to test $SH5LIBNAME."
  	;;
diff --context --recurs m:\bindb32/shres/solaris/INSTALL m:\bindrel/shres/solaris/INSTALL
*** m:\bindb32/shres/solaris/INSTALL	Mon Dec 25 21:59:27 1995
--- m:\bindrel/shres/solaris/INSTALL	Wed Jan 03 13:32:25 1996
***************
*** 1,15 ****
  Installing BIND 4.9.3 resolver code in Solaris 2.x shared libraries
  ===================================================================
  
! $Id: INSTALL,v 1.3 1995/10/07 21:49:57 dupuy Exp $
  
! by Alexander Dupuy <dupuy@smarts.com>
  
! Note that if you wish to modify this process, you should read and understand
! all of the file solshres/ISSUES.  In any case, you should read the first
! six items in shres/ISSUES.
  
! * The Solaris name service switch
  
    This explains why you might not need to install the resolver shared
    library at all.
--- 1,15 ----
  Installing BIND 4.9.3 resolver code in Solaris 2.x shared libraries
  ===================================================================
  
! $Id: INSTALL,v 1.4 1995/12/29 07:16:24 vixie Exp $
  
! by Alexander Dupuy <dupuy@smarts.com>
  
! Note that if you wish to modify this process, you should read and understand
! all of the file shres/solaris/ISSUES.  In any case, you should read the first
! six items in shres/solaris/ISSUES.
  
! * The Solaris name service switch
  
    This explains why you might not need to install the resolver shared
    library at all.
***************
*** 54,60 ****
  SUCH DAMAGE.]
  
  1.  Get and unpack a copy of BIND 4.9.3.  (This document is from that
!     distribution, as solshres/INSTALL.)  See <URL:http://www.isc.org/isc/>
      for more information, including a pointer to the latest version.
  
      In the remainder of this document, $BINDSRC represents the directory
--- 54,60 ----
  SUCH DAMAGE.]
  
  1.  Get and unpack a copy of BIND 4.9.3.  (This document is from that
!     distribution, as shres/solaris/INSTALL.)  See <URL:http://www.isc.org/isc/>
      for more information, including a pointer to the latest version.
  
      In the remainder of this document, $BINDSRC represents the directory
***************
*** 83,89 ****
      resolver code to install in the shared library, uncomment the SHRES
      line, as well as the appropriate SHCC and PIC lines.  If you have gcc,
      you can use it for SHCC, as it shares the read-only data by default (see
!     $BINDSRC/solshres/ISSUES for more details).  The SunPro cc can also do
      this if you give it the -xstrconst flag.  If you want to use the shared
      resolver library for BIND executables, make sure you uncomment the line
      which defines RES as $(SHRES)/libresolv.so, and make sure you have
--- 83,89 ----
      resolver code to install in the shared library, uncomment the SHRES
      line, as well as the appropriate SHCC and PIC lines.  If you have gcc,
      you can use it for SHCC, as it shares the read-only data by default (see
!     $BINDSRC/shres/solaris/ISSUES for more details).  The SunPro cc can also do
      this if you give it the -xstrconst flag.  If you want to use the shared
      resolver library for BIND executables, make sure you uncomment the line
      which defines RES as $(SHRES)/libresolv.so, and make sure you have
diff --context --recurs m:\bindb32/shres/solaris/ISSUES m:\bindrel/shres/solaris/ISSUES
*** m:\bindb32/shres/solaris/ISSUES	Mon Dec 25 21:59:27 1995
--- m:\bindrel/shres/solaris/ISSUES	Wed Jan 03 13:32:25 1996
***************
*** 1,19 ****
  Issues with BIND 4.9.3 resolver code and Solaris 2.x shared libraries
  =====================================================================
  
! $Id: ISSUES,v 1.3 1995/10/07 21:49:57 dupuy Exp $
  
! Shared library configuration for BIND on Solaris is probably even more of a
! black art than it is on SunOS (although, in fact, it is much simpler).  This
! file sets down some important issues that should be understood in order to
! upgrade the resolver library on Solaris.
  
! by Alexander Dupuy <dupuy@smarts.com>
  
  =======================================================================
  The following six items should be read by everyone; they expand upon
! installation techniques and issues discussed in solshres/INSTALL, as well
! as items that may need to be addressed after installing BIND.
  =======================================================================
  
  * The Solaris name service switch
--- 1,19 ----
  Issues with BIND 4.9.3 resolver code and Solaris 2.x shared libraries
  =====================================================================
  
! $Id: ISSUES,v 1.5 1995/12/31 23:28:19 vixie Exp $
  
! Shared library configuration for BIND on Solaris is probably even more of a
! black art than it is on SunOS (although, in fact, it is much simpler).  This
! file sets down some important issues that should be understood in order to
! upgrade the resolver library on Solaris.
  
! by Alexander Dupuy <dupuy@smarts.com>
  
  =======================================================================
  The following six items should be read by everyone; they expand upon
! installation techniques and issues discussed in shres/solaris/INSTALL, as
! well as items that may need to be addressed after installing BIND.
  =======================================================================
  
  * The Solaris name service switch
***************
*** 237,243 ****
  problems with code compiled -fpic, and the GNU linker may not be able to
  properly generate a Solaris shared library.
  
! Currently (4.9.3 resolv and gcc 2.5.8 on SPARC), the resolv library does
  not create any special gcc references.  Specifically, there are no
  unresolved references in the resolv objects, that are present in libgcc.a.
  This means that even if you compile with gcc, the objects created may be
--- 237,243 ----
  problems with code compiled -fpic, and the GNU linker may not be able to
  properly generate a Solaris shared library.
  
! Currently (4.9.3 resolv and gcc 2.7.0 on SPARC), the resolv library does
  not create any special gcc references.  Specifically, there are no
  unresolved references in the resolv objects, that are present in libgcc.a.
  This means that even if you compile with gcc, the objects created may be
***************
*** 247,252 ****
--- 247,277 ----
  new release of gcc or BIND - not likely to change, but possible), you can
  still use gcc and create objects usable by any compiler.  You will need to
  add libgcc.a to the shared library link line.
+ 
+ * gcc won't compile -fpic code, but cc will compile -pic
+ 
+ You probably installed gcc to use GNU as.  Run gcc -v to find gcc's
+ library directory:
+ 
+ % gcc -v
+ Reading specs from /usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.4/2.7.0/specs
+ gcc version 2.7.0
+ 
+ In this case, if GCC is using GNU as, it's probably installed in this
+ directory as /usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.4/2.7.0/as. 
+ (It may also be in your path ahead of /usr/ccs/bin/as.)
+ 
+ GNU as does not support position-independent code.
+ 
+ Solutions:
+ 
+ - (best) change SHCC to "gcc -B/usr/ccs/bin/ -DSVR4 -D_SYS_STREAM_H".  
+   This will force gcc to use /usr/ccs/bin/as rather than any other one.
+ 
+ - use cc instead of gcc for SHCC.  Suboptimal, since cc can't share the
+   read-only data (strings and the like).
+ 
+ - remove GNU as and use Sun's as.
  
  * shared archives (aka "what about the .sa files?")
  
diff --context --recurs m:\bindb32/shres/sunos/INSTALL m:\bindrel/shres/sunos/INSTALL
*** m:\bindb32/shres/sunos/INSTALL	Mon Dec 25 21:59:27 1995
--- m:\bindrel/shres/sunos/INSTALL	Wed Jan 03 13:32:24 1996
***************
*** 1,30 ****
  Installing BIND 4.9.3 resolver code in SunOS 4.1.x shared libraries
  ===================================================================
  
! $Id: INSTALL,v 8.4 1995/12/25 07:48:25 vixie Exp $
  
! by Chris Davis <ckd@kei.com>
  
! based on code, documentation, and suggestions by:
!   Paul Balyoz <pab@naucse.cse.nau.edu>
!   Piete Brooks <pb@cl.cam.ac.uk>
!   Dave Morrison <drmorris@mit.edu>
!   Hal Pomeranz <pomeranz@nas.nasa.gov>
!   Matt Ragan <matt@ibmoto.com>
    Greg A. Woods <woods@kuma.web.net>
    Eduard Vopicka <Eduard.Vopicka@vse.cz>
  and probably others (apologies if I've forgotten you).
  
  Note that if you wish to modify this process, you should read and understand
! the file shres/ISSUES.
  
! If you have problems with the process (or its aftermath), see shres/PROBLEMS.
  
  You should read through this whole file BEFORE BEGINNING.  I mean it.  I
  really mean it.  The shared library is the second most important part of
  SunOS (right behind /vmunix).  If you screw it up you will be very very
! unhappy and so will your users.  You should also read shres/PROBLEMS before
! starting, if only to know what sort of things to watch out for.
  
  [Disclaimer: 
  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
--- 1,31 ----
  Installing BIND 4.9.3 resolver code in SunOS 4.1.x shared libraries
  ===================================================================
  
! $Id: INSTALL,v 8.5 1995/12/29 07:16:25 vixie Exp $
  
! by Chris Davis <ckd@kei.com>
  
! based on code, documentation, and suggestions by:
!   Paul Balyoz <pab@naucse.cse.nau.edu>
!   Piete Brooks <pb@cl.cam.ac.uk>
!   Dave Morrison <drmorris@mit.edu>
!   Hal Pomeranz <pomeranz@nas.nasa.gov>
!   Matt Ragan <matt@ibmoto.com>
    Greg A. Woods <woods@kuma.web.net>
    Eduard Vopicka <Eduard.Vopicka@vse.cz>
  and probably others (apologies if I've forgotten you).
  
  Note that if you wish to modify this process, you should read and understand
! the file shres/sunos/ISSUES.
  
! If you have problems with the process (or its aftermath) see; 
! shres/sunos/PROBLEMS.
  
  You should read through this whole file BEFORE BEGINNING.  I mean it.  I
  really mean it.  The shared library is the second most important part of
  SunOS (right behind /vmunix).  If you screw it up you will be very very
! unhappy and so will your users.  You should also read shres/sunos/PROBLEMS 
! before starting, if only to know what sort of things to watch out for.
  
  [Disclaimer: 
  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
***************
*** 40,47 ****
  SUCH DAMAGE.]
  
  1.  Get and unpack a copy of BIND 4.9.3.  (This document is from that
!     distribution, as shres/INSTALL.)  See <URL:http://www.isc.org/isc/> for
!     more information, including a pointer to the latest version.
  
      In the remainder of this document, $BINDSRC represents the directory
      you unpacked the BIND distribution into, and $BINDBUILD represents the
--- 41,48 ----
  SUCH DAMAGE.]
  
  1.  Get and unpack a copy of BIND 4.9.3.  (This document is from that
!     distribution, as shres/sunos/INSTALL.)  See <URL:http://www.isc.org/isc/> 
!     for more information, including a pointer to the latest version.
  
      In the remainder of this document, $BINDSRC represents the directory
      you unpacked the BIND distribution into, and $BINDBUILD represents the
***************
*** 70,77 ****
      To build resolver code to install in the shared library, uncomment the
      SHRES line, as well as the appropriate SHCC and PIC lines.  If you
      have gcc, you should use it for SHCC, as it can share the read-only
!     data (see $BINDSRC/shres/ISSUES for more details).  I also use it as
!     CC to compile named, libresolv.a, and the tools.
  
  5.  (Optional) Add $BINDSRC/bin to your path, and "make depend".
  
--- 71,78 ----
      To build resolver code to install in the shared library, uncomment the
      SHRES line, as well as the appropriate SHCC and PIC lines.  If you
      have gcc, you should use it for SHCC, as it can share the read-only
!     data (see $BINDSRC/shres/sunos/ISSUES for more details).  I also use it
!     as CC to compile named, libresolv.a, and the tools.
  
  5.  (Optional) Add $BINDSRC/bin to your path, and "make depend".
  
***************
*** 111,134 ****
  
  Perform the following steps to integrate the shareable resolver library
  code (libresolv_pic.a) into the shared libc (for both BSD and SysV
! universes).  If you use the $BINDSRC/shres/makeshlib script, steps 8-18
! will be done for you; read them anyway.
  
  The makeshlib script does minimal error checking and is mostly a quick &
  dirty convenience for people tired of typing commands.  If it fails on
  your system, you'll probably have to do part or all of the installation
  manually instead.  (Please also let me know; I'll try to check for that
! problem, or at least document it in shres/PROBLEMS.)
  
  Note that some or all of these steps may need to be done as root.  You
  should read the makeshlib script carefully before running it as root.
  
! You may wish to run makeshlib as "sh -x shres/makeshlib" to view the
  commands as they are executed as a progress indicator.
  
  Note that the makeshlib command will fail if you used "make links" to
  create a $BINDBUILD tree but run it from the original $BINDSRC.  It will
! also fail if you try to run it before you compile shres/libresolv_pic.a,
  or if you didn't uncomment the SHRES stuff in $BINDBUILD/Makefile.  So
  don't do any of those things.  As I said, "minimal error checking".
  
--- 112,135 ----
  
  Perform the following steps to integrate the shareable resolver library
  code (libresolv_pic.a) into the shared libc (for both BSD and SysV
! universes).  If you use the $BINDSRC/shres/sunos/makeshlib script, steps 
! 8-18 will be done for you; read them anyway.
  
  The makeshlib script does minimal error checking and is mostly a quick &
  dirty convenience for people tired of typing commands.  If it fails on
  your system, you'll probably have to do part or all of the installation
  manually instead.  (Please also let me know; I'll try to check for that
! problem, or at least document it in shres/sunos/PROBLEMS.)
  
  Note that some or all of these steps may need to be done as root.  You
  should read the makeshlib script carefully before running it as root.
  
! You may wish to run makeshlib as "sh -x shres/sunos/makeshlib" to view the
  commands as they are executed as a progress indicator.
  
  Note that the makeshlib command will fail if you used "make links" to
  create a $BINDBUILD tree but run it from the original $BINDSRC.  It will
! also fail if you try to run it before compiling shres/sunos/libresolv_pic.a,
  or if you didn't uncomment the SHRES stuff in $BINDBUILD/Makefile.  So
  don't do any of those things.  As I said, "minimal error checking".
  
***************
*** 145,151 ****
      Note that Sun's documentation (/usr/lib/shlib.etc/README) omits the
      last "mv" command.  This will result in "undefined symbol" errors for
      the four symbols mbstowcs_xccs, mbtowc_xccs, wcstombs_xccs, and
!     wctomb_xccs.  (See shres/PROBLEMS for more details.)
  
        cd tmp
        ar x ../libc_pic.a
--- 146,152 ----
      Note that Sun's documentation (/usr/lib/shlib.etc/README) omits the
      last "mv" command.  This will result in "undefined symbol" errors for
      the four symbols mbstowcs_xccs, mbtowc_xccs, wcstombs_xccs, and
!     wctomb_xccs.  (See shres/sunos/PROBLEMS for more details.)
  
        cd tmp
        ar x ../libc_pic.a
***************
*** 157,164 ****
  10. Extract the shareable libresolv_pic.a into this target directory.
      This will replace Sun's inet_addr.o, which is ok; this one is better.
      It will also replace Sun's getnetent.o, which is ok, as long as you
!     have DNS entries for your networks (as in RFC 1101).  See shres/ISSUES
!     for details on why this is a Good Thing in my opinion.
  
      If you want to keep using NIS or /etc/networks instead, you'll need to
      save Sun's getnetent.o, remove BIND's getnet* files, and put Sun's
--- 158,165 ----
  10. Extract the shareable libresolv_pic.a into this target directory.
      This will replace Sun's inet_addr.o, which is ok; this one is better.
      It will also replace Sun's getnetent.o, which is ok, as long as you
!     have DNS entries for your networks (as in RFC 1101).  See the file
!     shres/sunos/ISSUES for details on why this is a Good Thing in my opinion.
  
      If you want to keep using NIS or /etc/networks instead, you'll need to
      save Sun's getnetent.o, remove BIND's getnet* files, and put Sun's
***************
*** 171,177 ****
      Make sure that Sun's mktemp.o and strpbrk.o don't get stomped; you
      need to use Sun's, not the ones in BIND's compat/lib.
  
!       ar x $BINDBUILD/shres/libresolv_pic.a
        rm __.SYMDEF
  
  11. Make sure the old host resolver is not still lying around:
--- 172,178 ----
      Make sure that Sun's mktemp.o and strpbrk.o don't get stomped; you
      need to use Sun's, not the ones in BIND's compat/lib.
  
!       ar x $BINDBUILD/shres/sunos/libresolv_pic.a
        rm __.SYMDEF
  
  11. Make sure the old host resolver is not still lying around:
***************
*** 188,197 ****
      1.9.1 for the "next" revision).
  
      You should fix these problems by applying (using the 'patch' program) the
!     patch file $BINDSRC/shres/sun-awkfile.patches.
  
        cd /usr/lib/shlib.etc
!       patch < $BINDSRC/shres/sun-awkfile.patches
  
      Even with these fixes, it may get the wrong version number; you may need
      to rename the files by hand.  (Skipping a "custom" number is not unsafe,
--- 189,198 ----
      1.9.1 for the "next" revision).
  
      You should fix these problems by applying (using the 'patch' program) the
!     patch file $BINDSRC/shres/sunos/sun-awkfile.patches.
  
        cd /usr/lib/shlib.etc
!       patch < $BINDSRC/shres/sunos/sun-awkfile.patches
  
      Even with these fixes, it may get the wrong version number; you may need
      to rename the files by hand.  (Skipping a "custom" number is not unsafe,
***************
*** 200,206 ****
  
  13. Now you need to add the BIND resolver object files to the lorder-sparc
      file.  The easiest way to do this is to apply (using the 'patch' program)
!     the patch file $BINDSRC/shres/sun-lorder-sparc.patches.
  
      If you removed the getnet* objects in step 10, you should remove the
      references to them after applying the patch.  (Don't remove the reference
--- 201,207 ----
  
  13. Now you need to add the BIND resolver object files to the lorder-sparc
      file.  The easiest way to do this is to apply (using the 'patch' program)
!     the patch file $BINDSRC/shres/sunos/sun-lorder-sparc.patches.
  
      If you removed the getnet* objects in step 10, you should remove the
      references to them after applying the patch.  (Don't remove the reference
***************
*** 268,275 ****
       obviously suboptimal.  Fix your shared libc once and for all.
  
       The easiest way to fix these problems in /usr/lib/shlib.etc/Makefile is
!      to apply (using the 'patch' program) the two patch files
!      $BINDSRC/shres/sun-Makefile.patch1 & $BINDSRC/shres/sun-Makefile.patch2.
       If you have the patched 4.1.3 version of the Makefile, the second patch
       will fail; this can safely be ignored.
  
--- 269,278 ----
       obviously suboptimal.  Fix your shared libc once and for all.
  
       The easiest way to fix these problems in /usr/lib/shlib.etc/Makefile is
!      to apply (using the 'patch' program) the two patch files;
!      $BINDSRC/shres/sunos/sun-Makefile.patch1 
!      and
!      $BINDSRC/shres/sunos/sun-Makefile.patch2.
       If you have the patched 4.1.3 version of the Makefile, the second patch
       will fail; this can safely be ignored.
  
***************
*** 283,298 ****
  
            SOLUTION: start over; you did something wrong when you compiled
  	  libresolv_pic.a in step 4, above.  Make SURE you're using the
! 	  libresolv_pic.a that was built in $BINDBUILD/shres, and not the
! 	  "normal" libresolv.a built in $BINDBUILD/res.
  
         b. It lists hundreds of error lines about offsets or addresses
  	  being wrong in all your resolver .o files.
  
            SOLUTION: start over; you needed to specify "-pic" or "-fpic" to
! 	  the C compiler when building shres/libresolv_pic.a.  Make sure
! 	  you're using libresolv_pic.a, and make sure that SHCC and PIC
! 	  were properly defined in $BINDBUILD/Makefile.
  
  16.  To build the System V shared libc, repeat steps 8-11, using
       'libcs5_pic.a' instead of 'libc_pic.a', then 'make libcs5.so'.
--- 286,301 ----
  
            SOLUTION: start over; you did something wrong when you compiled
  	  libresolv_pic.a in step 4, above.  Make SURE you're using the
! 	  libresolv_pic.a that was built in $BINDBUILD/shres/sunos, and not
! 	  the "normal" libresolv.a built in $BINDBUILD/res.
  
         b. It lists hundreds of error lines about offsets or addresses
  	  being wrong in all your resolver .o files.
  
            SOLUTION: start over; you needed to specify "-pic" or "-fpic" to
! 	  the C compiler when building shres/sunos/libresolv_pic.a.  Make
! 	  sure you're using libresolv_pic.a, and make sure that SHCC and
! 	  PIC were properly defined in $BINDBUILD/Makefile.
  
  16.  To build the System V shared libc, repeat steps 8-11, using
       'libcs5_pic.a' instead of 'libc_pic.a', then 'make libcs5.so'.
***************
*** 348,354 ****
       object.  A few preliminary tests indicate missing this step can
       marginally slow down processes, although it necessarily a depends on
       the program and the machine in question.  For more details on this,
!      see $BINDSRC/shres/ISSUES.
  
       The numbers y and z must match the numbers in the shared object above.
  
--- 351,357 ----
       object.  A few preliminary tests indicate missing this step can
       marginally slow down processes, although it necessarily a depends on
       the program and the machine in question.  For more details on this,
!      see $BINDSRC/shres/sunos/ISSUES.
  
       The numbers y and z must match the numbers in the shared object above.
  
***************
*** 389,395 ****
       sendmail) to be compiled against the BIND resolver (highly
       recommended).
  
! You should now read the first four items in shres/ISSUES.
  
  * "Differences between Sun's resolver and BIND's resolver"
  
--- 392,398 ----
       sendmail) to be compiled against the BIND resolver (highly
       recommended).
  
! You should now read the first four items in shres/sunos/ISSUES.
  
  * "Differences between Sun's resolver and BIND's resolver"
  
***************
*** 416,435 ****
  
  If you have problems compiling certain programs, or with other aspects of
  your system, after installing the BIND resolver, you should read
! shres/PROBLEMS.
  
  In particular:
  
  ** If you are compiling GNU Emacs/XEmacs or Berkeley sendmail V8 ** 
  
! you should read the entry in shres/PROBLEMS titled "undefined symbol
  _strerror when compiling -Bstatic".  If this happens, either add -l44bsd
  to the link step, add strerror.o to /usr/lib/libc.a (as described in
! shres/ISSUES), or link dynamically instead of statically.
  
  ** If you are compiling GNU Emacs or NCSA httpd **
  
! you should read the entry in shres/PROBLEMS titled ""parse error" on
  inet.h, nameser.h, resolv.h, netdb.h, bitypes.h".  If you get these errors
  from your cpp, you may choose to define the preprocessor symbol "BSD" to a
  small numeric value (such as "42"), or you may wish to edit the header
--- 419,438 ----
  
  If you have problems compiling certain programs, or with other aspects of
  your system, after installing the BIND resolver, you should read
! shres/sunos/PROBLEMS.
  
  In particular:
  
  ** If you are compiling GNU Emacs/XEmacs or Berkeley sendmail V8 ** 
  
! you should read the entry in shres/sunos/PROBLEMS titled "undefined symbol
  _strerror when compiling -Bstatic".  If this happens, either add -l44bsd
  to the link step, add strerror.o to /usr/lib/libc.a (as described in
! shres/sunos/ISSUES), or link dynamically instead of statically.
  
  ** If you are compiling GNU Emacs or NCSA httpd **
  
! you should read the entry in shres/sunos/PROBLEMS titled ""parse error" on
  inet.h, nameser.h, resolv.h, netdb.h, bitypes.h".  If you get these errors
  from your cpp, you may choose to define the preprocessor symbol "BSD" to a
  small numeric value (such as "42"), or you may wish to edit the header
***************
*** 437,442 ****
  
  ** If you are using Sun's "C2 security" shadowed passwords **
  
! you should read the entry in shres/PROBLEMS titled "login gives "hostname
! is bad for this system" errors (users can't log in)".  This will explain
! how to diagnose (and cure) this problem.
--- 440,445 ----
  
  ** If you are using Sun's "C2 security" shadowed passwords **
  
! you should read the entry in shres/sunos/PROBLEMS titled "login gives
! "hostname is bad for this system" errors (users can't log in)".  This 
! will explain how to diagnose (and cure) this problem.
diff --context --recurs m:\bindb32/shres/sunos/ISSUES m:\bindrel/shres/sunos/ISSUES
*** m:\bindb32/shres/sunos/ISSUES	Mon Dec 25 21:59:27 1995
--- m:\bindrel/shres/sunos/ISSUES	Wed Jan 03 13:32:24 1996
***************
*** 1,19 ****
  Issues with BIND 4.9.3 resolver code and SunOS 4.1.x shared libraries
  =====================================================================
  
! $Id: ISSUES,v 1.1 1995/12/07 02:36:21 vixie Exp $
  
! Changes to the shared library setup have lots of little pitfalls and
! mines.  This is an attempt to map the minefield, for those who feel
! they've noticed something that they think should be done another way.
  
! by Chris Davis <ckd@kei.com>
  
! heavily based on a document by Dave Morrison <drmorris@mit.edu>, 2/3/94
  
  =======================================================================
  The following five items should be read by everyone; they expand upon
! installation techniques and issues discussed in shres/INSTALL, as well as
  items that may need to be addressed after installing BIND.
  =======================================================================
  
--- 1,19 ----
  Issues with BIND 4.9.3 resolver code and SunOS 4.1.x shared libraries
  =====================================================================
  
! $Id: ISSUES,v 1.2 1995/12/29 07:16:25 vixie Exp $
  
! Changes to the shared library setup have lots of little pitfalls and
! mines.  This is an attempt to map the minefield, for those who feel
! they've noticed something that they think should be done another way.
  
! by Chris Davis <ckd@kei.com>
  
! heavily based on a document by Dave Morrison <drmorris@mit.edu>, 2/3/94
  
  =======================================================================
  The following five items should be read by everyone; they expand upon
! installation techniques and issues discussed in shres/sunos/INSTALL, as well as
  items that may need to be addressed after installing BIND.
  =======================================================================
  
***************
*** 183,189 ****
  the worst case is not a likely scenario, but I'd rather be safe then
  sorry.
  
! This is why shres/Makefile does -D_res=_res_shlib.  The collision is
  removed.  This means that _res is not accessible as a global variable in
  the shared libc library.  To compile a program which accesses _res
  directly, libresolv must linked in statically.
--- 183,189 ----
  the worst case is not a likely scenario, but I'd rather be safe then
  sorry.
  
! This is why shres/sunos/Makefile does -D_res=_res_shlib.  The collision is
  removed.  This means that _res is not accessible as a global variable in
  the shared libc library.  To compile a program which accesses _res
  directly, libresolv must linked in statically.
diff --context --recurs m:\bindb32/shres/sunos/PROBLEMS m:\bindrel/shres/sunos/PROBLEMS
*** m:\bindb32/shres/sunos/PROBLEMS	Mon Dec 25 21:59:27 1995
--- m:\bindrel/shres/sunos/PROBLEMS	Wed Jan 03 13:32:24 1996
***************
*** 1,16 ****
  Common problems with installing BIND 4.9.3 on SunOS 4.1.x
  =========================================================
  
! $Id: PROBLEMS,v 8.3 1995/01/11 08:58:09 vixie Exp $
  
! by Chris Davis <ckd@kei.com>
  
! There are a number of potential trouble spots when installing BIND 4.9.3
! on a SunOS 4.1.x system (though the rewards, in my opinion, far outweigh
! the risks).  This file is an incomplete and partial list of them, with
! solutions and/or workarounds.  Comments and additions are appreciated.
  
! Note that you should read the file shres/INSTALL *thoroughly* before
  beginning the installation of BIND's resolver code in your shared library.
  
  * undefined symbols _dlopen, _dlclose, _dlsym (unless you -ldl)
--- 1,16 ----
  Common problems with installing BIND 4.9.3 on SunOS 4.1.x
  =========================================================
  
! $Id: PROBLEMS,v 8.4 1995/12/29 07:16:25 vixie Exp $
  
! by Chris Davis <ckd@kei.com>
  
! There are a number of potential trouble spots when installing BIND 4.9.3
! on a SunOS 4.1.x system (though the rewards, in my opinion, far outweigh
! the risks).  This file is an incomplete and partial list of them, with
! solutions and/or workarounds.  Comments and additions are appreciated.
  
! Note that you should read the file shres/sunos/INSTALL *thoroughly* before
  beginning the installation of BIND's resolver code in your shared library.
  
  * undefined symbols _dlopen, _dlclose, _dlsym (unless you -ldl)
***************
*** 28,34 ****
  even the copy included with most "jumbo libc patches", doesn't include the
  -ldl, you may have already found this problem.
  
! Solution: The file shres/sun-Makefile.patch2 will add -ldl to the
  appropriate lines in /usr/lib/shlib.etc/Makefile, as will some (but not
  all!) versions of the various "jumbo libc" patches.  The lines beginning
  with "ld -assert" should both end with "-ldl".
--- 28,34 ----
  even the copy included with most "jumbo libc patches", doesn't include the
  -ldl, you may have already found this problem.
  
! Solution: The file shres/sunos/sun-Makefile.patch2 will add -ldl to the
  appropriate lines in /usr/lib/shlib.etc/Makefile, as will some (but not
  all!) versions of the various "jumbo libc" patches.  The lines beginning
  with "ld -assert" should both end with "-ldl".
***************
*** 44,51 ****
  They lied; you need to do *three*.  "mv xccs.multibyte. xccs.multibyte.o"
  at the end of step 3 in /usr/lib/shlib.etc/README.
  
! Solution: shres/INSTALL tells you about, and shres/makeshlib renames, all
! three files.
  
  * undefined symbol _strerror when compiling -Bstatic
  
--- 44,51 ----
  They lied; you need to do *three*.  "mv xccs.multibyte. xccs.multibyte.o"
  at the end of step 3 in /usr/lib/shlib.etc/README.
  
! Solution: shres/sunos/INSTALL tells you about, and shres/makeshlib renames, 
! all three files.
  
  * undefined symbol _strerror when compiling -Bstatic
  
***************
*** 56,62 ****
  didn't add -l44bsd to bring it in, either.
  
  Solutions: Link with -l44bsd, link dynamically instead of statically, or
! include strerror.o in the non-shared libc as well (see shres/ISSUES,
  "Modifying the static libc").
  
  * "parse error" on inet.h, nameser.h, resolv.h, netdb.h, bitypes.h
--- 56,62 ----
  didn't add -l44bsd to bring it in, either.
  
  Solutions: Link with -l44bsd, link dynamically instead of statically, or
! include strerror.o in the non-shared libc as well (see shres/sunos/ISSUES,
  "Modifying the static libc").
  
  * "parse error" on inet.h, nameser.h, resolv.h, netdb.h, bitypes.h
***************
*** 125,131 ****
  Solution: link programs that use _res directly with -lresolv.  This should
  be done anyway as the _res internals may change or disappear in different
  BIND versions.  For more details on why _res_shlib is used, see
! shres/ISSUES, "global variable collision".
  
  * /etc/hosts or NIS not consulted for host lookups
  
--- 125,131 ----
  Solution: link programs that use _res directly with -lresolv.  This should
  be done anyway as the _res internals may change or disappear in different
  BIND versions.  For more details on why _res_shlib is used, see
! shres/sunos/ISSUES, "global variable collision".
  
  * /etc/hosts or NIS not consulted for host lookups
  
***************
*** 205,212 ****
  object files.  BIND's getnetnamadr.o defines these.
  
  You would normally only do this if you wanted to use /etc/networks instead
! of the DNS for network names.  (See shres/ISSUES for why I recommend using
! RFC 1101 for network names instead.)
  
  Solution: Delete *ALL* of BIND's getnet* objects before building the
  shared library.
--- 205,212 ----
  object files.  BIND's getnetnamadr.o defines these.
  
  You would normally only do this if you wanted to use /etc/networks instead
! of the DNS for network names.  (See shres/sunos/ISSUES for why I recommend 
! using RFC 1101 for network names instead.)
  
  Solution: Delete *ALL* of BIND's getnet* objects before building the
  shared library.
diff --context --recurs m:\bindb32/tools/dig.c m:\bindrel/tools/dig.c
*** m:\bindb32/tools/dig.c	Mon Dec 25 21:59:16 1995
--- m:\bindrel/tools/dig.c	Wed Jan 03 13:32:08 1996
***************
*** 1,14 ****
  #ifndef lint
! static char rcsid[] = "$Id: dig.c,v 8.5 1995/12/03 08:31:18 vixie Exp $";
  #endif
  
! /*
!  * ++Copyright++ 1989
   * -
!  * Copyright (c) 1989
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,14 ----
  #ifndef lint
! static char rcsid[] = "$Id: dig.c,v 8.6 1995/12/29 21:08:13 vixie Exp $";
  #endif
  
! /*
!  * ++Copyright++ 1989
   * -
!  * Copyright (c) 1989
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 288,293 ****
--- 288,294 ----
  	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;
diff --context --recurs m:\bindb32/tools/nslookup/getinfo.c m:\bindrel/tools/nslookup/getinfo.c
*** m:\bindb32/tools/nslookup/getinfo.c	Mon Dec 25 21:59:15 1995
--- m:\bindrel/tools/nslookup/getinfo.c	Wed Jan 03 13:32:06 1996
***************
*** 55,70 ****
  
  #ifndef lint
  static char sccsid[] = "@(#)getinfo.c	5.26 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: getinfo.c,v 8.2 1995/12/03 08:31:19 vixie Exp $";
! #endif /* not lint */
  
  /*
   ******************************************************************************
   *
!  *  getinfo.c --
   *
!  *	Routines to create requests to name servers
!  *	and interpret the answers.
   *
   *	Adapted from 4.3BSD BIND gethostnamadr.c
   *
--- 55,70 ----
  
  #ifndef lint
  static char sccsid[] = "@(#)getinfo.c	5.26 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: getinfo.c,v 8.3 1995/12/29 07:16:27 vixie Exp $";
! #endif /* not lint */
  
  /*
   ******************************************************************************
   *
!  *  getinfo.c --
   *
!  *	Routines to create requests to name servers
!  *	and interpret the answers.
   *
   *	Adapted from 4.3BSD BIND gethostnamadr.c
   *
***************
*** 604,610 ****
       * If there are dots in the name already, let's just give it a try
       * 'as is'.  The threshold can be set with the "ndots" option.
       */
!     if (n >= _res.ndots) {
  	    result = GetHostDomain(nsAddrPtr, queryClass, queryType,
  				   name, (char *)NULL, hostPtr, isServer);
              if (result == SUCCESS)
--- 604,610 ----
       * If there are dots in the name already, let's just give it a try
       * 'as is'.  The threshold can be set with the "ndots" option.
       */
!     if (n >= (int)_res.ndots) {
  	    result = GetHostDomain(nsAddrPtr, queryClass, queryType,
  				   name, (char *)NULL, hostPtr, isServer);
              if (result == SUCCESS)
