Skip to content

Commit e6bf780

Browse files
author
matz
committed
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 7f16734 commit e6bf780

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

ChangeLog

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto <[email protected]>
1+
Fri Dec 22 17:59:30 2000 Yukihiro Matsumoto <[email protected]>
22

33
* stable version 1.6.2 released.
44

5+
Fri Dec 22 17:04:12 2000 Nobuyoshi Nakada <[email protected]>
6+
7+
* win32/win32.c (myselect): avoid busy loop by adjusting fd_count.
8+
9+
Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto <[email protected]>
10+
11+
* bignum.c (rb_cstr2inum): prefix like '0x' had removed too much.
12+
513
Thu Dec 21 13:01:46 2000 Tanaka Akira <[email protected]>
614

715
* lib/net/ftp.rb (makeport): don't use TCPsocket.getaddress.

bignum.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,32 +202,31 @@ rb_cstr2inum(str, base)
202202

203203
while (*str && ISSPACE(*str)) str++;
204204

205-
if (*str == '+') {
205+
if (str[0] == '+') {
206206
str++;
207207
}
208-
else if (*str == '-') {
208+
else if (str[0] == '-') {
209209
str++;
210210
sign = 0;
211211
}
212212
if (base == 0) {
213-
if (*str == '0') {
214-
str++;
215-
if (*str == 'x' || *str == 'X') {
216-
str++;
213+
if (str[0] == '0') {
214+
if (str[1] == 'x' || str[1] == 'X') {
217215
base = 16;
218216
}
219-
else if (*str == 'b' || *str == 'B') {
220-
str++;
217+
else if (str[1] == 'b' || str[1] == 'B') {
221218
base = 2;
222219
}
223220
else {
224221
base = 8;
225-
if (!*str) return INT2FIX(0);
222+
if (!str[1]) return INT2FIX(0);
226223
}
227224
}
225+
else if (str[0] == 0) {
226+
return INT2FIX(0);
227+
}
228228
else {
229229
base = 10;
230-
if (!*str) return INT2FIX(0);
231230
}
232231
}
233232
if (base == 8) {

lib/cgi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ def body.local_path
828828
eval <<-END
829829
def body.original_filename
830830
#{
831-
filename = (Regexp::last_match[1] or "").dup
831+
filename = ($1 or "").dup
832832
if (/Mac/ni === env_table['HTTP_USER_AGENT']) and
833833
(/Mozilla/ni === env_table['HTTP_USER_AGENT']) and
834834
(not /MSIE/ni === env_table['HTTP_USER_AGENT'])

win32/Makefile.sub

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ OBJS = array.obj \
102102

103103
all: miniruby$(EXEEXT) rbconfig.rb ext/extmk.rb \
104104
$(LIBRUBY) $(MISCLIBS)
105-
set LIB=../../win32;$(ORGLIBPATH)
105+
set LIB=../..;$(ORGLIBPATH)
106106
@.\miniruby$(EXEEXT) -Cext extmk.rb
107107

108108
ruby: $(PROGRAM)
@@ -195,7 +195,6 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(LIBRUBY_SO).rc: rbconfig.rb
195195
$(CC) $(CFLAGS) -I. -I$(<D) $(CPPFLAGS) -c $(<:/=\)
196196
.c.obj:
197197
$(CC) $(CFLAGS) -I. $(CPPFLAGS) -c $(<:/=\)
198-
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
199198

200199
.rc.res:
201200
$(RC) -I. -I$(<D) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $<

win32/win32.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,11 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
19741974
if (!NtSocketsInitialized++) {
19751975
StartSockets();
19761976
}
1977+
r = 0;
1978+
if (rd && rd->fd_count > r) r = rd->fd_count;
1979+
if (wr && wr->fd_count > r) r = wr->fd_count;
1980+
if (ex && ex->fd_count > r) r = ex->fd_count;
1981+
if (nfds > r) nfds = r;
19771982
if (nfds == 0 && timeout) {
19781983
Sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
19791984
return 0;

0 commit comments

Comments
 (0)