diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-06 21:28:54 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-06 21:28:54 +0000 |
commit | 199ef57934de0fd0bf2d1682df8714f85b65dfcc (patch) | |
tree | d35685e9c9e91e3254d9e6a26bde78d289e8d185 /eval.c | |
parent | 969519f1649c8dec38c6e3ea0fc63e7bd0d175fd (diff) |
* 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
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |