diff options
author | peter <peter@FreeBSD.org> | 1998-05-03 04:11:49 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-05-03 04:11:49 +0000 |
commit | 0666320b4eda500556d2c671c9527c9000057492 (patch) | |
tree | 759849259eae9f7cb0d3ddbd7a131081c6688068 /contrib/bind/port | |
parent | 58ca52f41726d17758909ddafba7b6b6766c789c (diff) | |
download | FreeBSD-src-0666320b4eda500556d2c671c9527c9000057492.zip FreeBSD-src-0666320b4eda500556d2c671c9527c9000057492.tar.gz |
Import (trimmed) ISC bind-8.1.2-t3b. This will be updated to 8.1.2 on
final release.
Obtained from: ftp.isc.org
Diffstat (limited to 'contrib/bind/port')
-rw-r--r-- | contrib/bind/port/Makefile | 75 | ||||
-rw-r--r-- | contrib/bind/port/README | 66 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/Makefile | 85 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/Makefile.set | 18 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/Makefile | 91 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/port_after.h | 33 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/port_before.h | 6 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/sys/Makefile | 77 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/include/sys/bitypes.h | 37 | ||||
-rw-r--r-- | contrib/bind/port/freebsd/noop.c | 4 | ||||
-rwxr-xr-x | contrib/bind/port/freebsd/probe | 11 | ||||
-rwxr-xr-x | contrib/bind/port/settings | 35 | ||||
-rwxr-xr-x | contrib/bind/port/systype | 31 |
13 files changed, 569 insertions, 0 deletions
diff --git a/contrib/bind/port/Makefile b/contrib/bind/port/Makefile new file mode 100644 index 0000000..803ba0d --- /dev/null +++ b/contrib/bind/port/Makefile @@ -0,0 +1,75 @@ +# Copyright (c) 1996 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 +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS +# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE +# CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +# SOFTWARE. + +# $Id: Makefile,v 8.12 1997/06/19 03:22:17 halley 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 +# this Makefile will be invoked with a lot of overrides for the following: +SYSTYPE= bsdos +SHELL= /bin/sh +O=o +A=a +DESTDIR= +DESTINC= /usr/local/bind/include +DESTLIB= /usr/local/lib +TOP= .. +INCL= ${TOP}/include +PORTINCL= ${TOP}/port/${SYSTYPE}/include +LIBBIND= ${TOP}/lib/libbind.${A} +RANLIB= ranlib +AR= ar cruv +INSTALL= install +CDEBUG= -g + +SUBDIRS = bsdos decunix linux netbsd sunos ultrix + +MARGS = "SYSTYPE=${SYSTYPE}" "SHELL=${SHELL}" "A=${A}" "O=${O}" \ + "CC=${CC}" "LEX=${LEX}" "CDEBUG=${CDEBUG}" \ + "SYSLIBS=${SYSLIBS}" "LDFLAGS=${LDFLAGS}" \ + "DESTDIR=${DESTDIR}" "PIDDIR=${PIDDIR}" "DESTMAN=${DESTMAN}" \ + "DESTBIN=${DESTBIN}" "DESTSBIN=${DESTSBIN}" "DESTEXEC=${DESTEXEC}" \ + "DESTLIB=${DESTLIB}" "DESTINC=${DESTINC}" "DESTHELP=${DESTHELP}" \ + "RANLIB=${RANLIB}" "AR=${AR}" "ARPREF=${ARPREF}" "ARSUFF=${ARSUFF}" \ + "INCL=../${INCL}" "PORTINCL=../${PORTINCL}" \ + "LIBBIND=../${LIBBIND}" \ + "INSTALL=${INSTALL}" "CPPFLAGS=${CPPFLAGS}" "TOP=../${TOP}" + +all:: + +all depend install:: + @(cd ${SYSTYPE}; pwd; ${MAKE} ${MARGS} $@) + +distclean:: clean + @set -e; for x in ${SUBDIRS}; do \ + (cd $$x; pwd; ${MAKE} ${MARGS} $@); \ + done + +clean:: + @set -e; cd ${SYSTYPE}; pwd; ${MAKE} ${MARGS} clean + +clean:: FRC + rm -f *~ *.BAK *.CKP *.orig .systype + +install:: + +links:: FRC + @set -e; \ + ln -s SRC/systype SRC/settings .; \ + mkdir ${SYSTYPE}; cd ${SYSTYPE}; pwd; ln -s ../SRC/${SYSTYPE} SRC; \ + cp SRC/Makefile Makefile; chmod +w Makefile; \ + ${MAKE} ${MARGS} links + +FRC: diff --git a/contrib/bind/port/README b/contrib/bind/port/README new file mode 100644 index 0000000..d8dbd10 --- /dev/null +++ b/contrib/bind/port/README @@ -0,0 +1,66 @@ + +Porting BIND 8 to Another System + + Make sure to base your port on an existing one. If your port is + for a new release of an already supported operating system, please + try to make the existing port support the new release instead of + making a new port directory. For an example of how to do this, + look at how the Solaris port uses os_version.h in port_after.h. See + port/solaris/include/Makefile and port/solaris/bin/make_os_version + to learn how an os_version.h is made. + + Porting problems fall into broad categories which have simple answers: + + Include File Missing or Broken + + Make one (possibly empty) in port/*/include or in + port/*/include/sys. Broken include files can be fixed; see + the BSD/OS and ULTRIX ports for examples of how to do this. + + Library Function Missing: + + Make one (possibly copying it from some other port and hacking) + and cause it to appear in port/libport.a by virtue of building + it in port/*/Makefile. An example is the __ansi_realloc() + routine in the SunOS port. + + Desired system feature absent or not prototyped or whatever: + + Edit port/*/include/port_{before,after}.h. read a few source + files in lib/ or bin/ to see when/why these are #included. + + "Make" doesn't work even though my system has a port/* subdir: + + Type "uname -s -r" at your shell and see if the resulting + string is present in your system's putative port/*/probe + file. If not, try adding it. If it works, send mail to + bind-bugs@isc.org. + + My system doesn't have enough of ANSI and POSIX to allow a port: + + Give up. Get a different system. + + Porting mistakes also fall into broad categories with simple answers: + + I Can't Get It To Build Without Compiler (Not Linker!) Warnings: + + Keep trying, you're not done yet. + + I Need To Add Another Portability #define And Some #ifdef's: + + Make sure it won't hurt any other port. Send us some mail. + + I Just Have To Edit A Source File To Get It To Compile: + + You are probably missing one of the above opportunities to do + the right thing and you should rethink your approach and get + some advice before you send in your port. But it's possible + that a non-UNIX system will need a different porting layer, + especially in isc/eventlib.c and its friends, so contact us + if you're stuck on this point, there may be something we can + do. Send mail to bind-bugs@isc.org. + + My Employer Won't Allow Me To Send In Porting Diffs: + + You probably need a new employer. But try really hard, OK? + diff --git a/contrib/bind/port/freebsd/Makefile b/contrib/bind/port/freebsd/Makefile new file mode 100644 index 0000000..966cd56 --- /dev/null +++ b/contrib/bind/port/freebsd/Makefile @@ -0,0 +1,85 @@ +# Copyright (c) 1996 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 +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS +# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE +# CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +# 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 $ + +# 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 +# this Makefile will be invoked with a lot of overrides for the following: +SYSTYPE= bsd +DESTDIR = +DESTLIB = /usr/local/lib +O=o +A=a +CC= cc +LD= ld +SHELL= /bin/sh +CDEBUG= -g +TOP= ../.. +INCL = ${TOP}/include +PORTINCL = ${TOP}/port/${SYSTYPE}/include +LIBBIND = ${TOP}/lib/libbind.${A} +CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} +LD_LIBFLAGS= -x -r +AR= ar cruv +RANLIB= ranlib +INSTALL= install + +SUBDIRS= include + +SRCS= noop.c + +OBJS= noop.${O} + +MARGS= DESTDIR="${DESTDIR}" DESTINC="${DESTINC}" INSTALL="${INSTALL}" + +all depend clean distclean install:: + @for x in ${SUBDIRS}; do \ + (cd $$x; pwd; ${MAKE} ${MARGS} $@); \ + done + +all:: ${LIBBIND} + +${LIBBIND}: ${OBJS} + ${AR} ${LIBBIND} ${ARPREF} ${OBJS} ${ARSUFF} + ${RANLIB} ${LIBBIND} + +.c.${O}: + ${CC} ${CPPFLAGS} ${CFLAGS} -c $*.c + -${LDS} ${LD} ${LD_LIBFLAGS} $*.${O} && ${LDS} mv a.out $*.${O} + +distclean:: clean + +clean:: FRC + rm -f .depend a.out core tags + rm -f *.${O} *.BAK *.CKP *~ + +depend:: FRC + mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS} + +links: FRC + @set -e; ln -s SRC/*.[ch] SRC/bin SRC/Makefile.set SRC/probe . + @set -e; for x in ${SUBDIRS}; do \ + ( mkdir $$x; cd $$x; pwd; ln -s ../SRC/$$x SRC; \ + cp SRC/Makefile Makefile; chmod +w Makefile; \ + ${MAKE} ${MARGS} links ); \ + done + +install:: FRC + +FRC: + +# DO NOT DELETE THIS LINE -- mkdep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/contrib/bind/port/freebsd/Makefile.set b/contrib/bind/port/freebsd/Makefile.set new file mode 100644 index 0000000..fe256bc --- /dev/null +++ b/contrib/bind/port/freebsd/Makefile.set @@ -0,0 +1,18 @@ +'CC=cc' +'CDEBUG=-O2 -g' +'DESTBIN=/usr/bin' +'DESTSBIN=/usr/sbin' +'DESTEXEC=/usr/libexec' +'DESTMAN=/usr/share/man' +'DESTHELP=/usr/share/misc' +'DESTETC=/etc' +'DESTRUN=/var/run' +'LEX=lex -I' +'YACC=yacc -d' +'SYSLIBS=-ll -lutil' +'INSTALL=install' +'MANDIR=cat' +'MANROFF=(tbl|nroff -man)' +'CATEXT=0' +'PS=ps' +'RANLIB=ranlib' diff --git a/contrib/bind/port/freebsd/include/Makefile b/contrib/bind/port/freebsd/include/Makefile new file mode 100644 index 0000000..dd8b4e9 --- /dev/null +++ b/contrib/bind/port/freebsd/include/Makefile @@ -0,0 +1,91 @@ +# ++Copyright++ +# - +# Copyright (c) +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# - +# Portions Copyright (c) 1993 by Digital Equipment Corporation. +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies, and that +# the name of Digital Equipment Corporation not be used in advertising or +# publicity pertaining to distribution of the document or software without +# specific, written prior permission. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +# WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +# CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +# SOFTWARE. +# - +# --Copyright-- + +SUBDIRS = sys +HFILES = + +DESTDIR= +DESTINC= /usr/local/bind/include +INSTALL= install + +MARGS= DESTDIR="${DESTDIR}" DESTINC="${DESTINC}" INSTALL="${INSTALL}" + +all depend clean distclean install:: + @for x in ${SUBDIRS}; do \ + (cd $$x; pwd; ${MAKE} ${MARGS} $@); \ + done + +distclean:: clean + +clean:: + rm -f *~ *.BAK *.CKP *.orig + +links: FRC + @set -e; ln -s SRC/*.h . + @set -e; for x in ${SUBDIRS}; do \ + ( mkdir $$x; cd $$x; pwd; ln -s ../SRC/$$x SRC; \ + cp SRC/Makefile Makefile; chmod +w Makefile; \ + ${MAKE} ${MARGS} links ); \ + done + +install:: ${DESTDIR}${DESTINC} + -for x in "" ${HFILES}; do \ + if [ -n "$$x" ]; then \ + ${INSTALL} -c -m 444 $$x ${DESTDIR}${DESTINC}/$$x; \ + fi; \ + done + +${DESTDIR}${DESTINC}: + mkdir -p ${DESTDIR}${DESTINC} + +FRC: diff --git a/contrib/bind/port/freebsd/include/port_after.h b/contrib/bind/port/freebsd/include/port_after.h new file mode 100644 index 0000000..c2bc49a --- /dev/null +++ b/contrib/bind/port/freebsd/include/port_after.h @@ -0,0 +1,33 @@ +#define CAN_RECONNECT +#define USE_POSIX +#define POSIX_SIGNALS +#define USE_UTIME +#define USE_WAITPID +#define HAVE_GETRUSAGE +#define HAVE_FCHMOD +#define NEED_PSELECT +#define HAVE_SA_LEN +#define USE_LOG_CONS +#define HAVE_CHROOT +#define CAN_CHANGE_ID + +#define _TIMEZONE timezone + +#define PORT_NONBLOCK O_NONBLOCK +#define PORT_WOULDBLK EWOULDBLOCK +#define WAIT_T int +#define KSYMS "/kernel" +#define KMEM "/dev/kmem" +#define UDPSUM "udpcksum" + +/* + * 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 + * own AF_INET6, different from ours below, all of BIND's libraries and + * executables will need to be recompiled after the system <sys/socket.h> + * has had this type added. The type number below is correct on most BSD- + * derived systems for which AF_INET6 is defined. + */ +#ifndef AF_INET6 +#define AF_INET6 24 +#endif diff --git a/contrib/bind/port/freebsd/include/port_before.h b/contrib/bind/port/freebsd/include/port_before.h new file mode 100644 index 0000000..bc6b89c --- /dev/null +++ b/contrib/bind/port/freebsd/include/port_before.h @@ -0,0 +1,6 @@ +#define WANT_IRS_NIS +#define WANT_IRS_PW +#define WANT_IRS_GR +#define SIG_FN void +#define ts_sec tv_sec +#define ts_nsec tv_nsec diff --git a/contrib/bind/port/freebsd/include/sys/Makefile b/contrib/bind/port/freebsd/include/sys/Makefile new file mode 100644 index 0000000..ad7751c --- /dev/null +++ b/contrib/bind/port/freebsd/include/sys/Makefile @@ -0,0 +1,77 @@ +# ++Copyright++ +# - +# Copyright (c) +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# - +# Portions Copyright (c) 1993 by Digital Equipment Corporation. +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies, and that +# the name of Digital Equipment Corporation not be used in advertising or +# publicity pertaining to distribution of the document or software without +# specific, written prior permission. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +# WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +# CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +# SOFTWARE. +# - +# --Copyright-- + +HFILES= bitypes.h cdefs.h + +DESTDIR= +DESTINC= /usr/local/bind/include + +all depend: + +distclean: clean + +clean: + rm -f *~ *.BAK *.CKP *.orig time.h stat.h + +links: + @set -e; ln -s SRC/*.h . + +install: ${DESTDIR}${DESTINC}/sys + for x in ${HFILES}; do \ + if [ -f $$x ]; then \ + ${INSTALL} -c -m 444 $$x ${DESTDIR}${DESTINC}/sys/$$x;\ + fi; \ + done + +${DESTDIR}${DESTINC}/sys: + mkdir -p ${DESTDIR}${DESTINC}/sys diff --git a/contrib/bind/port/freebsd/include/sys/bitypes.h b/contrib/bind/port/freebsd/include/sys/bitypes.h new file mode 100644 index 0000000..ad0dfcb --- /dev/null +++ b/contrib/bind/port/freebsd/include/sys/bitypes.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1996 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 + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifndef __BIT_TYPES_DEFINED__ +#define __BIT_TYPES_DEFINED__ + + /* + * Basic integral types. Omit the typedef if + * not possible for a machine/compiler combination. + */ + typedef /*signed*/ char int8_t; + typedef unsigned char u_int8_t; + typedef short int16_t; + typedef unsigned short u_int16_t; + typedef int int32_t; + typedef unsigned int u_int32_t; + +# if 0 /* don't fight with these unless you need them */ + typedef long long int64_t; + typedef unsigned long long u_int64_t; +# endif + +#endif /* __BIT_TYPES_DEFINED__ */ diff --git a/contrib/bind/port/freebsd/noop.c b/contrib/bind/port/freebsd/noop.c new file mode 100644 index 0000000..f8eb9f4 --- /dev/null +++ b/contrib/bind/port/freebsd/noop.c @@ -0,0 +1,4 @@ +static void +noop() { + /* NOOP */ +} diff --git a/contrib/bind/port/freebsd/probe b/contrib/bind/port/freebsd/probe new file mode 100755 index 0000000..d1b0cfe --- /dev/null +++ b/contrib/bind/port/freebsd/probe @@ -0,0 +1,11 @@ +#!/bin/sh + +uname=/usr/bin/uname + +if [ -f $uname ]; then + case `$uname -s` in + FreeBSD) exit 0 ;; + esac +fi + +exit 1 diff --git a/contrib/bind/port/settings b/contrib/bind/port/settings new file mode 100755 index 0000000..942236e --- /dev/null +++ b/contrib/bind/port/settings @@ -0,0 +1,35 @@ +#!/bin/sh + +# this process is necessary because make(1) puts its command line into +# the environment, and when we exec a sub-make we need these command +# line settings (like CDEBUG=-g for example) to override what we get out +# of port/$systype/Makefile.set. therefore feed Makefile.set to this +# and it will merge things appropriately. a cache file is maintained +# to avoid calling this script way too often. + +cachefile=${1-//} +if [ -f "$cachefile" ]; then + echo "Using $cachefile" >&2 + exec cat $cachefile +fi + +case $cachefile in +//) ;; +*) echo "Making $cachefile" >&2 ;; +esac + +result='' +while read setting; do + var=`expr "$setting" : "'\([A-Z0-9_]*\)="` + val=`expr "$setting" : "'[A-Z0-9_]*=\([^']*\)'\$"` + eval "env=`echo \\${\$var-'$val'}`" + result="$result '$var=$env'" +done + +case $cachefile in +//) echo $result ;; +*) echo $result > $cachefile + exec cat $cachefile ;; +esac + +exit diff --git a/contrib/bind/port/systype b/contrib/bind/port/systype new file mode 100755 index 0000000..b022651 --- /dev/null +++ b/contrib/bind/port/systype @@ -0,0 +1,31 @@ +#!/bin/sh + +cachefile=${1-//} + +if [ -f $cachefile ]; then + echo "Using $cachefile" >&2 + exec cat $cachefile +fi + +case $cachefile in +/*) ;; +*) cachefile=`pwd`/$cachefile ;; +esac + +cd `dirname $0` +for systype in [a-z]*; do + if [ -f $systype/probe ]; then + if sh $systype/probe; then + case $cachefile in + //) ;; + *) echo "Making $cachefile" >&2 + echo $systype > $cachefile + ;; + esac + exec echo $systype + fi + fi +done + +echo unknown +exit 0 |