summaryrefslogtreecommitdiffstats
path: root/contrib/bind/lib/isc
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2001-01-28 23:00:22 +0000
committerasmodai <asmodai@FreeBSD.org>2001-01-28 23:00:22 +0000
commit1f243835b5b81bfd6b9e5f666730965fe5d60ed6 (patch)
tree4c0925b2692b57db0c0c1044db977bbc4c0899d7 /contrib/bind/lib/isc
parent43c4a8b07e19a2567390a7f788929e5c908a4d7b (diff)
downloadFreeBSD-src-1f243835b5b81bfd6b9e5f666730965fe5d60ed6.zip
FreeBSD-src-1f243835b5b81bfd6b9e5f666730965fe5d60ed6.tar.gz
Virgin import of BIND v8.2.3-REL
Diffstat (limited to 'contrib/bind/lib/isc')
-rw-r--r--contrib/bind/lib/isc/Makefile12
-rw-r--r--contrib/bind/lib/isc/ctl_clnt.c6
-rw-r--r--contrib/bind/lib/isc/ctl_srvr.c3
-rw-r--r--contrib/bind/lib/isc/ev_connects.c3
-rw-r--r--contrib/bind/lib/isc/heap.mdoc9
-rw-r--r--contrib/bind/lib/isc/logging.c7
-rw-r--r--contrib/bind/lib/isc/movefile.c35
7 files changed, 57 insertions, 18 deletions
diff --git a/contrib/bind/lib/isc/Makefile b/contrib/bind/lib/isc/Makefile
index 5485ec7..7845365 100644
--- a/contrib/bind/lib/isc/Makefile
+++ b/contrib/bind/lib/isc/Makefile
@@ -13,12 +13,12 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
-# $Id: Makefile,v 8.26 2000/07/11 06:41:41 vixie Exp $
+# $Id: Makefile,v 8.28 2000/12/23 08:03:00 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
# this Makefile will be invoked with a lot of overrides for the following:
-SYSTYPE= bsdos
+SYSTYPE= freebsd
DESTDIR =
DESTLIB = /usr/local/lib
O=o
@@ -26,7 +26,7 @@ A=a
CC= cc
LD= ld
SHELL= /bin/sh
-CDEBUG= -g
+CDEBUG= -g -Wall
TOP= ../..
INCL = ${TOP}/include
PORTINCL = ${TOP}/port/${SYSTYPE}/include
@@ -47,13 +47,15 @@ SRCS= tree.c base64.c bitncmp.c assertions.c \
memcluster.c logging.c heap.c \
ctl_p.c ctl_srvr.c ctl_clnt.c \
eventlib.c ev_connects.c ev_files.c \
- ev_timers.c ev_streams.c ev_waits.c
+ ev_timers.c ev_streams.c ev_waits.c \
+ movefile.c
OBJS= tree.${O} base64.${O} bitncmp.${O} assertions.${O} \
memcluster.${O} logging.${O} heap.${O} \
ctl_p.${O} ctl_srvr.${O} ctl_clnt.${O} \
eventlib.${O} ev_connects.${O} ev_files.${O} \
- ev_timers.${O} ev_streams.${O} ev_waits.${O}
+ ev_timers.${O} ev_streams.${O} ev_waits.${O} \
+ movefile.${O}
all: ${LIBBIND}
diff --git a/contrib/bind/lib/isc/ctl_clnt.c b/contrib/bind/lib/isc/ctl_clnt.c
index 66f32f8..4e19d2c 100644
--- a/contrib/bind/lib/isc/ctl_clnt.c
+++ b/contrib/bind/lib/isc/ctl_clnt.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_clnt.c,v 8.14 1999/10/13 16:39:33 vixie Exp $";
+static const char rcsid[] = "$Id: ctl_clnt.c,v 8.15 2000/11/14 01:10:36 vixie Exp $";
#endif /* not lint */
/*
@@ -261,11 +261,11 @@ new_tran(struct ctl_cctx *ctx, ctl_clntdone donefunc, void *uap, int w) {
buffer_init(new->outbuf);
new->donefunc = donefunc;
new->uap = uap;
+ INIT_LINK(new, link);
+ INIT_LINK(new, wlink);
APPEND(ctx->tran, new, link);
if (w)
APPEND(ctx->wtran, new, wlink);
- else
- INIT_LINK(new, wlink);
return (new);
}
diff --git a/contrib/bind/lib/isc/ctl_srvr.c b/contrib/bind/lib/isc/ctl_srvr.c
index ff1fc82..9beea0d 100644
--- a/contrib/bind/lib/isc/ctl_srvr.c
+++ b/contrib/bind/lib/isc/ctl_srvr.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_srvr.c,v 8.23 2000/02/04 08:28:33 vixie Exp $";
+static const char rcsid[] = "$Id: ctl_srvr.c,v 8.24 2000/11/14 01:10:37 vixie Exp $";
#endif /* not lint */
/*
@@ -422,6 +422,7 @@ ctl_accept(evContext lev, void *uap, int fd,
strerror(errno));
}
ctx->cur_sess++;
+ INIT_LINK(sess, link);
APPEND(ctx->sess, sess, link);
sess->ctx = ctx;
sess->sock = fd;
diff --git a/contrib/bind/lib/isc/ev_connects.c b/contrib/bind/lib/isc/ev_connects.c
index 1da5c10..5378665 100644
--- a/contrib/bind/lib/isc/ev_connects.c
+++ b/contrib/bind/lib/isc/ev_connects.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_connects.c,v 8.26 2000/02/04 08:28:34 vixie Exp $";
+static const char rcsid[] = "$Id: ev_connects.c,v 8.27 2000/11/14 01:10:37 vixie Exp $";
#endif
/* Import. */
@@ -256,6 +256,7 @@ evTryAccept(evContext opaqueCtx, evConnID id, int *sys_errno) {
return (-1);
}
}
+ INIT_LINK(new, link);
APPEND(ctx->accepts, new, link);
*sys_errno = new->ioErrno;
return (0);
diff --git a/contrib/bind/lib/isc/heap.mdoc b/contrib/bind/lib/isc/heap.mdoc
index 516490b..6e0384d 100644
--- a/contrib/bind/lib/isc/heap.mdoc
+++ b/contrib/bind/lib/isc/heap.mdoc
@@ -1,11 +1,11 @@
-.\" $Id: heap.mdoc,v 8.5 1999/01/08 19:25:38 vixie Exp $
+.\" $Id: heap.mdoc,v 8.6 2000/11/15 02:03:52 marka Exp $
.\"
.\"Copyright (c) 1997,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
.\"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
@@ -18,9 +18,8 @@
.Dd Jan 1, 1997
.\"Os OPERATING_SYSTEM [version/release]
.Os BSD 4
-.\" TODO--get correct section # below!!
.Dt HEAP @SYSCALL_EXT@
-.Sh DESCRIPTION
+.Sh NAME
.Nm heap_new ,
.Nm heap_free ,
.Nm heap_insert ,
diff --git a/contrib/bind/lib/isc/logging.c b/contrib/bind/lib/isc/logging.c
index 7d6964b..0d9037f 100644
--- a/contrib/bind/lib/isc/logging.c
+++ b/contrib/bind/lib/isc/logging.c
@@ -16,7 +16,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: logging.c,v 8.26 2000/04/23 02:19:02 vixie Exp $";
+static const char rcsid[] = "$Id: logging.c,v 8.28 2000/12/23 08:14:54 vixie Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -39,6 +39,7 @@ static const char rcsid[] = "$Id: logging.c,v 8.26 2000/04/23 02:19:02 vixie Exp
#include <isc/assertions.h>
#include <isc/logging.h>
#include <isc/memcluster.h>
+#include <isc/misc.h>
#include "port_after.h"
@@ -78,10 +79,10 @@ version_rename(log_channel chan) {
for (ver--; ver > 0; ver--) {
sprintf(old_name, "%s.%d", chan->out.file.name, ver-1);
sprintf(new_name, "%s.%d", chan->out.file.name, ver);
- (void)rename(old_name, new_name);
+ (void)isc_movefile(old_name, new_name);
}
sprintf(new_name, "%s.0", chan->out.file.name);
- (void)rename(chan->out.file.name, new_name);
+ (void)isc_movefile(chan->out.file.name, new_name);
}
FILE *
diff --git a/contrib/bind/lib/isc/movefile.c b/contrib/bind/lib/isc/movefile.c
new file mode 100644
index 0000000..1b64b6c
--- /dev/null
+++ b/contrib/bind/lib/isc/movefile.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2000 by Internet Software Consortium, Inc.
+ *
+ * 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.
+ */
+
+
+#include <port_before.h>
+#include <stdio.h>
+#include <isc/misc.h>
+#include <port_after.h>
+#ifndef HAVE_MOVEFILE
+/*
+ * rename() is lame (can't overwrite an existing file) on some systems.
+ * use movefile() instead, and let lame OS ports do what they need to.
+ */
+
+int
+isc_movefile(const char *oldname, const char *newname) {
+ return (rename(oldname, newname));
+}
+#else
+ static int os_port_has_isc_movefile = 1;
+#endif
OpenPOWER on IntegriCloud