Delivery-Date: Tue, 22 Aug 1995 21:19:12 -0700
Return-Path: jjb@jagware.bcc.com
Received: by gw.home.vix.com id AA29584; Tue, 22 Aug 95 21:19:06 -0700
Received: by jagware.bcc.com (/\oo/\ Smail3.1.29.1 #29.3)
	id <m0sl7Gu-00001yC@jagware.bcc.com>; Tue, 22 Aug 95 21:18 PDT
Message-Id: <m0sl7Gu-00001yC@jagware.bcc.com>
From: jjb@jagware.bcc.com (J.J.Bailey)
Subject: ISC UNIX patches for bind-4.9.3-BETA26
To: paul@vix.com
Date: Tue, 22 Aug 1995 21:18:36 -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: 12688     

The following patches are required to get bind-4.9.3-BETA26 to compile
in ISC UNIX version 4.1.

1) Almost every patch is because sys/types.h needs to be included: the
   defines in conf/portability.h are too late

2) 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

3) M_UNIX and _SYSV3 need to be defined on the command line

4) The makefile in the nslookup directory needs the .c to .o rule modified
   or the .o files are placed into the current directory, causing linking
   to fail

5) There is no libbsd.a

-Jack

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



*** Makefile-	Tue Aug 22 21:08:31 1995
--- Makefile	Tue Aug 22 21:09:29 1995
***************
*** 540,551 ****
  #PS = ps -p
  #IOT = IOT
  
! #(ISC4.0 using GCC)
! #CC = gcc -DISC -posix
  #CPPFLAGS =
  #CDEBUG = -g
  #LEX = flex -I
! #LIBS = -lbsd
  #PIDDIR = /etc
  #DESTBIN = /usr/bin
  #DESTSBIN = /etc
--- 540,551 ----
  #PS = ps -p
  #IOT = IOT
  
! #(ISC4.1 using GCC)
! #CC = gcc -DISC -posix -DM_UNIX -D_SYSV3
  #CPPFLAGS =
  #CDEBUG = -g
  #LEX = flex -I
! #LIBS = -linet -ll
  #PIDDIR = /etc
  #DESTBIN = /usr/bin
  #DESTSBIN = /etc
*** conf/portability.h-	Thu Jun 29 02:25:57 1995
--- conf/portability.h	Tue Aug 22 21:00:05 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-	Thu Jun 29 02:26:19 1995
--- named/db_lookup.c	Tue Aug 22 20:53:12 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	Tue Aug 22 20:53:12 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-	Thu Jun 29 02:26:19 1995
--- named/db_save.c	Tue Aug 22 20:53:12 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-	Thu Jun 29 02:26:19 1995
--- named/db_update.c	Tue Aug 22 20:53:12 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-	Thu Jun 29 02:26:20 1995
--- named/named-xfer.c	Tue Aug 22 20:53:13 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 Aug 21 22:01:45 1995
--- named/ns_forw.c	Tue Aug 22 20:53:13 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-	Sun Aug 20 18:27:18 1995
--- named/ns_init.c	Tue Aug 22 20:53:13 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-	Sun Aug 20 18:27:19 1995
--- named/ns_main.c	Tue Aug 22 20:53:13 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-	Wed Jun 28 14:00:34 1995
--- named/ns_ncache.c	Tue Aug 22 20:53:14 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-	Mon Aug 21 22:01:46 1995
--- named/ns_req.c	Tue Aug 22 20:53:14 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-	Sun Aug 20 18:27:21 1995
--- named/ns_resp.c	Tue Aug 22 20:53:14 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-	Thu Jun 29 02:26:25 1995
--- named/ns_stats.c	Tue Aug 22 20:53:15 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 <arpa/inet.h>
*** named/ns_validate.c-	Wed Jun 28 14:17:31 1995
--- named/ns_validate.c	Tue Aug 22 20:53:15 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-	Mon Aug 21 22:01:48 1995
--- res/gethnamaddr.c	Tue Aug 22 20:53:15 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	Tue Aug 22 20:53:15 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-	Thu Jun 29 02:26:28 1995
--- res/getnetnamadr.c	Tue Aug 22 20:53:15 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	Tue Aug 22 20:53:15 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-	Sun Aug 20 18:27:23 1995
--- res/inet_addr.c	Tue Aug 22 20:53:15 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-	Thu Jun 29 02:26:28 1995
--- res/nsap_addr.c	Tue Aug 22 20:53:15 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	Tue Aug 22 20:53:16 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 Aug 21 00:22:22 1995
--- res/res_debug.c	Tue Aug 22 20:53:16 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-	Thu Jun 29 02:26:29 1995
--- res/res_init.c	Tue Aug 22 20:53:16 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-	Thu Jun 29 02:26:30 1995
--- res/res_mkquery.c	Tue Aug 22 20:53:16 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-	Thu Jun 29 02:26:30 1995
--- res/res_query.c	Tue Aug 22 20:53:16 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-	Sun Aug 20 18:27:24 1995
--- res/res_send.c	Tue Aug 22 20:53:16 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-	Thu Jun 29 02:26:31 1995
--- res/sethostent.c	Tue Aug 22 20:53:16 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-	Mon Aug 21 22:01:49 1995
--- tools/Makefile	Tue Aug 22 20:53:17 1995
***************
*** 152,157 ****
--- 152,160 ----
  	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-	Thu Jun 29 02:26:35 1995
--- tools/nslookup/debug.c	Tue Aug 22 20:53:17 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	Tue Aug 22 20:53:17 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	Tue Aug 22 20:53:17 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	Tue Aug 22 20:53:17 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	Tue Aug 22 20:53:17 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	Tue Aug 22 20:53:18 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>

