CVS commit: src/external/bsd/libbind/dist/nameser

2014-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  7 01:06:07 UTC 2014

Modified Files:
src/external/bsd/libbind/dist/nameser: ns_name.c

Log Message:
fix incorrect overflow test: https://android-review.googlesource.com/#/c/50570/


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/libbind/dist/nameser/ns_name.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libbind/dist/nameser/ns_name.c
diff -u src/external/bsd/libbind/dist/nameser/ns_name.c:1.1.1.2 src/external/bsd/libbind/dist/nameser/ns_name.c:1.2
--- src/external/bsd/libbind/dist/nameser/ns_name.c:1.1.1.2	Sun Sep  9 12:08:04 2012
+++ src/external/bsd/libbind/dist/nameser/ns_name.c	Thu Mar  6 20:06:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.1.1.2 2012/09/09 16:08:04 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.2 2014/03/07 01:06:07 christos Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. (ISC)
@@ -463,11 +463,13 @@ ns_name_unpack2(const u_char *msg, const
 			}
 			if (len  0)
 len = srcp - src + 1;
-			srcp = msg + (((n  0x3f)  8) | (*srcp  0xff));
-			if (srcp  msg || srcp = eom) {  /*% Out of range. */
+
+			n = ((n  0x3f)  8) | (*srcp  0xff);
+			if (n = eom - msg) {  /*% Out of range. */
 errno = EMSGSIZE;
 return (-1);
 			}
+			srcp = msg + n;
 			checked += 2;
 			/*
 			 * Check for loops in the compressed name;



CVS commit: src/external/bsd/libbind/dist

2012-09-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep  9 16:08:31 UTC 2012

Update of /cvsroot/src/external/bsd/libbind/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv5305

Log Message:
from ftp.isc.org

Status:

Vendor Tag: ISC
Release Tags:   libbind-6-0

U src/external/bsd/libbind/dist/COPYRIGHT
U src/external/bsd/libbind/dist/CHANGES
U src/external/bsd/libbind/dist/Makefile.in
U src/external/bsd/libbind/dist/README
U src/external/bsd/libbind/dist/aclocal.m4
U src/external/bsd/libbind/dist/api
U src/external/bsd/libbind/dist/config.threads.in
U src/external/bsd/libbind/dist/config.guess
U src/external/bsd/libbind/dist/config.h.in
U src/external/bsd/libbind/dist/config.sub
U src/external/bsd/libbind/dist/configure
U src/external/bsd/libbind/dist/configure.in
U src/external/bsd/libbind/dist/install-sh
U src/external/bsd/libbind/dist/libtool.m4
U src/external/bsd/libbind/dist/ltmain.sh
U src/external/bsd/libbind/dist/mkinstalldirs
U src/external/bsd/libbind/dist/port_after.h.in
U src/external/bsd/libbind/dist/port_before.h.in
U src/external/bsd/libbind/dist/version
U src/external/bsd/libbind/dist/bsd/gettimeofday.c
U src/external/bsd/libbind/dist/bsd/strcasecmp.c
U src/external/bsd/libbind/dist/bsd/writev.c
U src/external/bsd/libbind/dist/bsd/strerror.c
U src/external/bsd/libbind/dist/bsd/strtoul.c
U src/external/bsd/libbind/dist/bsd/daemon.c
U src/external/bsd/libbind/dist/bsd/strdup.c
U src/external/bsd/libbind/dist/bsd/ftruncate.c
U src/external/bsd/libbind/dist/bsd/strpbrk.c
U src/external/bsd/libbind/dist/bsd/mktemp.c
U src/external/bsd/libbind/dist/bsd/putenv.c
U src/external/bsd/libbind/dist/bsd/setenv.c
U src/external/bsd/libbind/dist/bsd/readv.c
U src/external/bsd/libbind/dist/bsd/utimes.c
U src/external/bsd/libbind/dist/bsd/Makefile.in
U src/external/bsd/libbind/dist/bsd/strsep.c
U src/external/bsd/libbind/dist/bsd/setitimer.c
U src/external/bsd/libbind/dist/doc/getipnodebyname.3
U src/external/bsd/libbind/dist/doc/resolver.man5
U src/external/bsd/libbind/dist/doc/getnetent.3
U src/external/bsd/libbind/dist/doc/inet_cidr.cat3
U src/external/bsd/libbind/dist/doc/resolver.3
U src/external/bsd/libbind/dist/doc/gethostbyname.man3
U src/external/bsd/libbind/dist/doc/resolver.cat5
U src/external/bsd/libbind/dist/doc/resolver.5
U src/external/bsd/libbind/dist/doc/irs.conf.cat5
U src/external/bsd/libbind/dist/doc/getaddrinfo.cat3
U src/external/bsd/libbind/dist/doc/hesiod.man3
U src/external/bsd/libbind/dist/doc/getaddrinfo.man3
U src/external/bsd/libbind/dist/doc/hostname.man7
U src/external/bsd/libbind/dist/doc/hesiod.3
U src/external/bsd/libbind/dist/doc/irs.conf.5
U src/external/bsd/libbind/dist/doc/tsig.3
U src/external/bsd/libbind/dist/doc/getnetent.man3
U src/external/bsd/libbind/dist/doc/resolver.cat3
U src/external/bsd/libbind/dist/doc/inet_cidr.man3
U src/external/bsd/libbind/dist/doc/hostname.7
U src/external/bsd/libbind/dist/doc/irs.conf.man5
U src/external/bsd/libbind/dist/doc/getnameinfo.3
U src/external/bsd/libbind/dist/doc/tsig.cat3
U src/external/bsd/libbind/dist/doc/gethostbyname.3
U src/external/bsd/libbind/dist/doc/getipnodebyname.cat3
U src/external/bsd/libbind/dist/doc/Makefile.in
U src/external/bsd/libbind/dist/doc/getipnodebyname.man3
U src/external/bsd/libbind/dist/doc/gethostbyname.cat3
U src/external/bsd/libbind/dist/doc/getnameinfo.cat3
U src/external/bsd/libbind/dist/doc/inet_cidr.3
U src/external/bsd/libbind/dist/doc/hostname.cat7
U src/external/bsd/libbind/dist/doc/tsig.man3
U src/external/bsd/libbind/dist/doc/getnetent.cat3
U src/external/bsd/libbind/dist/doc/hesiod.cat3
U src/external/bsd/libbind/dist/doc/getnameinfo.man3
U src/external/bsd/libbind/dist/doc/resolver.man3
U src/external/bsd/libbind/dist/doc/getaddrinfo.3
U src/external/bsd/libbind/dist/dst/dst_api.c
U src/external/bsd/libbind/dist/dst/dst_internal.h
U src/external/bsd/libbind/dist/dst/md5_locl.h
U src/external/bsd/libbind/dist/dst/support.c
U src/external/bsd/libbind/dist/dst/md5.h
U src/external/bsd/libbind/dist/dst/md5_dgst.c
U src/external/bsd/libbind/dist/dst/hmac_link.c
U src/external/bsd/libbind/dist/dst/Makefile.in
U src/external/bsd/libbind/dist/include/irp.h
U src/external/bsd/libbind/dist/include/resolv_mt.h
U src/external/bsd/libbind/dist/include/irs.h
U src/external/bsd/libbind/dist/include/netdb.h
U src/external/bsd/libbind/dist/include/res_update.h
U src/external/bsd/libbind/dist/include/hesiod.h
U src/external/bsd/libbind/dist/include/Makefile.in
U src/external/bsd/libbind/dist/include/netgroup.h
U src/external/bsd/libbind/dist/include/fd_setsize.h
U src/external/bsd/libbind/dist/include/resolv.h
U src/external/bsd/libbind/dist/include/isc/platform.h.in
U src/external/bsd/libbind/dist/include/isc/eventlib.h
U src/external/bsd/libbind/dist/include/isc/list.h
U src/external/bsd/libbind/dist/include/isc/heap.h
U src/external/bsd/libbind/dist/include/isc/dst.h
U src/external/bsd/libbind/dist/include/isc/assertions.h
U 

CVS commit: src/external/bsd/libbind/dist

2009-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 15:34:00 UTC 2009

Update of /cvsroot/src/external/bsd/libbind/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv17888

Log Message:
from ftp:///ftp.isc.org/isc/libbind import 6.0rc1.

Status:

Vendor Tag: ISC
Release Tags:   libbind-6-0rc1

N src/external/bsd/libbind/dist/COPYRIGHT
N src/external/bsd/libbind/dist/CHANGES
N src/external/bsd/libbind/dist/Makefile.in
N src/external/bsd/libbind/dist/README
N src/external/bsd/libbind/dist/aclocal.m4
N src/external/bsd/libbind/dist/api
N src/external/bsd/libbind/dist/config.threads.in
N src/external/bsd/libbind/dist/config.guess
N src/external/bsd/libbind/dist/config.h.in
N src/external/bsd/libbind/dist/config.sub
N src/external/bsd/libbind/dist/configure
N src/external/bsd/libbind/dist/configure.in
N src/external/bsd/libbind/dist/install-sh
N src/external/bsd/libbind/dist/libtool.m4
N src/external/bsd/libbind/dist/ltmain.sh
N src/external/bsd/libbind/dist/mkinstalldirs
N src/external/bsd/libbind/dist/port_after.h.in
N src/external/bsd/libbind/dist/port_before.h.in
N src/external/bsd/libbind/dist/version
N src/external/bsd/libbind/dist/bsd/gettimeofday.c
N src/external/bsd/libbind/dist/bsd/strcasecmp.c
N src/external/bsd/libbind/dist/bsd/writev.c
N src/external/bsd/libbind/dist/bsd/strerror.c
N src/external/bsd/libbind/dist/bsd/strtoul.c
N src/external/bsd/libbind/dist/bsd/daemon.c
N src/external/bsd/libbind/dist/bsd/strdup.c
N src/external/bsd/libbind/dist/bsd/ftruncate.c
N src/external/bsd/libbind/dist/bsd/strpbrk.c
N src/external/bsd/libbind/dist/bsd/mktemp.c
N src/external/bsd/libbind/dist/bsd/putenv.c
N src/external/bsd/libbind/dist/bsd/setenv.c
N src/external/bsd/libbind/dist/bsd/readv.c
N src/external/bsd/libbind/dist/bsd/utimes.c
N src/external/bsd/libbind/dist/bsd/Makefile.in
N src/external/bsd/libbind/dist/bsd/strsep.c
N src/external/bsd/libbind/dist/bsd/setitimer.c
N src/external/bsd/libbind/dist/doc/getipnodebyname.3
N src/external/bsd/libbind/dist/doc/resolver.man5
N src/external/bsd/libbind/dist/doc/getnetent.3
N src/external/bsd/libbind/dist/doc/inet_cidr.cat3
N src/external/bsd/libbind/dist/doc/resolver.3
N src/external/bsd/libbind/dist/doc/gethostbyname.man3
N src/external/bsd/libbind/dist/doc/resolver.cat5
N src/external/bsd/libbind/dist/doc/resolver.5
N src/external/bsd/libbind/dist/doc/irs.conf.cat5
N src/external/bsd/libbind/dist/doc/getaddrinfo.cat3
N src/external/bsd/libbind/dist/doc/hesiod.man3
N src/external/bsd/libbind/dist/doc/getaddrinfo.man3
N src/external/bsd/libbind/dist/doc/hostname.man7
N src/external/bsd/libbind/dist/doc/hesiod.3
N src/external/bsd/libbind/dist/doc/irs.conf.5
N src/external/bsd/libbind/dist/doc/tsig.3
N src/external/bsd/libbind/dist/doc/getnetent.man3
N src/external/bsd/libbind/dist/doc/resolver.cat3
N src/external/bsd/libbind/dist/doc/inet_cidr.man3
N src/external/bsd/libbind/dist/doc/hostname.7
N src/external/bsd/libbind/dist/doc/irs.conf.man5
N src/external/bsd/libbind/dist/doc/getnameinfo.3
N src/external/bsd/libbind/dist/doc/tsig.cat3
N src/external/bsd/libbind/dist/doc/gethostbyname.3
N src/external/bsd/libbind/dist/doc/getipnodebyname.cat3
N src/external/bsd/libbind/dist/doc/Makefile.in
N src/external/bsd/libbind/dist/doc/getipnodebyname.man3
N src/external/bsd/libbind/dist/doc/gethostbyname.cat3
N src/external/bsd/libbind/dist/doc/getnameinfo.cat3
N src/external/bsd/libbind/dist/doc/inet_cidr.3
N src/external/bsd/libbind/dist/doc/hostname.cat7
N src/external/bsd/libbind/dist/doc/tsig.man3
N src/external/bsd/libbind/dist/doc/getnetent.cat3
N src/external/bsd/libbind/dist/doc/hesiod.cat3
N src/external/bsd/libbind/dist/doc/getnameinfo.man3
N src/external/bsd/libbind/dist/doc/resolver.man3
N src/external/bsd/libbind/dist/doc/getaddrinfo.3
N src/external/bsd/libbind/dist/dst/dst_api.c
N src/external/bsd/libbind/dist/dst/dst_internal.h
N src/external/bsd/libbind/dist/dst/md5_locl.h
N src/external/bsd/libbind/dist/dst/support.c
N src/external/bsd/libbind/dist/dst/md5.h
N src/external/bsd/libbind/dist/dst/md5_dgst.c
N src/external/bsd/libbind/dist/dst/hmac_link.c
N src/external/bsd/libbind/dist/dst/Makefile.in
N src/external/bsd/libbind/dist/include/irp.h
N src/external/bsd/libbind/dist/include/resolv_mt.h
N src/external/bsd/libbind/dist/include/irs.h
N src/external/bsd/libbind/dist/include/netdb.h
N src/external/bsd/libbind/dist/include/res_update.h
N src/external/bsd/libbind/dist/include/hesiod.h
N src/external/bsd/libbind/dist/include/Makefile.in
N src/external/bsd/libbind/dist/include/netgroup.h
N src/external/bsd/libbind/dist/include/fd_setsize.h
N src/external/bsd/libbind/dist/include/resolv.h
N src/external/bsd/libbind/dist/include/isc/platform.h.in
N src/external/bsd/libbind/dist/include/isc/eventlib.h
N src/external/bsd/libbind/dist/include/isc/list.h
N src/external/bsd/libbind/dist/include/isc/heap.h
N src/external/bsd/libbind/dist/include/isc/dst.h
N src/external/bsd/libbind/dist/include/isc/assertions.h
N 

CVS commit: src/external/bsd/libbind/dist

2009-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 15:39:53 UTC 2009

Added Files:
src/external/bsd/libbind/dist: libbind2netbsd

Log Message:
add libbind2netbsd script based on bind2netbsd


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libbind/dist/libbind2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/libbind/dist/libbind2netbsd
diff -u /dev/null src/external/bsd/libbind/dist/libbind2netbsd:1.1
--- /dev/null	Sun Apr 12 11:39:53 2009
+++ src/external/bsd/libbind/dist/libbind2netbsd	Sun Apr 12 11:39:53 2009
@@ -0,0 +1,132 @@
+#! /bin/sh
+#
+#	$NetBSD: libbind2netbsd,v 1.1 2009/04/12 15:39:53 christos Exp $
+#
+# Copyright (c) 2000 The NetBSD Foundation, Inc.
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+#
+# libbind2netbsd:  convert abind tree into a
+# netbsd libbind source tree, under src/external/bsd,
+# based on bind2netbsd by Bernd Ernesti and changes by Simon Burge
+#
+# Rough instructions for importing new bind release:
+#
+#	$ cd /some/where/temporary
+#	$ tar xpfz /new/bind/release/tar/file
+#	$ sh /usr/src/external/bsd/libbind/dist/libbind2netbsd libbind-6.x.y `pwd`
+#	$ cd src/external/bsd/libbind/dist
+#	$ cvs import -m Import libbind 6.x.y src/external/bsd/libbind/dist ISC libbind-6-x-y
+#	$ cd ../../../../../libbind-6.x.y
+#	$ run ./configure
+#	$ run make
+#	- use the binclude4netbsd to create and import the new headers in
+#	  /usr/src/usr.sbin/bind/include
+#	- check makefiles to see if any extra sources have been added.
+#	- update distrib/sets if necessary.
+
+if [ $# -ne 2 ]; then echo bind2netbsd src dest; exit 1; fi
+
+r=$1
+d=$2/src/external/bsd/libbind/dist
+
+case $d in
+	/*)
+		;;
+	*)
+		d=`/bin/pwd`/$d
+		;;
+esac
+
+case $r in
+	/*)
+		;;
+	*)
+		r=`/bin/pwd`/$r
+		;;
+esac
+
+echo preparing directory $d
+rm -rf $d
+mkdir -p $d
+
+### Copy the files and directories
+echo copying $r to $d
+cd $r
+pax -rw * $d
+
+### Remove the $'s around RCS tags
+find $d -type f -print | xargs egrep -l '\$(Id|Created|Header|Revision)' | while read f; do
+	sed -e 's/\$\(Id.*\) \$/\1/' \
+	-e 's/\$\(Created.*\) \$/\1/' \
+	-e 's/\$\(Header.*\) \$/\1/' \
+	-e 's/\$\(Revision.*\) \$/\1/' \
+	 $f  /tmp/bind1f$$  mv /tmp/bind1f$$ $f  \
+	echo removed \$RCS tag from $f
+done
+
+### Add our NetBSD RCS Id
+find $d -type f -name '*.[chly]' -print | while read c; do
+	sed 1q  $c | grep -q '\$NetBSD' || (
+echo /*	\$NetBSD\$	*/ /tmp/bind3n$$
+echo  /tmp/bind3n$$
+cat $c   /tmp/bind3n$$
+mv /tmp/bind3n$$ $c  echo added NetBSD RCS tag to $c
+	)
+done
+
+find $d -type f -name '*.[0-9]' -print | while read m; do
+	sed 1q  $m | grep -q '\$NetBSD' || (
+echo .\\\	\$NetBSD\$ /tmp/bind2m$$
+echo .\\\ /tmp/bind2m$$
+cat $m  /tmp/bind2m$$
+mv /tmp/bind2m$$ $m  echo added NetBSD RCS tag to $m
+	)
+done
+
+find $d -type f -name '*.texi' -print | while read t; do
+sed 2 s/^/@c \$NetBSD\$\\
+/  $t  /tmp/bind4t$$
+	mv /tmp/bind4t$$ $t  echo added NetBSD RCS tag to $t
+done
+
+echo done
+
+### Clean up any CVS directories that might be around.
+echo cleaning up CVS residue.
+(
+	cd $d
+	find . -type d -name CVS -print | xargs rm -r
+)
+echo done
+
+### Fixing file and directory permissions.
+echo Fixing file/directory permissions.
+(
+	cd $d
+	find . -type f -print | xargs chmod u+rw,go+r
+	find . -type d -print | xargs chmod u+rwx,go+rx
+)
+echo done
+
+exit 0



CVS commit: src/external/bsd/libbind/dist

2009-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 17:08:03 UTC 2009

Added Files:
src/external/bsd/libbind/dist: include4netbsd libc4netbsd

Log Message:
more fixes for the import scripts


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libbind/dist/include4netbsd \
src/external/bsd/libbind/dist/libc4netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/libbind/dist/include4netbsd
diff -u /dev/null src/external/bsd/libbind/dist/include4netbsd:1.1
--- /dev/null	Sun Apr 12 13:08:03 2009
+++ src/external/bsd/libbind/dist/include4netbsd	Sun Apr 12 13:08:03 2009
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Use this script to update the bind include files used in the nameserver,
+# after you've imported and built the latest libbind code. After you run this,
+# cvs import the resulting directory
+#
+# $ cd /usr/src/external/bsd/libbind/dist
+# $ ./include4netbsd . /tmp/include
+# $ cd /tmp/include
+# $ cvs -d cvs.netbsd.org:/cvsroot import src/include ISC libbind-X-Y-Z
+#
+
+PROG=$(basename $0)
+if [ \( -z $1 \) -o \( -z $2 \) ]
+then
+	echo Usage: $PROG libbind-src include-dest 12
+	exit 1
+fi
+
+LIBBIND=$1
+INCLUDE=$2
+
+mkdir -p $INCLUDE
+
+copy()
+{
+	sed -e 's/ __P((/(/g' \
+	-e 's/));/);/g' \
+	-e 's/u_int\([136]\)/uint\1/g' \
+	-e '/\\file/d' \
+	 $1  $2
+}
+
+for i in netdb.h res_update.h resolv.h
+do
+	copy $LIBBIND/include/$i $INCLUDE/$i
+done
+
+mkdir -p $INCLUDE/arpa
+
+for i in inet.h nameser.h nameser_compat.h
+do
+	copy $LIBBIND/include/arpa/$i $INCLUDE/arpa/$i
+done
Index: src/external/bsd/libbind/dist/libc4netbsd
diff -u /dev/null src/external/bsd/libbind/dist/libc4netbsd:1.1
--- /dev/null	Sun Apr 12 13:08:03 2009
+++ src/external/bsd/libbind/dist/libc4netbsd	Sun Apr 12 13:08:03 2009
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# Use this script to update the libc resolver code, after you've imported
+# the latest libbind code. After you run this, cvs import the resulting
+# directory
+#
+# $ cd /usr/src/external/bsd/libbind/dist
+# $ ./libc4netbsd . /tmp/libc
+# $ cd /tmp/libc
+# $ cvs -d cvs.netbsd.org:/cvsroot import src/lib/libc ISC libbind-X-Y-Z
+#
+
+PROG=$(basename $0)
+if [ \( -z $1 \) -o \( -z $2 \) ]
+then
+	echo Usage: $PROG bind-src libc-dest 12
+	exit 1
+fi
+LIBBIND=$1
+LIBC=$2
+
+mkdir -p $LIBC/include/isc
+
+for i in assertions.h dst.h eventlib.h heap.h list.h memcluster.h
+do
+	cp $LIBBIND/include/isc/$i $LIBC/include/isc/$i
+done
+cp $LIBBIND/include/resolv_mt.h $LIBC/include
+
+mkdir -p $LIBC/inet
+
+for i in inet_addr.c inet_cidr_ntop.c inet_cidr_pton.c inet_ntop.c \
+inet_pton.c nsap_addr.c
+do
+	cp $LIBBIND/inet/$i $LIBC/inet/$i
+done
+
+mkdir -p $LIBC/isc
+
+for i in assertions.c ev_streams.c ev_timers.c eventlib_p.h
+do
+	cp $LIBBIND/isc/$i $LIBC/isc/$i
+done
+
+mkdir -p $LIBC/nameser
+
+for i in ns_name.c ns_netint.c ns_parse.c ns_print.c ns_samedomain.c ns_ttl.c
+do
+	cp $LIBBIND/nameser/$i $LIBC/nameser/$i
+done
+
+mkdir -p $LIBC/resolv
+
+for i in herror.c res_comp.c res_data.c res_debug.c res_debug.h res_init.c \
+res_mkquery.c res_private.h res_query.c res_send.c
+do
+	cp $LIBBIND/resolv/$i $LIBC/resolv/$i
+done
+
+mkdir -p $LIBC/net
+cp $LIBBIND/isc/base64.c $LIBC/net