]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] use 'is_set' instead of 'isset' in struct poller
authorWilly Tarreau <w@1wt.eu>
Mon, 9 Apr 2007 13:34:49 +0000 (15:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Apr 2007 13:34:49 +0000 (15:34 +0200)
'isset' was defined as a macro in /usr/include/sys/param.h, and
it breaks build on at least OpenBSD.

include/proto/fd.h
include/types/fd.h
src/ev_epoll.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c

index be5261248e61d95babd1842e4aa56cdc73ad95f1..9b4c63279098375bd0d7882febc4621819df14c7 100644 (file)
@@ -53,7 +53,7 @@ void run_poller();
 
 #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))
index 2128cb9b222b51cb71a9ecdc5d0ef3cf5637d900..68335c033c878be60af5d9846b940b359699c656 100644 (file)
@@ -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 fdtab {
  */
 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 */
index 482ddc06ddd29838b0e42846a28c09e383f108d8..6931a0c5d56fc56dde3c508d12850b28905f89fb 100644 (file)
@@ -49,7 +49,7 @@ static int epoll_fd;
  * 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 @@ int epoll_register(struct poller *p)
        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;
index b3510f3a535f71357a2425293d00eec693dd7885..39845884cb50660a59d9ed806c6da04333c2acdc 100644 (file)
@@ -54,7 +54,7 @@ REGPRM3 static int kqev_del(struct kevent *kev, const int fd, const int dir)
 /*
  * 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 @@ int kqueue_register(struct poller *p)
        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;
index 235772d134a550234905dae7d48db45dad9bd4ed..06adeb42de4240ec48026f43b54293b483f3204f 100644 (file)
@@ -37,7 +37,7 @@ static struct pollfd *poll_events = NULL;
  * 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 @@ int poll_register(struct poller *p)
        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;
index dc43b5e354bfbea8be9f3f4e72c2013b0eb16131..c5dbedf25a3cedc3ff1224dc940e1bcd90a1f9df 100644 (file)
@@ -34,7 +34,7 @@ static fd_set *tmp_evts[2];
  * 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 @@ int select_register(struct poller *p)
        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;