From d99aa273a662a461f632a019f02704e36e35e017 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 6 Jan 2006 21:28:54 +0000 Subject: * eval.c (rb_fd_isset): compare the result of FD_ISSET with 0 to avoid BSD bug. BSD defines FD_ISSET as just a bitmap of unsigned long. So returning the value from rb_fd_isset discards upper 32bits on LP64 environment. http://www.freebsd.org/cgi/query-pr.cgi?pr=ia64/91421 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 61f38e56f..4705e06d2 100644 --- a/eval.c +++ b/eval.c @@ -9644,7 +9644,7 @@ rb_fd_isset(n, fds) const rb_fdset_t *fds; { if (n >= fds->maxfd) return 0; - return FD_ISSET(n, fds->fdset); + return FD_ISSET(n, fds->fdset) != 0; /* "!= 0" avoids BSD bug */ } void -- cgit