diff --git a/lib/bind/isc/ev_files.c b/lib/bind/isc/ev_files.c index a6c13eea9d..26f9205f2e 100644 --- a/lib/bind/isc/ev_files.c +++ b/lib/bind/isc/ev_files.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_files.c,v 1.1 2001/03/29 06:31:54 marka Exp $"; +static const char rcsid[] = "$Id: ev_files.c,v 1.2 2001/06/27 03:55:45 marka Exp $"; #endif #include "port_before.h" @@ -56,9 +56,9 @@ evSelectFD(evContext opaqueCtx, "evSelectFD(ctx %#x, fd %d, mask 0x%x, func %#x, uap %#x)\n", ctx, fd, eventmask, func, uap); if (eventmask == 0 || (eventmask & ~EV_MASK_ALL) != 0) - ERR(EINVAL); + EV_ERR(EINVAL); if (fd > ctx->highestFD) - ERR(EINVAL); + EV_ERR(EINVAL); OK(mode = fcntl(fd, F_GETFL, NULL)); /* side effect: validate fd. */ /* @@ -84,7 +84,7 @@ evSelectFD(evContext opaqueCtx, * same context. */ if (id != NULL && FindFD(ctx, fd, eventmask) != NULL) - ERR(ETOOMANYREFS); + EV_ERR(ETOOMANYREFS); /* Allocate and fill. */ OKNEW(id); @@ -166,7 +166,7 @@ evDeselectFD(evContext opaqueCtx, evFileID opaqueID) { /* Get the mode. Unless the file has been closed, errors are bad. */ mode = fcntl(del->fd, F_GETFL, NULL); if (mode == -1 && errno != EBADF) - ERR(errno); + EV_ERR(errno); /* Remove from the list of files. */ if (del->prev != NULL) diff --git a/lib/bind/isc/ev_timers.c b/lib/bind/isc/ev_timers.c index ce573b287a..0a59ad1e5b 100644 --- a/lib/bind/isc/ev_timers.c +++ b/lib/bind/isc/ev_timers.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_timers.c,v 1.1 2001/03/29 06:31:54 marka Exp $"; +static const char rcsid[] = "$Id: ev_timers.c,v 1.2 2001/06/27 03:55:46 marka Exp $"; #endif /* Import. */ @@ -201,7 +201,7 @@ evClearTimer(evContext opaqueCtx, evTimerID id) { } if (heap_element(ctx->timers, del->index) != del) - ERR(ENOENT); + EV_ERR(ENOENT); if (heap_delete(ctx->timers, del->index) < 0) return (-1); @@ -229,7 +229,7 @@ evResetTimer(evContext opaqueCtx, int result=0; if (heap_element(ctx->timers, timer->index) != timer) - ERR(ENOENT); + EV_ERR(ENOENT); old_due = timer->due; diff --git a/lib/bind/isc/eventlib.c b/lib/bind/isc/eventlib.c index 22ea951376..96337e387f 100644 --- a/lib/bind/isc/eventlib.c +++ b/lib/bind/isc/eventlib.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: eventlib.c,v 1.1 2001/03/29 06:31:54 marka Exp $"; +static const char rcsid[] = "$Id: eventlib.c,v 1.2 2001/06/27 03:55:47 marka Exp $"; #endif #include "port_before.h" @@ -193,7 +193,7 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) { /* Ensure that exactly one of EV_POLL or EV_WAIT was specified. */ x = ((options & EV_POLL) != 0) + ((options & EV_WAIT) != 0); if (x != 1) - ERR(EINVAL); + EV_ERR(EINVAL); /* Get the time of day. We'll do this again after select() blocks. */ ctx->lastEventTime = evNowTime(); @@ -248,7 +248,7 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) { /* Are there any events at all? */ if ((options & EV_WAIT) != 0 && !nextTimer && ctx->fdMax == -1) - ERR(ENOENT); + EV_ERR(ENOENT); /* Figure out what select()'s timeout parameter should be. */ if ((options & EV_POLL) != 0) { @@ -343,11 +343,11 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) { } abort(); } - ERR(pselect_errno); + EV_ERR(pselect_errno); } if (x == 0 && (nextTimer == NULL || !timerPast) && (options & EV_POLL)) - ERR(EWOULDBLOCK); + EV_ERR(EWOULDBLOCK); ctx->fdCount = x; #ifdef EVENTLIB_TIME_CHECKS ctx->lastFdCount = x; diff --git a/lib/bind/isc/eventlib_p.h b/lib/bind/isc/eventlib_p.h index e70eb7bda7..cdf2c8d8c6 100644 --- a/lib/bind/isc/eventlib_p.h +++ b/lib/bind/isc/eventlib_p.h @@ -18,7 +18,7 @@ /* eventlib_p.h - private interfaces for eventlib * vix 09sep95 [initial] * - * $Id: eventlib_p.h,v 1.1 2001/03/29 06:31:54 marka Exp $ + * $Id: eventlib_p.h,v 1.2 2001/06/27 03:55:48 marka Exp $ */ #ifndef _EVENTLIB_P_H @@ -43,8 +43,8 @@ #include #define EV_MASK_ALL (EV_READ | EV_WRITE | EV_EXCEPT) -#define ERR(e) return (errno = (e), -1) -#define OK(x) if ((x) < 0) ERR(errno); else (void)NULL +#define EV_ERR(e) return (errno = (e), -1) +#define OK(x) if ((x) < 0) EV_ERR(errno); else (void)NULL #define NEW(p) if (((p) = memget(sizeof *(p))) != NULL) \ FILL(p); \