Delivery-Date: Sun, 25 Jun 1995 17:07:24 -0700
Return-Path: jjb@jagware.bcc.com
Received: by gw.home.vix.com id AA05577; Sun, 25 Jun 95 17:07:16 -0700
Received: by jagware.bcc.com (/\oo/\ Smail3.1.29.1 #29.3)
	id <m0sQ1hr-00002bC@jagware.bcc.com>; Sun, 25 Jun 95 17:07 PDT
Message-Id: <m0sQ1hr-00002bC@jagware.bcc.com>
From: jjb@jagware.bcc.com (J.J.Bailey)
Subject: ISC UNIX patches for bind-4.9.3-BETA21
To: paul@vix.com
Date: Sun, 25 Jun 1995 17:07:15 -0700 (PDT)
X-Mailer: ELM [version 2.4 PL24]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 12853     

The following patches are required to get bind-4.9.3-BETA21 to compile
in ISC UNIX version 4.1.  Do with them what you will.

Almost every patch is because sys/types.h needs to be included.
ns_main.c needs the include files to be included in a different order, so
I used an include guard to include sys/stream.h earlier.
M_UNIX and _SYSV3 need to be defined on the command line.
The makefile in the nslookup directory needs the .c to .o rule modified or
linking fails.
There is no libbsd.a.

-Jack

-- 
J.J.Bailey
Consultant
jjb@jagware.bcc.com



*** Makefile-	Sun Jun 25 17:00:03 1995
--- Makefile	Sun Jun 25 16:59:05 1995
***************
*** 486,505 ****
  #PS = ps -p
  
  #(ISC4.0 using GCC)
! #CC = gcc -DISC -posix
! #CDEBUG = -g
! #LEX = flex -I
! #LIBS = -lbsd
! #PIDDIR = /etc
! #DESTBIN = /usr/bin
! #DESTSBIN = /etc
! #DESTEXEC = /etc
! #DESTHELP = /etc
! #DESTMAN = /usr/catman/l_man
! #CATEXT = $$$$N
! #RANLIB = @:
! #LDS = @:
! #PS = ps -p
  #ARPREF = `lorder
  #ARSUFF = | tsort`
  
--- 486,505 ----
  #PS = ps -p
  
  #(ISC4.0 using GCC)
! CC = gcc -DISC -posix -DM_UNIX -D_SYSV3
! CDEBUG = -g
! LEX = flex -I
! LIBS = -linet -ll
! PIDDIR = /etc
! DESTBIN = /usr/bin
! DESTSBIN = /etc
! DESTEXEC = /etc
! DESTHELP = /etc
! DESTMAN = /usr/catman/l_man
! CATEXT = $$$$N
! RANLIB = @:
! LDS = @:
! PS = ps -p
  #ARPREF = `lorder
  #ARSUFF = | tsort`
  
*** conf/portability.h-	Tue Jun 20 00:42:50 1995
--- conf/portability.h	Sun Jun 25 16:18:45 1995
***************
*** 75,87 ****
  # endif
  # define SYSV
  # define SVR3
! # define _SYSV3
  # define NEED_STRTOUL
  # define NEED_FTRUNCATE
  # define USE_POSIX
  # include <sys/bsdtypes.h>
  # include <sys/sioctl.h>
! # include <sys/stream.h>
  # include <net/errno.h>
  #endif
  
--- 75,91 ----
  # endif
  # define SYSV
  # define SVR3
! # if #defined(_SYSV3)
! #  define _SYSV3
! # endif
  # define NEED_STRTOUL
  # define NEED_FTRUNCATE
  # define USE_POSIX
  # include <sys/bsdtypes.h>
  # include <sys/sioctl.h>
! # if !defined(_H_STREAM)
! #  include <sys/stream.h>
! # endif
  # include <net/errno.h>
  #endif
  
*** named/db_lookup.c-	Wed Dec 14 22:24:16 1994
--- named/db_lookup.c	Sun Jun 25 15:16:59 1995
***************
*** 64,69 ****
--- 64,72 ----
  
  #include <syslog.h>
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/nameser.h>
*** named/db_reload.c-	Wed Dec 14 22:24:16 1994
--- named/db_reload.c	Sun Jun 25 15:17:58 1995
***************
*** 59,64 ****
--- 59,67 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/nameser.h>
*** named/db_save.c-	Wed Dec 14 22:24:16 1994
--- named/db_save.c	Sun Jun 25 15:18:54 1995
***************
*** 63,68 ****
--- 63,71 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/nameser.h>
*** named/db_update.c-	Mon Jun 19 13:55:42 1995
--- named/db_update.c	Sun Jun 25 15:19:36 1995
***************
*** 62,67 ****
--- 62,70 ----
  #include <syslog.h>
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
*** named/named-xfer.c-	Tue Jun 20 16:58:52 1995
--- named/named-xfer.c	Sun Jun 25 16:03:03 1995
***************
*** 74,79 ****
--- 74,84 ----
  #endif /* not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #include <sys/stream.h>
+ #define	_H_STREAM		/* include guard for portability.h */
+ #endif
  #include <sys/file.h>
  #include <sys/stat.h>
  #include <sys/socket.h>
*** named/ns_forw.c-	Mon Jun 19 13:55:44 1995
--- named/ns_forw.c	Sun Jun 25 15:20:29 1995
***************
*** 59,64 ****
--- 59,67 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
*** named/ns_init.c-	Tue Jun 20 16:34:47 1995
--- named/ns_init.c	Sun Jun 25 15:21:16 1995
***************
*** 59,64 ****
--- 59,67 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <sys/stat.h>
  #include <netinet/in.h>
*** named/ns_main.c-	Tue Jun 20 16:58:53 1995
--- named/ns_main.c	Sun Jun 25 15:45:36 1995
***************
*** 71,76 ****
--- 71,81 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #include <sys/stream.h>
+ #define	_H_STREAM		/* include guard for portability.h */
+ #endif
  #include <sys/file.h>
  #include <sys/stat.h>
  #if !defined(SYSV) && defined(XXX)
*** named/ns_ncache.c-	Thu Jul 21 01:17:43 1994
--- named/ns_ncache.c	Sun Jun 25 15:58:22 1995
***************
*** 7,12 ****
--- 7,15 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <sys/file.h>
  #include <netinet/in.h>
*** named/ns_req.c-	Tue Jun 20 16:58:55 1995
--- named/ns_req.c	Sun Jun 25 15:50:06 1995
***************
*** 59,64 ****
--- 59,67 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/uio.h>
  #include <sys/file.h>
  #include <sys/socket.h>
*** named/ns_resp.c-	Tue Jun 20 00:43:09 1995
--- named/ns_resp.c	Sun Jun 25 15:50:52 1995
***************
*** 59,64 ****
--- 59,67 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <sys/file.h>
  #include <netinet/in.h>
*** named/ns_stats.c-	Mon Jun 19 01:34:58 1995
--- named/ns_stats.c	Sun Jun 25 15:52:05 1995
***************
*** 64,69 ****
--- 64,72 ----
  /**************************************************************************/
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  #include <stdio.h>
*** named/ns_validate.c-	Sun Jun 18 23:48:07 1995
--- named/ns_validate.c	Sun Jun 25 15:53:07 1995
***************
*** 8,13 ****
--- 8,16 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <sys/file.h>
  #include <netinet/in.h>
*** res/gethnamaddr.c-	Tue Jun 20 16:58:57 1995
--- res/gethnamaddr.c	Sun Jun 25 15:10:00 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
*** res/getnetent.c-	Mon Jun 19 01:35:01 1995
--- res/getnetent.c	Sun Jun 25 15:06:24 1995
***************
*** 47,52 ****
--- 47,55 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
*** res/getnetnamadr.c-	Tue Jun 20 00:43:10 1995
--- res/getnetnamadr.c	Sun Jun 25 15:07:41 1995
***************
*** 45,50 ****
--- 45,54 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #include <net/errno.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
*** res/herror.c-	Mon Jun 19 01:35:02 1995
--- res/herror.c	Sun Jun 25 14:51:57 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/uio.h>
  #include <netdb.h>
  #if defined(BSD) && (BSD >= 199103)
*** res/inet_addr.c-	Mon Jun 19 13:55:50 1995
--- res/inet_addr.c	Sun Jun 25 15:12:48 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <ctype.h>
*** res/nsap_addr.c-	Mon Jun 19 01:35:02 1995
--- res/nsap_addr.c	Sun Jun 25 15:11:54 1995
***************
*** 3,8 ****
--- 3,11 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/nameser.h>
*** res/res_comp.c-	Mon Jun 19 01:35:02 1995
--- res/res_comp.c	Sun Jun 25 14:59:28 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  
*** res/res_debug.c-	Mon Jun 19 13:55:51 1995
--- res/res_debug.c	Sun Jun 25 14:55:14 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <arpa/nameser.h>
*** res/res_init.c-	Mon Jun 19 01:35:03 1995
--- res/res_init.c	Sun Jun 25 15:01:42 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <sys/time.h>
  #include <netinet/in.h>
*** res/res_mkquery.c-	Mon Jun 19 01:35:03 1995
--- res/res_mkquery.c	Sun Jun 25 15:02:45 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  
*** res/res_query.c-	Tue Jun 20 00:43:10 1995
--- res/res_query.c	Sun Jun 25 15:03:54 1995
***************
*** 59,64 ****
--- 59,67 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <arpa/nameser.h>
*** res/res_send.c-	Mon Jun 19 13:55:52 1995
--- res/res_send.c	Sun Jun 25 15:04:54 1995
***************
*** 71,76 ****
--- 71,79 ----
  
  #include <sys/param.h>
  #include <sys/time.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <sys/uio.h>
  #include <netinet/in.h>
*** res/sethostent.c-	Mon Jun 19 01:35:04 1995
--- res/sethostent.c	Sun Jun 25 15:10:49 1995
***************
*** 37,42 ****
--- 37,45 ----
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  #include <netdb.h>
*** tools/Makefile-	Sun Jun 25 16:53:08 1995
--- tools/Makefile	Sun Jun 25 16:52:51 1995
***************
*** 151,156 ****
--- 151,159 ----
  	cd nslookup; ${MAKE} ${MARGS} tags
  	ctags ${SRCS}
  
+ .c.o:
+ 	$(CC) -c $(CFLAGS) $*.c -o $*.o
+ 
  FRC:
  
  # DO NOT DELETE THIS LINE -- mkdep uses it.
*** tools/nslookup/debug.c-	Wed Dec 14 22:24:31 1994
--- tools/nslookup/debug.c	Sun Jun 25 16:44:37 1995
***************
*** 71,76 ****
--- 71,79 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  #include <arpa/inet.h>
*** tools/nslookup/getinfo.c-	Wed Dec 14 22:24:32 1994
--- tools/nslookup/getinfo.c	Sun Jun 25 16:43:30 1995
***************
*** 72,77 ****
--- 72,80 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/nameser.h>
*** tools/nslookup/list.c-	Mon Dec 19 00:35:16 1994
--- tools/nslookup/list.c	Sun Jun 25 16:43:56 1995
***************
*** 71,76 ****
--- 71,79 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/nameser.h>
*** tools/nslookup/main.c-	Wed Dec 14 22:24:32 1994
--- tools/nslookup/main.c	Sun Jun 25 16:42:54 1995
***************
*** 81,86 ****
--- 81,89 ----
  
  #include <sys/param.h>
  #include <netdb.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/nameser.h>
*** tools/nslookup/send.c-	Wed Dec 14 22:24:33 1994
--- tools/nslookup/send.c	Sun Jun 25 16:46:34 1995
***************
*** 77,82 ****
--- 77,85 ----
  
  #include <sys/param.h>
  #include <sys/time.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <sys/socket.h>
  #include <sys/uio.h>
  #include <netinet/in.h>
*** tools/nslookup/skip.c-	Wed Dec 14 22:24:33 1994
--- tools/nslookup/skip.c	Sun Jun 25 16:51:46 1995
***************
*** 76,81 ****
--- 76,84 ----
   */
  
  #include <sys/param.h>
+ #if defined(ISC)
+ #include <sys/types.h>
+ #endif
  #include <netinet/in.h>
  #include <arpa/nameser.h>
  #include <resolv.h>

