diff options
Diffstat (limited to 'contrib/bind/lib/isc')
-rw-r--r-- | contrib/bind/lib/isc/ctl_clnt.c | 4 | ||||
-rw-r--r-- | contrib/bind/lib/isc/ctl_srvr.c | 4 | ||||
-rw-r--r-- | contrib/bind/lib/isc/ev_files.c | 4 | ||||
-rw-r--r-- | contrib/bind/lib/isc/ev_timers.c | 14 | ||||
-rw-r--r-- | contrib/bind/lib/isc/ev_waits.c | 8 | ||||
-rw-r--r-- | contrib/bind/lib/isc/eventlib.c | 16 | ||||
-rw-r--r-- | contrib/bind/lib/isc/eventlib_p.h | 5 | ||||
-rw-r--r-- | contrib/bind/lib/isc/logging.c | 11 |
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 56e50981dfb8..13d71d5e078b 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 91a2c1b0eede..835bcd4a0c27 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 c6bcab675614..3a6894be1e45 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 03436c601cae..0f3c56f1982c 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 9608424014f5..8d9fa8d4e6c3 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 0e527336ee07..c7b1272134af 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 78f010016f7e..71b95eda9ff8 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 ca7ea04c0bcf..f0a4940a1184 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 ", |