diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-22 09:00:23 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-22 09:00:23 +0000 |
commit | e6bf7809f399b4602c9b3a2aa4761da0e336fb83 (patch) | |
tree | a423ef967d835ff2af929f5912a7c4b66f96166e | |
parent | 7f16734d2722ae0a33125bac9c9de5a90dba3e83 (diff) |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | bignum.c | 19 | ||||
-rw-r--r-- | lib/cgi.rb | 2 | ||||
-rw-r--r-- | win32/Makefile.sub | 3 | ||||
-rw-r--r-- | win32/win32.c | 5 |
5 files changed, 25 insertions, 14 deletions
@@ -1,7 +1,15 @@ -Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto <[email protected]> +Fri Dec 22 17:59:30 2000 Yukihiro Matsumoto <[email protected]> * stable version 1.6.2 released. +Fri Dec 22 17:04:12 2000 Nobuyoshi Nakada <[email protected]> + + * win32/win32.c (myselect): avoid busy loop by adjusting fd_count. + +Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto <[email protected]> + + * bignum.c (rb_cstr2inum): prefix like '0x' had removed too much. + Thu Dec 21 13:01:46 2000 Tanaka Akira <[email protected]> * lib/net/ftp.rb (makeport): don't use TCPsocket.getaddress. @@ -202,32 +202,31 @@ rb_cstr2inum(str, base) while (*str && ISSPACE(*str)) str++; - if (*str == '+') { + if (str[0] == '+') { str++; } - else if (*str == '-') { + else if (str[0] == '-') { str++; sign = 0; } if (base == 0) { - if (*str == '0') { - str++; - if (*str == 'x' || *str == 'X') { - str++; + if (str[0] == '0') { + if (str[1] == 'x' || str[1] == 'X') { base = 16; } - else if (*str == 'b' || *str == 'B') { - str++; + else if (str[1] == 'b' || str[1] == 'B') { base = 2; } else { base = 8; - if (!*str) return INT2FIX(0); + if (!str[1]) return INT2FIX(0); } } + else if (str[0] == 0) { + return INT2FIX(0); + } else { base = 10; - if (!*str) return INT2FIX(0); } } if (base == 8) { diff --git a/lib/cgi.rb b/lib/cgi.rb index ed8a91d351..f850095138 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -828,7 +828,7 @@ convert string charset, and set language to "ja". eval <<-END def body.original_filename #{ - filename = (Regexp::last_match[1] or "").dup + filename = ($1 or "").dup if (/Mac/ni === env_table['HTTP_USER_AGENT']) and (/Mozilla/ni === env_table['HTTP_USER_AGENT']) and (not /MSIE/ni === env_table['HTTP_USER_AGENT']) 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; |