summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-22 09:00:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-22 09:00:23 +0000
commite6bf7809f399b4602c9b3a2aa4761da0e336fb83 (patch)
treea423ef967d835ff2af929f5912a7c4b66f96166e
parent7f16734d2722ae0a33125bac9c9de5a90dba3e83 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--bignum.c19
-rw-r--r--lib/cgi.rb2
-rw-r--r--win32/Makefile.sub3
-rw-r--r--win32/win32.c5
5 files changed, 25 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b1875b1dd..8c21a41275 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,15 @@
-Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Dec 22 17:59:30 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* stable version 1.6.2 released.
+Fri Dec 22 17:04:12 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+
+ * win32/win32.c (myselect): avoid busy loop by adjusting fd_count.
+
+Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * bignum.c (rb_cstr2inum): prefix like '0x' had removed too much.
+
Thu Dec 21 13:01:46 2000 Tanaka Akira <akr@m17n.org>
* lib/net/ftp.rb (makeport): don't use TCPsocket.getaddress.
diff --git a/bignum.c b/bignum.c
index 8a47a449e6..1e847dd7af 100644
--- a/bignum.c
+++ b/bignum.c
@@ -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;