aix namespace collision ERR -> EV_ERRR

This commit is contained in:
Mark Andrews 2001-06-27 03:55:48 +00:00
parent 07c336a9a8
commit b6f0efbf3e
4 changed files with 16 additions and 16 deletions

View file

@ -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)

View file

@ -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;

View file

@ -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;

View file

@ -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 <isc/memcluster.h>
#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); \