Delivery-Date: Sun, 15 Jan 1995 22:48:15 -0800
Received: by gw.home.vix.com id AA05315; Sun, 15 Jan 95 22:44:53 -0800
Received: by gw.home.vix.com id AA05310; Sun, 15 Jan 95 22:44:42 -0800
Received: (from pauls@localhost) by locust.cic.net (8.6.9/8.6.9) id BAA26216; Mon, 16 Jan 1995 01:43:13 -0500
Date: Mon, 16 Jan 1995 01:43:12 -0500 (EST)
From: Paul Southworth <pauls@locust.cic.net>
To: bind-workers@vix.com
Subject: BETA17 linux patch kit
Message-Id: <Pine.SUN.3.91.950116012844.25885A-100000@locust.cic.net>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Paul -- sorry for pestering you earlier.  I got what I needed.

The following is an update of the patch kit for BETA7 by Charles Lopes
<tjarls@infm.ulst.ac.uk> -- it now works cleanly with BETA17 for me.

I have successfully compiled and used it on two "slackware" based Linux
boxes.  The machine with the 1.1.81 kernel is a slackware 2.0.1 install
with an updated kernel.  The 1.1.59 machine is a slackware 2.1 system. 
Neither required the fix to sys/param.h mentioned by previous bind users
on Linux (is integrated into the cdefs.h patch).  Both systems are clean
with regard to the system libraries and includes that came from the
slackware release.

Patch follows.  These are for your RUNSON file:

LINUX	1.1.81	i486	gcc2.5.8	paul southworth	production secondary
LINUX	1.1.59	i486	gcc2.5.8	paul southworth	"compiles and runs"
ULTRIX	4.3A	mips	gcc2.6.3	paul southworth	production primary

The first two of those are on my home net; the other is one.mind.net,
a start-up internet provider I helped out in my home town (Ashland, OR).

--
Paul Southworth
CICNet Systems Support
pauls@cic.net


#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1995-01-16 01:37 EST by <pauls@locust.cic.net>.
# Source directory was `/home/pauls'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#  12816 -rw-rw-r-- bind-4.9.3-BETA17-linuxpatch
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  echo 'WARNING: not restoring timestamps.  Consider getting and'
  echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
# ============= bind-4.9.3-BETA17-linuxpatch ==============
if test -f 'bind-4.9.3-BETA17-linuxpatch' && test X"$1" != X"-c"; then
  echo 'x - skipping bind-4.9.3-BETA17-linuxpatch (file already exists)'
else
  echo 'x - extracting bind-4.9.3-BETA17-linuxpatch (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'bind-4.9.3-BETA17-linuxpatch' &&
diff -c -r bind-4.9.3-BETA17/Makefile bind-4.9.3-BETA17-linux/Makefile
*** bind-4.9.3-BETA17/Makefile	Thu Jan 12 16:54:04 1995
--- bind-4.9.3-BETA17-linux/Makefile	Mon Jan 16 00:32:04 1995
***************
*** 102,108 ****
X  
X  #(Linux)
X  #CC = gcc $(CPPFLAGS)
! #CPPFLAGS = -DSYSV
X  #LIBS = -lfl
X  #PIDDIR = /var/run
X  #DESTEXEC = /usr/sbin
--- 102,108 ----
X  
X  #(Linux)
X  #CC = gcc $(CPPFLAGS)
! #CPPFLAGS = -D__USE_BSD_SIGNAL
X  #LIBS = -lfl
X  #PIDDIR = /var/run
X  #DESTEXEC = /usr/sbin
diff -c -r bind-4.9.3-BETA17/compat/include/sys/cdefs.h bind-4.9.3-BETA17-linux/compat/include/sys/cdefs.h
*** bind-4.9.3-BETA17/compat/include/sys/cdefs.h	Thu Dec 15 01:23:50 1994
--- bind-4.9.3-BETA17-linux/compat/include/sys/cdefs.h	Mon Jan 16 00:32:04 1995
***************
*** 61,66 ****
--- 61,69 ----
X  #ifndef	_CDEFS_H_
X  #define	_CDEFS_H_
X  
+ #if defined(linux)
+ #include_next <sys/cdefs.h>
+ #else
X  #if defined(__cplusplus)
X  #define	__BEGIN_DECLS	extern "C" {
X  #define	__END_DECLS	};
***************
*** 141,144 ****
--- 144,148 ----
X  #define	__pure
X  #endif
X  
+ #endif /* linux */
X  #endif /* !_CDEFS_H_ */
diff -c -r bind-4.9.3-BETA17/conf/portability.h bind-4.9.3-BETA17-linux/conf/portability.h
*** bind-4.9.3-BETA17/conf/portability.h	Thu Jan 12 16:44:30 1995
--- bind-4.9.3-BETA17-linux/conf/portability.h	Mon Jan 16 00:32:04 1995
***************
*** 136,142 ****
X  #endif
X  
X  #if defined(SYSV) || defined(__ultrix) || defined(__osf__) \
! 	|| (defined(BSD) && BSD >= 199306)
X  # define USE_UTIME
X  # define HAVE_SETVBUF
X  #endif
--- 136,142 ----
X  #endif
X  
X  #if defined(SYSV) || defined(__ultrix) || defined(__osf__) \
! 	|| (defined(BSD) && BSD >= 199306) || defined(linux)
X  # define USE_UTIME
X  # define HAVE_SETVBUF
X  #endif
***************
*** 329,335 ****
X  # endif
X  #endif
X  
! #if (!defined(BSD) || (BSD < 43))
X  # define NEED_MKSTEMP
X  # if !defined(__ultrix) && !defined(apollo)
X  #  define NEED_STRCASECMP
--- 329,335 ----
X  # endif
X  #endif
X  
! #if (!defined(BSD) || (BSD < 43)) && !defined(linux)
X  # define NEED_MKSTEMP
X  # if !defined(__ultrix) && !defined(apollo)
X  #  define NEED_STRCASECMP
diff -c -r bind-4.9.3-BETA17/include/arpa/inet.h bind-4.9.3-BETA17-linux/include/arpa/inet.h
*** bind-4.9.3-BETA17/include/arpa/inet.h	Thu Dec 15 01:24:08 1994
--- bind-4.9.3-BETA17-linux/include/arpa/inet.h	Mon Jan 16 00:32:04 1995
***************
*** 64,70 ****
X  /* External definitions for functions in inet(3) */
X  
X  #include <sys/param.h>
! #if (!defined(BSD)) || (BSD < 199306)
X  # include <sys/bitypes.h>
X  #else
X  # include <sys/types.h>
--- 64,70 ----
X  /* External definitions for functions in inet(3) */
X  
X  #include <sys/param.h>
! #if ((!defined(BSD)) || (BSD < 199306)) && (!defined(linux))
X  # include <sys/bitypes.h>
X  #else
X  # include <sys/types.h>
diff -c -r bind-4.9.3-BETA17/include/arpa/nameser.h bind-4.9.3-BETA17-linux/include/arpa/nameser.h
*** bind-4.9.3-BETA17/include/arpa/nameser.h	Thu Dec 15 01:24:09 1994
--- bind-4.9.3-BETA17-linux/include/arpa/nameser.h	Mon Jan 16 00:32:04 1995
***************
*** 62,71 ****
X  #define	_NAMESER_H_
X  
X  #include <sys/param.h>
! #if (!defined(BSD)) || (BSD < 199306)
X  # include <sys/bitypes.h>
X  #else
X  # include <sys/types.h>
X  #endif
X  #include <sys/cdefs.h>
X  
--- 62,74 ----
X  #define	_NAMESER_H_
X  
X  #include <sys/param.h>
! #if ((!defined(BSD)) || (BSD < 199306)) && (!defined(linux))
X  # include <sys/bitypes.h>
X  #else
X  # include <sys/types.h>
+ #endif
+ #ifdef linux /* hopefully temporary */
+ #include <sys/bitypes.h>
X  #endif
X  #include <sys/cdefs.h>
X  
diff -c -r bind-4.9.3-BETA17/include/netdb.h bind-4.9.3-BETA17-linux/include/netdb.h
*** bind-4.9.3-BETA17/include/netdb.h	Wed Jan 11 03:57:50 1995
--- bind-4.9.3-BETA17-linux/include/netdb.h	Mon Jan 16 00:32:05 1995
***************
*** 62,71 ****
X  #define _NETDB_H_
X  
X  #include <sys/param.h>
- #if (!defined(BSD)) || (BSD < 199306)
- # include <sys/bitypes.h>
- #endif
X  #include <sys/cdefs.h>
X  
X  #define	_PATH_HEQUIV	"/etc/hosts.equiv"
X  #define	_PATH_HOSTS	"/etc/hosts"
--- 62,72 ----
X  #define _NETDB_H_
X  
X  #include <sys/param.h>
X  #include <sys/cdefs.h>
+ 
+ #ifdef linux
+ #include <paths.h>
+ #endif
X  
X  #define	_PATH_HEQUIV	"/etc/hosts.equiv"
X  #define	_PATH_HOSTS	"/etc/hosts"
diff -c -r bind-4.9.3-BETA17/include/resolv.h bind-4.9.3-BETA17-linux/include/resolv.h
*** bind-4.9.3-BETA17/include/resolv.h	Thu Dec 15 01:24:07 1994
--- bind-4.9.3-BETA17-linux/include/resolv.h	Mon Jan 16 00:32:05 1995
***************
*** 62,71 ****
X  #define	_RESOLV_H_
X  
X  #include <sys/param.h>
! #if (!defined(BSD)) || (BSD < 199306)
X  # include <sys/bitypes.h>
X  #else
X  # include <sys/types.h>
X  #endif
X  #include <sys/cdefs.h>
X  #include <stdio.h>
--- 62,74 ----
X  #define	_RESOLV_H_
X  
X  #include <sys/param.h>
! #if ((!defined(BSD)) || (BSD < 199306)) && (!defined(linux))
X  # include <sys/bitypes.h>
X  #else
X  # include <sys/types.h>
+ #endif
+ #ifdef linux /* hopefully temporary */
+ #include <sys/bitypes.h>
X  #endif
X  #include <sys/cdefs.h>
X  #include <stdio.h>
diff -c -r bind-4.9.3-BETA17/named/db_glue.c bind-4.9.3-BETA17-linux/named/db_glue.c
*** bind-4.9.3-BETA17/named/db_glue.c	Thu Jan 12 16:55:51 1995
--- bind-4.9.3-BETA17-linux/named/db_glue.c	Mon Jan 16 00:32:05 1995
***************
*** 340,346 ****
X  	return;
X  }
X  
! #if !defined(BSD)
X  int
X  getdtablesize()
X  {
--- 340,349 ----
X  	return;
X  }
X  
! /* What's about a HAVE_GETDTABLESIZE macro? But IMHO, this should really
!    be on the compat library. (Charles.Lopes@infm.ulst.ac.uk) */
! 
! #if !defined(BSD) && !defined(linux) 
X  int
X  getdtablesize()
X  {
diff -c -r bind-4.9.3-BETA17/named/ns_main.c bind-4.9.3-BETA17-linux/named/ns_main.c
*** bind-4.9.3-BETA17/named/ns_main.c	Thu Jan 12 16:55:52 1995
--- bind-4.9.3-BETA17-linux/named/ns_main.c	Mon Jan 16 01:20:39 1995
***************
*** 170,176 ****
X  	int rfd, size;
X  	time_t lasttime, maxctime;
X  	u_char buf[BUFSIZ];
! #ifndef SYSV
X  	struct sigvec vec;
X  #endif
X  	fd_set tmpmask;
--- 170,176 ----
X  	int rfd, size;
X  	time_t lasttime, maxctime;
X  	u_char buf[BUFSIZ];
! #if !defined(SYSV) && !defined(linux)
X  	struct sigvec vec;
X  #endif
X  	fd_set tmpmask;
***************
*** 422,428 ****
X  #if defined(SYSV)
X  	(void) signal(SIGCLD, (SIG_FN (*)()) endxfer);
X  	(void) signal(SIGALRM, maint_alarm);
! #else
X  	bzero((char *)&vec, sizeof(vec));
X  	vec.sv_handler = maint_alarm;
X  	vec.sv_mask = sigmask(SIGCHLD);
--- 422,437 ----
X  #if defined(SYSV)
X  	(void) signal(SIGCLD, (SIG_FN (*)()) endxfer);
X  	(void) signal(SIGALRM, maint_alarm);
! #elseif defined(linux)
!  	bzero((char *)&sact, sizeof(sact));
!  	sact.sa_handler = maint_alarm;
!  	sact.sa_mask = sigmask(SIGCHLD);
!  	(void) sigaction(SIGALRM, &sact, (struct sigaction *)NULL);
!  
!  	sact.sa_handler = endxfer;
!  	sact.sa_mask = sigmask(SIGALRM);
!  	(void) sigaction(SIGCHLD, &sact, (struct sigaction *)NULL);
! #elseif !defined(linux) && !defined(SYSV)
X  	bzero((char *)&vec, sizeof(vec));
X  	vec.sv_handler = maint_alarm;
X  	vec.sv_mask = sigmask(SIGCHLD);
diff -c -r bind-4.9.3-BETA17/named/pathnames.h bind-4.9.3-BETA17-linux/named/pathnames.h
*** bind-4.9.3-BETA17/named/pathnames.h	Thu Dec 15 01:24:22 1994
--- bind-4.9.3-BETA17-linux/named/pathnames.h	Mon Jan 16 00:32:05 1995
***************
*** 68,74 ****
X  #define	_PATH_BOOT	"/etc/named.boot"
X  #endif
X  
! #if defined(BSD) && BSD >= 198810
X  
X  #include <paths.h>
X  #ifndef _PATH_XFER
--- 68,74 ----
X  #define	_PATH_BOOT	"/etc/named.boot"
X  #endif
X  
! #if (defined(BSD) && BSD >= 198810) || defined(linux)
X  
X  #include <paths.h>
X  #ifndef _PATH_XFER
diff -c -r bind-4.9.3-BETA17/res/gethnamaddr.c bind-4.9.3-BETA17-linux/res/gethnamaddr.c
*** bind-4.9.3-BETA17/res/gethnamaddr.c	Mon Dec 19 03:35:10 1994
--- bind-4.9.3-BETA17-linux/res/gethnamaddr.c	Mon Jan 16 00:32:05 1995
***************
*** 77,83 ****
X  
X  #define MULTI_PTRS_ARE_ALIASES 1	/* XXX - experimental */
X  
! #if defined(BSD) && (BSD >= 199103)
X  # include <string.h>
X  #else
X  # include "../conf/portability.h"
--- 77,83 ----
X  
X  #define MULTI_PTRS_ARE_ALIASES 1	/* XXX - experimental */
X  
! #if (defined(BSD) && (BSD >= 199103)) || defined(linux)
X  # include <string.h>
X  #else
X  # include "../conf/portability.h"
diff -c -r bind-4.9.3-BETA17/res/herror.c bind-4.9.3-BETA17-linux/res/herror.c
*** bind-4.9.3-BETA17/res/herror.c	Thu Dec 15 01:24:24 1994
--- bind-4.9.3-BETA17-linux/res/herror.c	Mon Jan 16 00:32:05 1995
***************
*** 61,67 ****
X  #include <sys/param.h>
X  #include <sys/uio.h>
X  #include <netdb.h>
! #if defined(BSD) && (BSD >= 199103)
X  # include <unistd.h>
X  # include <string.h>
X  #else
--- 61,67 ----
X  #include <sys/param.h>
X  #include <sys/uio.h>
X  #include <netdb.h>
! #if (defined(BSD) && (BSD >= 199103)) || defined(linux)
X  # include <unistd.h>
X  # include <string.h>
X  #else
diff -c -r bind-4.9.3-BETA17/res/res_comp.c bind-4.9.3-BETA17-linux/res/res_comp.c
*** bind-4.9.3-BETA17/res/res_comp.c	Thu Dec 15 01:24:24 1994
--- bind-4.9.3-BETA17-linux/res/res_comp.c	Mon Jan 16 00:32:05 1995
***************
*** 66,72 ****
X  #include <resolv.h>
X  #include <ctype.h>
X  
! #if defined(BSD) && (BSD >= 199103)
X  # include <unistd.h>
X  # include <string.h>
X  #else
--- 66,72 ----
X  #include <resolv.h>
X  #include <ctype.h>
X  
! #if (defined(BSD) && (BSD >= 199103)) || defined(linux)
X  # include <unistd.h>
X  # include <string.h>
X  #else
diff -c -r bind-4.9.3-BETA17/res/res_debug.c bind-4.9.3-BETA17-linux/res/res_debug.c
*** bind-4.9.3-BETA17/res/res_debug.c	Mon Dec 19 03:35:11 1994
--- bind-4.9.3-BETA17-linux/res/res_debug.c	Mon Jan 16 00:32:06 1995
***************
*** 65,71 ****
X  
X  #include <stdio.h>
X  #include <resolv.h>
! #if defined(BSD) && (BSD >= 199103)
X  # include <string.h>
X  #else
X  # include "../conf/portability.h"
--- 65,71 ----
X  
X  #include <stdio.h>
X  #include <resolv.h>
! #if (defined(BSD) && (BSD >= 199103)) || defined(linux)
X  # include <string.h>
X  #else
X  # include "../conf/portability.h"
diff -c -r bind-4.9.3-BETA17/res/res_init.c bind-4.9.3-BETA17-linux/res/res_init.c
*** bind-4.9.3-BETA17/res/res_init.c	Thu Dec 15 01:24:25 1994
--- bind-4.9.3-BETA17-linux/res/res_init.c	Mon Jan 16 00:32:06 1995
***************
*** 67,73 ****
X  #include <stdio.h>
X  #include <ctype.h>
X  #include <resolv.h>
! #if defined(BSD) && (BSD >= 199103)
X  # include <unistd.h>
X  # include <stdlib.h>
X  # include <string.h>
--- 67,73 ----
X  #include <stdio.h>
X  #include <ctype.h>
X  #include <resolv.h>
! #if (defined(BSD) && (BSD >= 199103)) || defined(linux)
X  # include <unistd.h>
X  # include <stdlib.h>
X  # include <string.h>
diff -c -r bind-4.9.3-BETA17/res/res_mkquery.c bind-4.9.3-BETA17-linux/res/res_mkquery.c
*** bind-4.9.3-BETA17/res/res_mkquery.c	Thu Dec 15 01:24:25 1994
--- bind-4.9.3-BETA17-linux/res/res_mkquery.c	Mon Jan 16 00:32:06 1995
***************
*** 64,70 ****
X  
X  #include <stdio.h>
X  #include <resolv.h>
! #if defined(BSD) && (BSD >= 199103)
X  # include <string.h>
X  #else
X  # include "../conf/portability.h"
--- 64,70 ----
X  
X  #include <stdio.h>
X  #include <resolv.h>
! #if (defined(BSD) && (BSD >= 199103)) || defined(linux)
X  # include <string.h>
X  #else
X  # include "../conf/portability.h"
diff -c -r bind-4.9.3-BETA17/res/res_query.c bind-4.9.3-BETA17-linux/res/res_query.c
*** bind-4.9.3-BETA17/res/res_query.c	Wed Jan 11 03:58:07 1995
--- bind-4.9.3-BETA17-linux/res/res_query.c	Mon Jan 16 00:32:06 1995
***************
*** 68,74 ****
X  #include <resolv.h>
X  #include <ctype.h>
X  #include <errno.h>
! #if defined(BSD) && (BSD >= 199306)
X  # include <stdlib.h>
X  # include <string.h>
X  #else
--- 68,74 ----
X  #include <resolv.h>
X  #include <ctype.h>
X  #include <errno.h>
! #if (defined(BSD) && (BSD >= 199306)) || defined(linux)
X  # include <stdlib.h>
X  # include <string.h>
X  #else
diff -c -r bind-4.9.3-BETA17/res/res_send.c bind-4.9.3-BETA17-linux/res/res_send.c
*** bind-4.9.3-BETA17/res/res_send.c	Mon Dec 19 03:35:11 1994
--- bind-4.9.3-BETA17-linux/res/res_send.c	Mon Jan 16 00:32:06 1995
***************
*** 80,86 ****
X  #include <stdio.h>
X  #include <errno.h>
X  #include <resolv.h>
! #if defined(BSD) && (BSD >= 199306)
X  # include <stdlib.h>
X  # include <string.h>
X  #else
--- 80,86 ----
X  #include <stdio.h>
X  #include <errno.h>
X  #include <resolv.h>
! #if (defined(BSD) && (BSD >= 199306)) || defined(linux)
X  # include <stdlib.h>
X  # include <string.h>
X  #else
***************
*** 530,536 ****
X  				 * for responses from more than one server.
X  				 */
X  				if (connected) {
! #if defined(BSD) && (BSD >= 199103)
X  					struct sockaddr_in no_addr;
X  
X  					no_addr.sin_family = AF_INET;
--- 530,536 ----
X  				 * for responses from more than one server.
X  				 */
X  				if (connected) {
! #if (defined(BSD) && (BSD >= 199103)) || defined(linux)
X  					struct sockaddr_in no_addr;
X  
X  					no_addr.sin_family = AF_INET;
SHAR_EOF
  $shar_touch -am 0116011795 'bind-4.9.3-BETA17-linuxpatch' &&
  chmod 0664 'bind-4.9.3-BETA17-linuxpatch' ||
  echo 'restore of bind-4.9.3-BETA17-linuxpatch failed'
  shar_count="`wc -c < 'bind-4.9.3-BETA17-linuxpatch'`"
  test 12816 -eq "$shar_count" ||
    echo "bind-4.9.3-BETA17-linuxpatch: original size 12816, current size $shar_count"
fi
exit 0

