[MINOR] use 'is_set' instead of 'isset' in struct poller
'isset' was defined as a macro in /usr/include/sys/param.h, and
it breaks build on at least OpenBSD.
diff --git a/include/proto/fd.h b/include/proto/fd.h
index be52612..9b4c632 100644
--- a/include/proto/fd.h
+++ b/include/proto/fd.h
@@ -53,7 +53,7 @@
#define EV_FD_SET(fd, ev) (cur_poller.set((fd), (ev)))
#define EV_FD_CLR(fd, ev) (cur_poller.clr((fd), (ev)))
-#define EV_FD_ISSET(fd, ev) (cur_poller.isset((fd), (ev)))
+#define EV_FD_ISSET(fd, ev) (cur_poller.is_set((fd), (ev)))
#define EV_FD_COND_S(fd, ev) (cur_poller.cond_s((fd), (ev)))
#define EV_FD_COND_C(fd, ev) (cur_poller.cond_c((fd), (ev)))
#define EV_FD_REM(fd) (cur_poller.rem(fd))
diff --git a/include/types/fd.h b/include/types/fd.h
index 2128cb9..68335c0 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -2,7 +2,7 @@
include/types/fd.h
File descriptors states.
- Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
+ Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -73,7 +73,7 @@
*/
struct poller {
void *private; /* any private data for the poller */
- REGPRM2 int (*isset)(const int fd, int dir); /* check if <fd> is being polled for dir <dir> */
+ REGPRM2 int (*is_set)(const int fd, int dir); /* check if <fd> is being polled for dir <dir> */
REGPRM2 int (*set)(const int fd, int dir); /* set polling on <fd> for <dir> */
REGPRM2 int (*clr)(const int fd, int dir); /* clear polling on <fd> for <dir> */
REGPRM2 int (*cond_s)(const int fd, int dir); /* set polling on <fd> for <dir> if unset */
diff --git a/src/ev_epoll.c b/src/ev_epoll.c
index 482ddc0..6931a0c 100644
--- a/src/ev_epoll.c
+++ b/src/ev_epoll.c
@@ -49,7 +49,7 @@
* instead of the usual macros improve the FD_* performance by about 80%,
* and that marking them regparm(2) adds another 20%.
*/
-REGPRM2 static int __fd_isset(const int fd, int dir)
+REGPRM2 static int __fd_is_set(const int fd, int dir)
{
return FD_ISSET(fd, fd_evts[dir]);
}
@@ -308,7 +308,7 @@
p->init = epoll_init;
p->term = epoll_term;
p->poll = epoll_poll;
- p->isset = __fd_isset;
+ p->is_set = __fd_is_set;
p->set = __fd_set;
p->clr = __fd_clr;
p->rem = __fd_rem;
diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c
index b3510f3..3984588 100644
--- a/src/ev_kqueue.c
+++ b/src/ev_kqueue.c
@@ -54,7 +54,7 @@
/*
* Returns non-zero if direction <dir> is already set for <fd>.
*/
-REGPRM2 static int __fd_isset(const int fd, int dir)
+REGPRM2 static int __fd_is_set(const int fd, int dir)
{
return FD_ISSET(fd, fd_evts[dir]);
}
@@ -220,7 +220,7 @@
p->term = kqueue_term;
p->poll = kqueue_poll;
- p->isset = __fd_isset;
+ p->is_set = __fd_is_set;
p->cond_s = p->set = __fd_set;
p->cond_c = p->clr = __fd_clr;
p->clo = p->rem = __fd_rem;
diff --git a/src/ev_poll.c b/src/ev_poll.c
index 235772d..06adeb4 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -37,7 +37,7 @@
* instead of the usual macros improve the FD_* performance by about 80%,
* and that marking them regparm(2) adds another 20%.
*/
-REGPRM2 static int __fd_isset(const int fd, int dir)
+REGPRM2 static int __fd_is_set(const int fd, int dir)
{
return FD_ISSET(fd, fd_evts[dir]);
}
@@ -216,7 +216,7 @@
p->init = poll_init;
p->term = poll_term;
p->poll = poll_poll;
- p->isset = __fd_isset;
+ p->is_set = __fd_is_set;
p->set = __fd_set;
p->clr = __fd_clr;
p->clo = p->rem = __fd_rem;
diff --git a/src/ev_select.c b/src/ev_select.c
index dc43b5e..c5dbedf 100644
--- a/src/ev_select.c
+++ b/src/ev_select.c
@@ -34,7 +34,7 @@
* instead of the usual macros improve the FD_* performance by about 80%,
* and that marking them regparm(2) adds another 20%.
*/
-REGPRM2 static int __fd_isset(const int fd, int dir)
+REGPRM2 static int __fd_is_set(const int fd, int dir)
{
return FD_ISSET(fd, fd_evts[dir]);
}
@@ -216,7 +216,7 @@
p->init = select_init;
p->term = select_term;
p->poll = select_poll;
- p->isset = __fd_isset;
+ p->is_set = __fd_is_set;
p->set = __fd_set;
p->clr = __fd_clr;
p->clo = p->rem = __fd_rem;