Commit 11dbf2fc authored by Mark Andrews's avatar Mark Andrews

2447. [cleanup] libbind has been split out as a seperate produce.

parent 824f38c0
2447. [cleanup] libbind has been split out as a seperate produce.
2446. [func] Add a new log message about build options on startup.
A new command-line option '-V' for named is also
provided to show this information. [RT# 18645]
......
......@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.50 2007/09/03 00:36:53 marka Exp $
# $Id: Makefile.in,v 1.51 2008/09/24 02:13:02 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
......@@ -21,18 +21,11 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
SUBDIRS = make lib bin doc @LIBBIND@
SUBDIRS = make lib bin doc
TARGETS =
@BIND9_MAKE_RULES@
distclean::
@if [ "X@LIBBIND@" = "X" ] ; then \
i=lib/bind; \
echo "making $@ in `pwd`/$$i"; \
(cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \
fi
distclean::
rm -f config.cache config.h config.log config.status TAGS
rm -f libtool isc-config.sh configure.lineno
......
......@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.448 $)
AC_REVISION($Revision: 1.449 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
......@@ -38,6 +38,19 @@ AC_SUBST(STD_CDEFINES)
AC_SUBST(STD_CWARNINGS)
AC_SUBST(CCOPT)
# Warn if the user specified libbind, which is now deprecated
AC_ARG_ENABLE(libbind, [ --enable-libbind deprecated])
case "$enable_libbind" in
yes)
AC_MSG_ERROR(['libbind' is no longer part of the BIND 9 distribution.
It is available from http://www.isc.org as a separate download.])
;;
no|'')
;;
esac
#
# Make very sure that these are the first files processed by
# config.status, since we use the processed output as the input for
......@@ -1252,22 +1265,6 @@ AC_SUBST(LIBTOOL_MODE_LINK)
AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
AC_SUBST(LIBTOOL_IN_MAIN)
#
# build libbind?
#
AC_ARG_ENABLE(libbind,
[ --enable-libbind build libbind [default=no]])
case "$enable_libbind" in
yes)
LIBBIND=lib/bind
AC_SUBST(LIBBIND)
;;
no|'')
;;
esac
#
# Here begins a very long section to determine the system's networking
# capabilities. The order of the tests is signficant.
......
configure.lineno
port_before.h
port_after.h
config.log
config.h
config.cache
prand_conf
prand_conf.h
Makefile
config.cache
config.status
timestamp
libtool
autom4te.cache
# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001-2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC 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.in,v 1.31 2007/06/19 23:47:13 tbox Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@LIBBIND_API@
LIBS = @LIBS@
DAEMON_OBJS=bsd/daemon.@O@
STRSEP_OBJS=bsd/strsep.@O@
BSDOBJS= @DAEMON_OBJS@ @STRSEP_OBJS@ bsd/ftruncate.@O@ bsd/gettimeofday.@O@ \
bsd/mktemp.@O@ bsd/putenv.@O@ bsd/readv.@O@ bsd/setenv.@O@ \
bsd/setitimer.@O@ bsd/strcasecmp.@O@ bsd/strdup.@O@ \
bsd/strerror.@O@ bsd/strpbrk.@O@ bsd/strtoul.@O@ bsd/utimes.@O@ \
bsd/writev.@O@
DSTOBJS= dst/dst_api.@O@ dst/hmac_link.@O@ dst/md5_dgst.@O@ dst/support.@O@
INETOBJS= inet/inet_addr.@O@ inet/inet_cidr_ntop.@O@ inet/inet_cidr_pton.@O@ \
inet/inet_data.@O@ inet/inet_lnaof.@O@ inet/inet_makeaddr.@O@ \
inet/inet_net_ntop.@O@ inet/inet_net_pton.@O@ inet/inet_neta.@O@ \
inet/inet_netof.@O@ inet/inet_network.@O@ inet/inet_ntoa.@O@ \
inet/inet_ntop.@O@ inet/inet_pton.@O@ inet/nsap_addr.@O@
WANT_IRS_THREADS_OBJS= irs/gethostent_r.@O@ irs/getnetent_r.@O@ \
irs/getnetgrent_r.@O@ irs/getprotoent_r.@O@ irs/getservent_r.@O@
WANT_IRS_NISGR_OBJS= irs/nis_gr.@O@
WANT_IRS_GR_OBJS= irs/dns_gr.@O@ irs/irp_gr.@O@ irs/lcl_gr.@O@ irs/gen_gr.@O@ \
irs/getgrent.@O@ @WANT_IRS_NISGR_OBJS@ @WANT_IRS_THREADSGR_OBJS@
WANT_IRS_THREADSPW_OBJS=irs/getpwent_r.@O@
WANT_IRS_NISPW_OBJS= irs/nis_pw.@O@
WANT_IRS_DBPW_OBJS=irs/irp_pw.@O@ irs/lcl_pw.@O@
WANT_IRS_PW_OBJS= irs/dns_pw.@O@ irs/gen_pw.@O@ irs/getpwent.@O@ \
@WANT_IRS_DBPW_OBJS@ @WANT_IRS_NISPW_OBJS@ @WANT_IRS_THREADSPW_OBJS@
WANT_IRS_NIS_OBJS= irs/nis_ho.@O@ irs/nis_ng.@O@ irs/nis_nw.@O@ \
irs/nis_pr.@O@ irs/nis_sv.@O@
IRSOBJS= @WANT_IRS_GR_OBJS@ @WANT_IRS_NIS_OBJS@ @WANT_IRS_THREADS_OBJS@ \
@WANT_IRS_PW_OBJS@ \
irs/dns.@O@ irs/dns_ho.@O@ irs/dns_nw.@O@ irs/dns_pr.@O@ \
irs/dns_sv.@O@ irs/gai_strerror.@O@ irs/gen.@O@ irs/gen_ho.@O@ \
irs/gen_ng.@O@ irs/gen_nw.@O@ irs/gen_pr.@O@ irs/gen_sv.@O@ \
irs/getaddrinfo.@O@ irs/gethostent.@O@ irs/getnameinfo.@O@ \
irs/getnetent.@O@ irs/getnetgrent.@O@ \
irs/getprotoent.@O@ irs/getservent.@O@ irs/hesiod.@O@ \
irs/irp.@O@ irs/irp_ho.@O@ irs/irp_ng.@O@ irs/irp_nw.@O@ \
irs/irp_pr.@O@ irs/irp_sv.@O@ irs/irpmarshall.@O@ irs/irs_data.@O@ \
irs/lcl.@O@ irs/lcl_ho.@O@ irs/lcl_ng.@O@ irs/lcl_nw.@O@ \
irs/lcl_pr.@O@ irs/lcl_sv.@O@ irs/nis.@O@ irs/nul_ng.@O@ irs/util.@O@
WANT_IRS_THREADSGR_OBJS=irs/getgrent_r.@O@
ISCOBJS= isc/assertions.@O@ isc/base64.@O@ isc/bitncmp.@O@ isc/ctl_clnt.@O@ \
isc/ctl_p.@O@ isc/ctl_srvr.@O@ isc/ev_connects.@O@ isc/ev_files.@O@ \
isc/ev_streams.@O@ isc/ev_timers.@O@ isc/ev_waits.@O@ \
isc/eventlib.@O@ isc/heap.@O@ isc/hex.@O@ isc/logging.@O@ \
isc/memcluster.@O@ isc/movefile.@O@ isc/tree.@O@
NAMESEROBJS= nameser/ns_date.@O@ nameser/ns_name.@O@ nameser/ns_netint.@O@ \
nameser/ns_parse.@O@ nameser/ns_print.@O@ nameser/ns_samedomain.@O@ \
nameser/ns_sign.@O@ nameser/ns_ttl.@O@ nameser/ns_verify.@O@
RESOLVOBJS= resolv/herror.@O@ resolv/mtctxres.@O@ resolv/res_comp.@O@ \
resolv/res_data.@O@ resolv/res_debug.@O@ resolv/res_findzonecut.@O@ \
resolv/res_init.@O@ resolv/res_mkquery.@O@ resolv/res_mkupdate.@O@ \
resolv/res_query.@O@ resolv/res_send.@O@ resolv/res_sendsigned.@O@ \
resolv/res_update.@O@
SUBDIRS = bsd dst include inet irs isc nameser resolv @PORT_INCLUDE@
TARGETS= timestamp
OBJS= ${BSDOBJS} ${DSTOBJS} ${INETOBJS} ${IRSOBJS} ${ISCOBJS} \
${NAMESEROBJS} ${RESOLVOBJS}
@BIND9_MAKE_RULES@
# Attempt to disable parallel processing.
.NOTPARALLEL:
.NO_PARALLEL:
libbind.@SA@: ${OBJS}
${AR} ${ARFLAGS} $@ ${OBJS}
${RANLIB} $@
libbind.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libbind.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
${OBJS} ${LIBS}
timestamp: libbind.@A@
touch timestamp
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
install:: timestamp installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_DATA} libbind.@A@ ${DESTDIR}${libdir}
clean distclean::
rm -f libbind.@SA@ libbind.la
distclean::
rm -f make/rules make/includes make/mkdep
distclean::
rm -f config.cache config.h config.log config.status libtool
rm -f port_before.h port_after.h configure.lineno
rm -f port/Makefile @PORT_DIR@/Makefile
man:
--with-irs-gr=yes #define WANT_IRS_GR
--with-irs-nis=yes #define WANT_IRS_NIS
--with-irs-pw=yes #define WANT_IRS_PW
sinclude(../../libtool.m4)dnl
LIBINTERFACE = 4
LIBREVISION = 9
LIBAGE = 0
# Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC 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.in,v 1.11 2008/03/20 23:47:00 tbox Exp $
srcdir= @srcdir@
VPATH = @srcdir@
DAEMON_OBJS=daemon.@O@
STRSEP_OBJS=strsep.@O@
OBJS= @DAEMON_OBJS@ @STRSEP_OBJS@ ftruncate.@O@ gettimeofday.@O@ \
mktemp.@O@ putenv.@O@ \
readv.@O@ setenv.@O@ setitimer.@O@ strcasecmp.@O@ strdup.@O@ \
strerror.@O@ strpbrk.@O@ strtoul.@O@ utimes.@O@ \
writev.@O@
SRCS= daemon.c ftruncate.c gettimeofday.c mktemp.c putenv.c \
readv.c setenv.c setitimer.c strcasecmp.c strdup.c \
strerror.c strpbrk.c strsep.c strtoul.c utimes.c \
writev.c
TARGETS= ${OBJS}
CINCLUDES= -I.. -I../include -I${srcdir}/../include
@BIND9_MAKE_RULES@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "$Id: daemon.c,v 1.2 2005/04/27 04:56:10 sra Exp $";
#endif /* LIBC_SCCS and not lint */
/*
* Copyright (c) 1990, 1993
* 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.
*/
#include "port_before.h"
#include <fcntl.h>
#include <paths.h>
#include <unistd.h>
#include "port_after.h"
#ifndef NEED_DAEMON
int __bind_daemon__;
#else
int
daemon(int nochdir, int noclose) {
int fd;
switch (fork()) {
case -1:
return (-1);
case 0:
break;
default:
_exit(0);
}
if (setsid() == -1)
return (-1);
if (!nochdir)
(void)chdir("/");
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
(void)dup2(fd, STDIN_FILENO);
(void)dup2(fd, STDOUT_FILENO);
(void)dup2(fd, STDERR_FILENO);
if (fd > 2)
(void)close (fd);
}
return (0);
}
#endif
/*! \file */
#ifndef LINT
static const char rcsid[] = "$Id: ftruncate.c,v 1.3 2005/04/27 18:16:45 sra Exp $";
#endif
/*! \file
* \brief
* ftruncate - set file size, BSD Style
*
* shortens or enlarges the file as neeeded
* uses some undocumented locking call. It is known to work on SCO unix,
* other vendors should try.
* The #error directive prevents unsupported OSes
*/
#include "port_before.h"
#if defined(M_UNIX)
#define OWN_FTRUNCATE
#include <stdio.h>
#ifdef _XOPEN_SOURCE
#undef _XOPEN_SOURCE
#endif
#ifdef _POSIX_SOURCE
#undef _POSIX_SOURCE
#endif
#include <fcntl.h>
#include "port_after.h"
int
__ftruncate(int fd, long wantsize) {
long cursize;
/* determine current file size */
if ((cursize = lseek(fd, 0L, 2)) == -1)
return (-1);
/* maybe lengthen... */
if (cursize < wantsize) {
if (lseek(fd, wantsize - 1, 0) == -1 ||
write(fd, "", 1) == -1) {
return (-1);
}
return (0);
}
/* maybe shorten... */
if (wantsize < cursize) {
struct flock fl;
fl.l_whence = 0;
fl.l_len = 0;
fl.l_start = wantsize;
fl.l_type = F_WRLCK;
return (fcntl(fd, F_FREESP, &fl));
}
return (0);
}
#endif
#ifndef OWN_FTRUNCATE
int __bindcompat_ftruncate;
#endif
#ifndef LINT
static const char rcsid[] = "$Id: gettimeofday.c,v 1.4 2005/04/27 04:56:11 sra Exp $";
#endif
#include "port_before.h"
#include <stdio.h>
#include <syslog.h>
#include <sys/time.h>
#include "port_after.h"
#if !defined(NEED_GETTIMEOFDAY)
/*%
* gettimeofday() occasionally returns invalid tv_usec on some platforms.
*/
#define MILLION 1000000
#undef gettimeofday
int
isc__gettimeofday(struct timeval *tp, struct timezone *tzp) {
int res;
res = gettimeofday(tp, tzp);
if (res < 0)
return (res);
if (tp == NULL)
return (res);
if (tp->tv_usec < 0) {
do {
tp->tv_usec += MILLION;
tp->tv_sec--;
} while (tp->tv_usec < 0);
goto log;
} else if (tp->tv_usec > MILLION) {
do {
tp->tv_usec -= MILLION;
tp->tv_sec++;
} while (tp->tv_usec > MILLION);
goto log;
}
return (res);
log:
syslog(LOG_ERR, "gettimeofday: tv_usec out of range\n");
return (res);
}