diffs for bind 4.8 resolver to work on 2.10BSD

Stan Barber sob at eyeball.ophth.bcm.tmc.edu
Thu Jun 2 16:53:39 AEST 1988


If you want to run the latest release of the resolver library on your
2.10BSD system, you need to obtain the lastest release from Berkeley
and apply these patches to the include and res directories. It should
not affect the use of these same files on systems other than 2.10BSD
so you can maintain a common source if you like.

I have not (nor will I try) to make the name server itself work.

Instructions: cd to the root of the bind source and run this through patch.
Following that, cd res/named and cp gethostnamadr.c gethnamadr.c. This makes
a copy of the file that 2.10BSD file systems can handle.

You can plug the include stuff directly into the /usr/include directories 
and the res stuff into /usr/src/lib/libc/net. Recompile libc and then
recompile the appropriate utilities.

Index: include/netdb.h
*** netdb.h	Tue Apr  5 12:44:10 1988
--- /usr/include/netdb.h	Tue May 31 18:37:51 1988
***************
*** 12,17 ****
--- 12,20 ----
   *	@(#)netdb.h	5.9 (Berkeley) 4/5/88
   */
  
+ #ifdef pdp11
+ #include <short_names.h>
+ #endif
  /*
   * Structures returned by network
   * data base library.  All addresses
***************
*** 36,42 ****
--- 39,49 ----
  	char		*n_name;	/* official name of net */
  	char		**n_aliases;	/* alias list */
  	int		n_addrtype;	/* net address type */
+ #ifdef pdp11
+ 	long		n_net;
+ #else
  	unsigned long	n_net;		/* network # */
+ #endif
  };
  
  struct	servent {
Index: include/arpa/nameser.h
*** nameser.h	Tue Nov 17 12:05:19 1987
--- /usr/include/arpa/nameser.h	Tue May 31 21:02:13 1988
***************
*** 137,144 ****
--- 137,159 ----
  	u_char	pr:1;		/* primary server required (non standard) */
  	u_char	ra:1;		/* recursion available */
  #else
+ #if defined (pdp11) || defined (BIT_ZERO_ON_RIGHT_BUT_COMPILER_STUPID)
+ 	/* Bit zero on right, compiler doesn't like u_char bit fields:  PDP */
+ 			/* fields in third byte */
+ 	u_int	rd:1;		/* recursion desired */
+ 	u_int	tc:1;		/* truncated message */
+ 	u_int	aa:1;		/* authoritive answer */
+ 	u_int	opcode:4;	/* purpose of message */
+ 	u_int	qr:1;		/* response flag */
+ 			/* fields in fourth byte */
+ 	u_int	rcode:4;	/* response code */
+ 	u_int	unused:2;	/* unused bits */
+ 	u_int	pr:1;		/* primary server required (non standard) */
+ 	u_int	ra:1;		/* recursion available */
+ #else
  	/* you must determine what the correct bit order is for your compiler */
  	UNDEFINED_BIT_ORDER;
+ #endif
  #endif
  #endif
  			/* remaining bytes */
Index: res/named/gethostnamadr.c
*** gethostnamadr.c	Mon Mar 14 11:49:57 1988
--- /usr/src/lib/libc/net/named/gethnamadr.c	Tue May 31 21:54:46 1988
***************
*** 24,29 ****
--- 24,35 ----
  #include <arpa/inet.h>
  #include <arpa/nameser.h>
  #include <resolv.h>
+ #ifdef pdp11
+ #define host_addrs	h_addrs
+ #define _gethtbyaddr	_ghtbaddr
+ #define _gethtbyname	_ghtbname
+ #define	_gethtent	_ghtent
+ #endif
  
  #define	MAXALIASES	35
  #define	MAXADDRS	35



More information about the Comp.bugs.2bsd mailing list