diff options
author | peter <peter@FreeBSD.org> | 1999-11-30 02:43:11 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-11-30 02:43:11 +0000 |
commit | 4ef23ce6957fc75fc005885496d605fed48213e1 (patch) | |
tree | 7828b08c74ef918938b1b853c98f0cb41edac52c /contrib/bind/port/freebsd | |
parent | 67e0f3ce71726dc4058c2f80a813341a59244dbd (diff) | |
download | FreeBSD-src-4ef23ce6957fc75fc005885496d605fed48213e1.zip FreeBSD-src-4ef23ce6957fc75fc005885496d605fed48213e1.tar.gz |
Import bind v8.2.2.p5, minus the crypto for the time being. The bind
package does have BXA export approval, but the licensing strings on the
dnssafe code are a bit unpleasant. The crypto is easy to restore and bind
will run without it - just without full dnssec support.
Obtained from: The Internet Software Consortium (www.isc.org)
Diffstat (limited to 'contrib/bind/port/freebsd')
-rw-r--r-- | contrib/bind/port/freebsd/Makefile | 6 | ||||
-rwxr-xr-x | contrib/bind/port/freebsd/bin/probe_ipv6 | 55 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/Makefile | 4 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/port_after.h | 41 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/port_before.h | 8 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/prand_conf.h | 43 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/sys/bitypes.h | 2 |
7 files changed, 155 insertions, 4 deletions
diff --git a/contrib/bind/port/freebsd/Makefile b/contrib/bind/port/freebsd/Makefile index 966cd56..2f5b121 100644 --- a/contrib/bind/port/freebsd/Makefile +++ b/contrib/bind/port/freebsd/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 1996 by Internet Software Consortium +# Copyright (c) 1996,1999 by Internet Software Consortium # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -13,7 +13,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: Makefile,v 1.6 1997/06/19 03:22:25 halley Exp $ +# $Id: Makefile,v 1.8 1999/02/22 02:48:01 vixie Exp $ # these are only appropriate for BSD 4.4 or derivatives, and are used in # development. normal builds will be done in the top level directory and @@ -33,7 +33,7 @@ PORTINCL = ${TOP}/port/${SYSTYPE}/include LIBBIND = ${TOP}/lib/libbind.${A} CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} LD_LIBFLAGS= -x -r -AR= ar cruv +AR= ar cru RANLIB= ranlib INSTALL= install diff --git a/contrib/bind/port/freebsd/bin/probe_ipv6 b/contrib/bind/port/freebsd/bin/probe_ipv6 new file mode 100755 index 0000000..ba7135d --- /dev/null +++ b/contrib/bind/port/freebsd/bin/probe_ipv6 @@ -0,0 +1,55 @@ +#!/bin/sh + +set -e +PATH=/bin:/usr/bin:$PATH; export PATH +trap "rm -f tmp$$a.c tmp$$b.c tmp$$a.o tmp$$b.o" 0 +target=port_ipv6 +new=new_${target}.h +old=${target}.h + +cat > tmp$$a.c <<EOF +#include <sys/types.h> +#include <netinet/in.h> +struct sockaddr_in6 xx; +EOF + +cat > tmp$$b.c <<EOF +#include <sys/types.h> +#include <netinet/in.h> +struct in6_addr xx; +EOF + +cat > ${new} <<EOF + +/* This file is automatically generated. Do Not Edit. */ + +#ifndef ${target}_h +#define ${target}_h + +EOF + +if ${CC} -c tmp$$a.c > /dev/null 2>&1 +then + echo "#define HAS_INET6_STRUCTS" >> ${new} + if ${CC} -c tmp$$b.c > /dev/null 2>&1 + then + : + else + echo "#define in6_addr in_addr6" >> ${new} + fi +else + echo "#undef HAS_INET6_STRUCTS" >> ${new} +fi +echo >> ${new} +echo "#endif" >> ${new} +if [ -f ${old} ]; then + if cmp -s ${new} ${old} ; then + rm -f ${new} + else + rm -f ${old} + mv ${new} ${old} + fi +else + mv ${new} ${old} +fi +exit 0 diff --git a/contrib/bind/port/freebsd/include/Makefile b/contrib/bind/port/freebsd/include/Makefile index dd8b4e9..40fe3f8 100644 --- a/contrib/bind/port/freebsd/include/Makefile +++ b/contrib/bind/port/freebsd/include/Makefile @@ -65,10 +65,14 @@ all depend clean distclean install:: (cd $$x; pwd; ${MAKE} ${MARGS} $@); \ done +all depend:: + probe_ipv6 + distclean:: clean clean:: rm -f *~ *.BAK *.CKP *.orig + rm -f port_ipv6.h new_port_ipv6.h links: FRC @set -e; ln -s SRC/*.h . diff --git a/contrib/bind/port/freebsd/include/port_after.h b/contrib/bind/port/freebsd/include/port_after.h index 20c92b5..a496ac5 100644 --- a/contrib/bind/port/freebsd/include/port_after.h +++ b/contrib/bind/port/freebsd/include/port_after.h @@ -1,3 +1,5 @@ +#ifndef PORT_AFTER_H +#define PORT_AFTER_H #define CAN_RECONNECT #define USE_POSIX #define POSIX_SIGNALS @@ -11,6 +13,7 @@ #define USE_LOG_CONS #define HAVE_CHROOT #define CAN_CHANGE_ID +#define MISSING_IN6ADDR_ANY #define _TIMEZONE timezone @@ -21,6 +24,13 @@ #define KMEM "/dev/kmem" #define UDPSUM "udpcksum" +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/param.h> +#if (!defined(BSD)) || (BSD < 199306) +#include <sys/bitypes.h> +#endif + /* * We need to know the IPv6 address family number even on IPv4-only systems. * Note that this is NOT a protocol constant, and that if the system has its @@ -31,4 +41,35 @@ */ #ifndef AF_INET6 #define AF_INET6 24 +#else +#define HAS_INET6_STRUCTS +#define HAVE_SA_LEN +#endif + +#ifndef PF_INET6 +#define PF_INET6 AF_INET6 +#endif + +#include <port_ipv6.h> + +#ifndef HAS_INET6_STRUCTS +/* Replace with structure from later rev of O/S if known. */ +struct in6_addr { + u_int8_t s6_addr[16]; +}; + +/* Replace with structure from later rev of O/S if known. */ +struct sockaddr_in6 { +#ifdef HAVE_SA_LEN + u_int8_t sin6_len; /* length of this struct */ + u_int8_t sin6_family; /* AF_INET6 */ +#else + u_int16_t sin6_family; /* AF_INET6 */ #endif + u_int16_t sin6_port; /* transport layer port # */ + u_int32_t sin6_flowinfo; /* IPv6 flow information */ + struct in6_addr sin6_addr; /* IPv6 address */ + u_int32_t sin6_scope_id; /* set of interfaces for a scope */ +}; +#endif /* HAS_INET6_STRUCTS */ +#endif /* ! PORT_AFTER_H */ diff --git a/contrib/bind/port/freebsd/include/port_before.h b/contrib/bind/port/freebsd/include/port_before.h index bc6b89c..d713050 100644 --- a/contrib/bind/port/freebsd/include/port_before.h +++ b/contrib/bind/port/freebsd/include/port_before.h @@ -4,3 +4,11 @@ #define SIG_FN void #define ts_sec tv_sec #define ts_nsec tv_nsec + +#if defined(HAS_PTHREADS) && defined(_REENTRANT) +#define DO_PTHREADS +#endif + +#if defined (__FreeBSD__) && __FreeBSD__>=3 +#define SETPWENT_VOID +#endif diff --git a/contrib/bind/port/freebsd/include/prand_conf.h b/contrib/bind/port/freebsd/include/prand_conf.h new file mode 100644 index 0000000..7244282 --- /dev/null +++ b/contrib/bind/port/freebsd/include/prand_conf.h @@ -0,0 +1,43 @@ +#ifndef _PRAND_CMD_H_ +#define _PRAND_CMD_H_ + + +#ifndef HAVE_DEV_RANDOM + # define HAVE_DEV_RANDOM 1 + #endif /* HAVE_DEV_RANDOM */ + +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/sbin/arp -an 2>&1", + "/usr/bin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/bin/netstat -an 2>&1", + "/usr/bin/dig . soa +ti=1 +retry=0 2>&1", + "/usr/sbin/iostat 2>&1", + "/usr/bin/vmstat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/usr/tmp", + ".", + "/", + "/var/spool", + "/dev", + "/var/mail", + "/home", + "/usr/home", + NULL +}; + +const char *files[] = { + "/var/log/messages", + "/var/log/wtmp", + "/var/log/lastlog", + NULL +}; + +#endif /* _PRAND_CMD_H_ */ diff --git a/contrib/bind/port/freebsd/include/sys/bitypes.h b/contrib/bind/port/freebsd/include/sys/bitypes.h index ad0dfcb..361156a 100644 --- a/contrib/bind/port/freebsd/include/sys/bitypes.h +++ b/contrib/bind/port/freebsd/include/sys/bitypes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996 by Internet Software Consortium. + * Copyright (c) 1996,1999 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above |