summaryrefslogtreecommitdiff
path: root/poll
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-07-11 14:39:04 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-07-11 14:39:04 +0000
commit8881970ff87866e165a720f22affd678ff3d84ef (patch)
treefbe4fb95c0b472cab9b1d905adc26b70b448a0c6 /poll
parent126596617194a948a1254be6bbaae0da0eb333e6 (diff)
downloadlibapr-8881970ff87866e165a720f22affd678ff3d84ef.tar.gz
get the new poll code to build on AIX, which for 32-bit builds has some
extremely unfortunate macros in <sys/poll.h> that play with "events" and "revents" via #define git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63610 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r--poll/unix/poll.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index b69dda9d9..2b7480eda 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -101,7 +101,7 @@ APR_DECLARE(apr_status_t) apr_poll_socket_add(apr_pollfd_t *aprset,
}
curr->desc.s = sock;
curr->desc_type = APR_POLL_SOCKET;
- curr->events = event;
+ curr->reqevents = event;
return APR_SUCCESS;
}
@@ -125,8 +125,8 @@ APR_DECLARE(apr_status_t) apr_poll_socket_mask(apr_pollfd_t *aprset,
return APR_NOTFOUND;
}
- if (curr->events & events) {
- curr->events ^= events;
+ if (curr->reqevents & events) {
+ curr->reqevents ^= events;
}
return APR_SUCCESS;
@@ -272,13 +272,13 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
else if (aprset[i].desc_type == APR_POLL_FILE) {
fd = aprset[i].desc.f->filedes;
}
- if (aprset[i].events & APR_POLLIN) {
+ if (aprset[i].reqevents & APR_POLLIN) {
FD_SET(fd, &readset);
}
- if (aprset[i].events & APR_POLLOUT) {
+ if (aprset[i].reqevents & APR_POLLOUT) {
FD_SET(fd, &writeset);
}
- if (aprset[i].events &
+ if (aprset[i].reqevents &
(APR_POLLPRI | APR_POLLERR | APR_POLLHUP | APR_POLLNVAL)) {
FD_SET(fd, &exceptset);
}
@@ -306,15 +306,15 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
else if (aprset[i].desc_type == APR_POLL_FILE) {
fd = aprset[i].desc.f->filedes;
}
- aprset[i].revents = 0;
+ aprset[i].rtnevents = 0;
if (FD_ISSET(fd, &readset)) {
- aprset[i].revents |= APR_POLLIN;
+ aprset[i].rtnevents |= APR_POLLIN;
}
if (FD_ISSET(fd, &writeset)) {
- aprset[i].revents |= APR_POLLOUT;
+ aprset[i].rtnevents |= APR_POLLOUT;
}
if (FD_ISSET(fd, &exceptset)) {
- aprset[i].revents |= APR_POLLERR;
+ aprset[i].rtnevents |= APR_POLLERR;
}
}