* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@9802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2006-01-06 21:28:54 +00:00
Родитель 969519f164
Коммит 199ef57934
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,11 @@
Sat Jan 7 06:24:18 2006 Tanaka Akira <akr@m17n.org>
* 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
Fri Jan 6 02:20:18 2006 Tanaka Akira <akr@m17n.org>
* configure.in: don't force getcontext on IA64.

2
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