summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-25 13:54:02 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-25 13:54:02 +0000
commit5a31cfc885df790d9d3fdb61551e08d2091a604b (patch)
tree4e4801e79bf775f4cdbe50a008db1581ed88e192
parentcb7bc8db562050e7db524bc02342b6dbb666b72c (diff)
* eval.c (rb_thread_schedule): mswin32 doesn't have F_GETFD, so check
with another method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--eval.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c50120a313..af4e697bf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 25 22:53:04 2009 NAKAMURA Usaku <[email protected]>
+
+ * eval.c (rb_thread_schedule): mswin32 doesn't have F_GETFD, so check
+ with another method.
+
Tue Feb 24 19:01:05 2009 Nobuyoshi Nakada <[email protected]>
* common.mk (main): split from exts and makes main program after
diff --git a/eval.c b/eval.c
index 7092e61865..a06974657f 100644
--- a/eval.c
+++ b/eval.c
@@ -11193,7 +11193,11 @@ rb_thread_schedule()
if ((FD_ISSET(fd, &readfds) ||
FD_ISSET(fd, &writefds) ||
FD_ISSET(fd, &exceptfds)) &&
+#ifndef _WIN32
fcntl(fd, F_GETFD, &dummy) == -1 &&
+#else
+ rb_w32_get_osfhandle(fd) == -1 &&
+#endif
errno == EBADF) {
badfd = fd;
break;