aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--eval.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bb1dea3cc3..afacc5cdf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/eval.c b/eval.c
index 61f38e56f9..4705e06d25 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