aboutsummaryrefslogtreecommitdiffstats
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.sub3
-rw-r--r--win32/win32.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 403f5453b1..227ab68b18 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -102,7 +102,7 @@ OBJS = array.obj \
all: miniruby$(EXEEXT) rbconfig.rb ext/extmk.rb \
$(LIBRUBY) $(MISCLIBS)
- set LIB=../../win32;$(ORGLIBPATH)
+ set LIB=../..;$(ORGLIBPATH)
@.\miniruby$(EXEEXT) -Cext extmk.rb
ruby: $(PROGRAM)
@@ -195,7 +195,6 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(LIBRUBY_SO).rc: rbconfig.rb
$(CC) $(CFLAGS) -I. -I$(<D) $(CPPFLAGS) -c $(<:/=\)
.c.obj:
$(CC) $(CFLAGS) -I. $(CPPFLAGS) -c $(<:/=\)
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
.rc.res:
$(RC) -I. -I$(<D) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $<
diff --git a/win32/win32.c b/win32/win32.c
index 22f3af9ed9..bd07bb644e 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1974,6 +1974,11 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
if (!NtSocketsInitialized++) {
StartSockets();
}
+ r = 0;
+ if (rd && rd->fd_count > r) r = rd->fd_count;
+ if (wr && wr->fd_count > r) r = wr->fd_count;
+ if (ex && ex->fd_count > r) r = ex->fd_count;
+ if (nfds > r) nfds = r;
if (nfds == 0 && timeout) {
Sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
return 0;