summaryrefslogtreecommitdiffstats
path: root/contrib/bind/lib/isc
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2003-06-17 08:25:13 +0000
committerdougb <dougb@FreeBSD.org>2003-06-17 08:25:13 +0000
commitf97237131f327c9eda67f546f7acffceef5a9fde (patch)
tree04f9050731919faa97a44a524d6a4129aea8e98d /contrib/bind/lib/isc
parent02f065cde2cf18b6e76deab6f48d7aeb327bd639 (diff)
downloadFreeBSD-src-f97237131f327c9eda67f546f7acffceef5a9fde.zip
FreeBSD-src-f97237131f327c9eda67f546f7acffceef5a9fde.tar.gz
Import of ISC BIND version 8.3.6.
Version 8.3.5 was skipped due to bugs fixed in this version.
Diffstat (limited to 'contrib/bind/lib/isc')
-rw-r--r--contrib/bind/lib/isc/ctl_clnt.c4
-rw-r--r--contrib/bind/lib/isc/ctl_srvr.c4
-rw-r--r--contrib/bind/lib/isc/ev_files.c4
-rw-r--r--contrib/bind/lib/isc/ev_timers.c14
-rw-r--r--contrib/bind/lib/isc/ev_waits.c8
-rw-r--r--contrib/bind/lib/isc/eventlib.c16
-rw-r--r--contrib/bind/lib/isc/eventlib_p.h5
-rw-r--r--contrib/bind/lib/isc/logging.c11
8 files changed, 36 insertions, 30 deletions
diff --git a/contrib/bind/lib/isc/ctl_clnt.c b/contrib/bind/lib/isc/ctl_clnt.c
index 56e5098..13d71d5 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.17 2001/06/06 00:33:35 marka Exp $";
+static const char rcsid[] = "$Id: ctl_clnt.c,v 8.18 2002/07/08 05:10:23 marka Exp $";
#endif /* not lint */
/*
@@ -185,7 +185,7 @@ ctl_client(evContext lev, const struct sockaddr *cap, size_t cap_len,
if (evConnect(lev, ctx->sock, (const struct sockaddr *)sap, sap_len,
conn_done, ctx, &ctx->coID) < 0) {
(*ctx->logger)(ctl_error, "%s: evConnect(fd %d): %s",
- me, (void *)ctx->sock, strerror(errno));
+ me, ctx->sock, strerror(errno));
fatal:
if (ctx != NULL) {
if (ctx->sock >= 0)
diff --git a/contrib/bind/lib/isc/ctl_srvr.c b/contrib/bind/lib/isc/ctl_srvr.c
index 91a2c1b..835bcd4 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.25 2001/05/29 05:49:27 marka Exp $";
+static const char rcsid[] = "$Id: ctl_srvr.c,v 8.26 2002/07/08 05:10:25 marka Exp $";
#endif /* not lint */
/*
@@ -252,7 +252,7 @@ ctl_server(evContext lev, const struct sockaddr *sap, size_t sap_len,
&ctx->acID) < 0) {
save_errno = errno;
(*ctx->logger)(ctl_error, "%s: evListen(fd %d): %s",
- me, (void *)ctx->sock, strerror(errno));
+ me, ctx->sock, strerror(errno));
close(ctx->sock);
memput(ctx, sizeof *ctx);
errno = save_errno;
diff --git a/contrib/bind/lib/isc/ev_files.c b/contrib/bind/lib/isc/ev_files.c
index c6bcab6..3a6894b 100644
--- a/contrib/bind/lib/isc/ev_files.c
+++ b/contrib/bind/lib/isc/ev_files.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_files.c,v 1.21 2001/11/01 05:35:46 marka Exp $";
+static const char rcsid[] = "$Id: ev_files.c,v 1.22 2002/07/08 05:50:07 marka Exp $";
#endif
#include "port_before.h"
@@ -54,7 +54,7 @@ evSelectFD(evContext opaqueCtx,
int mode;
evPrintf(ctx, 1,
- "evSelectFD(ctx %#x, fd %d, mask 0x%x, func %#x, uap %#x)\n",
+ "evSelectFD(ctx %p, fd %d, mask 0x%x, func %p, uap %p)\n",
ctx, fd, eventmask, func, uap);
if (eventmask == 0 || (eventmask & ~EV_MASK_ALL) != 0)
EV_ERR(EINVAL);
diff --git a/contrib/bind/lib/isc/ev_timers.c b/contrib/bind/lib/isc/ev_timers.c
index 03436c6..0f3c56f 100644
--- a/contrib/bind/lib/isc/ev_timers.c
+++ b/contrib/bind/lib/isc/ev_timers.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_timers.c,v 1.32 2001/11/01 05:35:47 marka Exp $";
+static const char rcsid[] = "$Id: ev_timers.c,v 1.33 2002/07/08 05:50:09 marka Exp $";
#endif
/* Import. */
@@ -152,10 +152,10 @@ evSetTimer(evContext opaqueCtx,
evTimer *id;
evPrintf(ctx, 1,
-"evSetTimer(ctx %#x, func %#x, uap %#x, due %d.%09ld, inter %d.%09ld)\n",
+"evSetTimer(ctx %p, func %p, uap %p, due %ld.%09ld, inter %ld.%09ld)\n",
ctx, func, uap,
- due.tv_sec, due.tv_nsec,
- inter.tv_sec, inter.tv_nsec);
+ (long)due.tv_sec, due.tv_nsec,
+ (long)inter.tv_sec, inter.tv_nsec);
/* due={0,0} is a magic cookie meaning "now." */
if (due.tv_sec == 0 && due.tv_nsec == 0L)
@@ -379,10 +379,10 @@ print_timer(void *what, void *uap) {
cur = what;
evPrintf(ctx, 7,
- " func %p, uap %p, due %d.%09ld, inter %d.%09ld\n",
+ " func %p, uap %p, due %ld.%09ld, inter %ld.%09ld\n",
cur->func, cur->uap,
- cur->due.tv_sec, cur->due.tv_nsec,
- cur->inter.tv_sec, cur->inter.tv_nsec);
+ (long)cur->due.tv_sec, cur->due.tv_nsec,
+ (long)cur->inter.tv_sec, cur->inter.tv_nsec);
}
static void
diff --git a/contrib/bind/lib/isc/ev_waits.c b/contrib/bind/lib/isc/ev_waits.c
index 9608424..8d9fa8d 100644
--- a/contrib/bind/lib/isc/ev_waits.c
+++ b/contrib/bind/lib/isc/ev_waits.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_waits.c,v 8.11 2000/07/20 18:17:52 vixie Exp $";
+static const char rcsid[] = "$Id: ev_waits.c,v 8.12 2002/07/08 05:50:10 marka Exp $";
#endif
#include "port_before.h"
@@ -190,14 +190,14 @@ print_waits(evContext_p *ctx) {
evPrintf(ctx, 9, "wait waiting:\n");
for (wl = ctx->waitLists; wl != NULL; wl = wl->next) {
INSIST(wl->first != NULL);
- evPrintf(ctx, 9, " tag %#x:", wl->first->tag);
+ evPrintf(ctx, 9, " tag %p:", wl->first->tag);
for (this = wl->first; this != NULL; this = this->next)
- evPrintf(ctx, 9, " %#x", this);
+ evPrintf(ctx, 9, " %p", this);
evPrintf(ctx, 9, "\n");
}
evPrintf(ctx, 9, "wait done:");
for (this = ctx->waitDone.first; this != NULL; this = this->next)
- evPrintf(ctx, 9, " %#x", this);
+ evPrintf(ctx, 9, " %p", this);
evPrintf(ctx, 9, "\n");
}
diff --git a/contrib/bind/lib/isc/eventlib.c b/contrib/bind/lib/isc/eventlib.c
index 0e52733..c7b1272 100644
--- a/contrib/bind/lib/isc/eventlib.c
+++ b/contrib/bind/lib/isc/eventlib.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: eventlib.c,v 1.46 2001/11/01 05:35:48 marka Exp $";
+static const char rcsid[] = "$Id: eventlib.c,v 1.48 2002/07/17 07:37:34 marka Exp $";
#endif
#include "port_before.h"
@@ -291,12 +291,12 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) {
}
evPrintf(ctx, 4,
- "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n",
+ "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %ld.%09ld)\n",
ctx->fdMax+1,
(u_long)ctx->rdLast.fds_bits[0],
(u_long)ctx->wrLast.fds_bits[0],
(u_long)ctx->exLast.fds_bits[0],
- tp ? tp->tv_sec : -1,
+ tp ? (long)tp->tv_sec : -1L,
tp ? tp->tv_nsec : -1);
/* XXX should predict system's earliness and adjust. */
@@ -463,7 +463,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
evAccept *this = ev->u.accept.this;
evPrintf(ctx, 5,
- "Dispatch.Accept: fd %d -> %d, func %#x, uap %#x\n",
+ "Dispatch.Accept: fd %d -> %d, func %p, uap %p\n",
this->conn->fd, this->fd,
this->conn->func, this->conn->uap);
errno = this->ioErrno;
@@ -480,7 +480,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
int eventmask = ev->u.file.eventmask;
evPrintf(ctx, 5,
- "Dispatch.File: fd %d, mask 0x%x, func %#x, uap %#x\n",
+ "Dispatch.File: fd %d, mask 0x%x, func %p, uap %p\n",
this->fd, this->eventmask, this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->fd, eventmask);
#ifdef EVENTLIB_TIME_CHECKS
@@ -492,7 +492,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
evStream *this = ev->u.stream.this;
evPrintf(ctx, 5,
- "Dispatch.Stream: fd %d, func %#x, uap %#x\n",
+ "Dispatch.Stream: fd %d, func %p, uap %p\n",
this->fd, this->func, this->uap);
errno = this->ioErrno;
(this->func)(opaqueCtx, this->uap, this->fd, this->ioDone);
@@ -504,7 +504,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
case Timer: {
evTimer *this = ev->u.timer.this;
- evPrintf(ctx, 5, "Dispatch.Timer: func %#x, uap %#x\n",
+ evPrintf(ctx, 5, "Dispatch.Timer: func %p, uap %p\n",
this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->due, this->inter);
#ifdef EVENTLIB_TIME_CHECKS
@@ -516,7 +516,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
evWait *this = ev->u.wait.this;
evPrintf(ctx, 5,
- "Dispatch.Wait: tag %#x, func %#x, uap %#x\n",
+ "Dispatch.Wait: tag %p, func %p, uap %p\n",
this->tag, this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->tag);
#ifdef EVENTLIB_TIME_CHECKS
diff --git a/contrib/bind/lib/isc/eventlib_p.h b/contrib/bind/lib/isc/eventlib_p.h
index 78f0100..71b95ed 100644
--- a/contrib/bind/lib/isc/eventlib_p.h
+++ b/contrib/bind/lib/isc/eventlib_p.h
@@ -18,7 +18,7 @@
/* eventlib_p.h - private interfaces for eventlib
* vix 09sep95 [initial]
*
- * $Id: eventlib_p.h,v 1.30 2001/11/01 05:35:50 marka Exp $
+ * $Id: eventlib_p.h,v 1.31 2003/04/03 05:37:56 marka Exp $
*/
#ifndef _EVENTLIB_P_H
@@ -198,7 +198,8 @@ typedef struct {
/* eventlib.c */
#define evPrintf __evPrintf
-void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...);
+void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...)
+ ISC_FORMAT_PRINTF(3, 4);
/* ev_timers.c */
#define evCreateTimers __evCreateTimers
diff --git a/contrib/bind/lib/isc/logging.c b/contrib/bind/lib/isc/logging.c
index ca7ea04..f0a4940 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.31 2001/06/18 14:44:03 marka Exp $";
+static const char rcsid[] = "$Id: logging.c,v 8.32 2003/01/02 00:35:42 marka Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -282,6 +282,10 @@ log_vwrite(log_context lc, int category, int level, const char *format,
log_channel chan;
struct timeval tv;
struct tm *local_tm;
+#ifdef HAVE_TIME_R
+ struct tm tm_tmp;
+#endif
+ time_t tt;
const char *category_name;
const char *level_str;
char time_buf[256];
@@ -313,10 +317,11 @@ log_vwrite(log_context lc, int category, int level, const char *format,
if (gettimeofday(&tv, NULL) < 0) {
syslog(LOG_INFO, "gettimeofday failed in log_vwrite()");
} else {
+ tt = tv.tv_sec;
#ifdef HAVE_TIME_R
- localtime_r((time_t *)&tv.tv_sec, &local_tm);
+ local_tm = localtime_r(&tt, &tm_tmp);
#else
- local_tm = localtime((time_t *)&tv.tv_sec);
+ local_tm = localtime(&tt);
#endif
if (local_tm != NULL) {
sprintf(time_buf, "%02d-%s-%4d %02d:%02d:%02d.%03ld ",
OpenPOWER on IntegriCloud