summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-08 11:12:27 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-08 11:16:13 -0700
commitb21c6c52bb8109329d7eb63072f8ebf41a42a7f9 (patch)
tree8515f26885441cf50cb666f4bd1d6af43a9da973
parente63977f320b8678d66bb061b9502dc0764a5427f (diff)
Use __XFDS_BITS macros from Xpoll.h instead of direct __fds_bits access
Different platforms use different names for the fd_set members, so use the existing Xpoll.h macros for greater portability. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--fd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fd.c b/fd.c
index 97ae6f0..b616193 100644
--- a/fd.c
+++ b/fd.c
@@ -423,7 +423,11 @@ MainLoop(void)
/* wfds = ReadDescriptors & WriteDescriptors; */
XFD_ANDSET(&wfds, &ReadDescriptors, &WriteDescriptors);
- debug(128,(stderr, "select %d, rfds = %#lx, wfds = %#lx, RD=%#lx, BRD=%#lx, WD=%#lx\n", HighestFD + 1, rfds.__fds_bits[0], wfds.__fds_bits[0], ReadDescriptors.__fds_bits[0], BlockedReadDescriptors.__fds_bits[0], WriteDescriptors.__fds_bits[0]));
+ debug(128,(stderr, "select %d, rfds = %#lx, wfds = %#lx, RD=%#lx, BRD=%#lx, WD=%#lx\n",
+ HighestFD + 1, __XFDS_BITS(&rfds, 0), __XFDS_BITS(&wfds, 0),
+ __XFDS_BITS(&ReadDescriptors, 0),
+ __XFDS_BITS(&BlockedReadDescriptors, 0),
+ __XFDS_BITS(&WriteDescriptors, 0)));
if (Interrupt || (!XFD_ANYSET(&rfds) && !XFD_ANYSET(&wfds)))
{
@@ -433,7 +437,8 @@ MainLoop(void)
}
nfds = select(HighestFD + 1, &rfds, &wfds, &xfds, (struct timeval *)NULL);
debug(128,(stderr, "select nfds = %d, rfds = %#lx, wfds = %#lx, xfds = %#lx\n",
- nfds, rfds.__fds_bits[0], wfds.__fds_bits[0], xfds.__fds_bits[0]));
+ nfds, __XFDS_BITS(&rfds, 0), __XFDS_BITS(&wfds, 0),
+ __XFDS_BITS(&xfds, 0)));
if (nfds < 0)
{