[#23677] linux-gnu — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
15 messages
2004/06/10
[#23679] Re: linux-gnu
— "Akinori MUSHA" <knu@...>
2004/06/10
At Thu, 10 Jun 2004 23:24:04 +0900,
[#23680] Re: linux-gnu
— akira yamada / やまだあきら <akira@...>
2004/06/10
[#23681] Re: linux-gnu
— "Akinori MUSHA" <knu@...>
2004/06/11
At Fri, 11 Jun 2004 04:38:00 +0900,
[#23682] Re: linux-gnu
— matz@... (Yukihiro Matsumoto)
2004/06/11
まつもと ゆきひろです
[#23683] Re: linux-gnu
— WATANABE Hirofumi <eban@...>
2004/06/11
わたなべです。
[#23690] singleton class inherits the object's class. — nobu.nakada@...
なかだです。
2 messages
2004/06/15
[#23693] Shell.Application on WIN32OLE — Masahiro Kitajima <katonbo@...>
かとんぼです。
7 messages
2004/06/16
[#23694] WIN32OLEの日本語エラーメッセージが切り詰められる — Masahiro Kitajima <katonbo@...>
かとんぼです。
5 messages
2004/06/16
[#23697] define_method and $SAFE — nobu.nakada@...
なかだです。
9 messages
2004/06/16
[#23705] Re: define_method and $SAFE
— matz@... (Yukihiro Matsumoto)
2004/06/17
まつもと ゆきひろです
[#23706] Re: define_method and $SAFE
— nobu.nakada@...
2004/06/17
なかだです。
[#23700] Oniguruma segfaults on matching at long line? — nobu.nakada@...
なかだです。
1 message
2004/06/16
[#23704] [mswin32] printf の NaN, Inf 表示 — Masahiro Kitajima <katonbo@...>
かとんぼです。
5 messages
2004/06/17
[#23717] error at TestDRbMServer (test/drb) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。どうしても原因がわからないので、報告だけ・・・
18 messages
2004/06/19
[#23718] Re: error at TestDRbMServer (test/drb)
— nobu.nakada@...
2004/06/19
なかだです。
[#23719] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23720] Re: error at TestDRbMServer (test/drb)
— nobu.nakada@...
2004/06/19
なかだです。
[#23724] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23725] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23726] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23727] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/19
山本です。
[#23728] Re: error at TestDRbMServer (test/drb)
— "U.Nakamura" <usa@...>
2004/06/21
こんにちは、なかむら(う)です。
[#23729] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/21
山本です。
[#23733] Re: error at TestDRbMServer (test/drb)
— nobu.nakada@...
2004/06/21
なかだです。
[#23734] Re: error at TestDRbMServer (test/drb)
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/06/21
山本です。
[#23730] Re test/ruby/test_pipe.rb fails in bcc32 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
5 messages
2004/06/21
[#23762] Ruby 1.8.2 to be released. — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
40 messages
2004/06/23
[#23778] Re: Ruby 1.8.2 to be released.
— Kouhei Sutou <kou@...>
2004/06/24
須藤です.
[#23779] Re: Ruby 1.8.2 to be released.
— Kazuhiro NISHIYAMA <zn@...>
2004/06/24
西山和広です。
[#23795] Re: Ruby 1.8.2 to be released.
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23781] Thread critical でも timeout を使いたい — Tatsuki Sugiura <sugi@...>
杉浦と申します。こんにちは。
11 messages
2004/06/24
[#23782] Re: Thread critical でも timeout を使いたい
— matz@... (Yukihiro Matsumoto)
2004/06/24
まつもと ゆきひろです
[#23783] Re: Thread critical でも timeout を使いたい
— Tatsuki Sugiura <sugi@...>
2004/06/25
杉浦です。
[#23801] Re: Thread critical でも timeout を使いたい
— Tatsuki Sugiura <sugi@...>
2004/06/25
杉浦です。
[#23784] URI() — Tanaka Akira <akr@...17n.org>
前から思っていたのですが、URI.parse("http://...") を URI("http://...")
19 messages
2004/06/25
[#23786] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
MoonWolfです。
[#23788] Re: URI()
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23789] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
Yukihiro Matsumoto wrote:
[#23790] Re: URI()
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23791] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
Yukihiro Matsumoto wrote:
[#23794] Re: URI()
— matz@... (Yukihiro Matsumoto)
2004/06/25
まつもと ゆきひろです
[#23796] Re: URI()
— MoonWolf <moonwolf@...>
2004/06/25
Yukihiro Matsumoto wrote:
[#23815] set_trace_func in safe mode — nobu.nakada@...
なかだです。
5 messages
2004/06/26
[ruby-dev:23741] Re: error at TestDRbMServer (test/drb)
From:
"H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date:
2004-06-22 01:07:02 UTC
List:
ruby-dev #23741
山本です。
EMFILE と EBADF に対処してみました。
(#undef, #define による関数のすり替えがよくわからないのですが、
これで正しいでしょうか?)
なお、ENOMEM(mallocの失敗)と EINVAL(mode文字列が不適切)は依然と
してerrno に設定されません。
内部関数を使って、これらを設定するパッチも作ってみます。
Index: win32.h
===================================================================
RCS file: /var/cvs/src/ruby/win32/win32.h,v
retrieving revision 1.51
diff -u -w -b -p -r1.51 win32.h
--- win32.h 19 Feb 2004 09:08:23 -0000 1.51
+++ win32.h 21 Jun 2004 16:44:57 -0000
@@ -115,6 +115,16 @@ extern "C++" {
#define sopen _sopen
#undef fstat
#define fstat(fd,st) rb_w32_fstat(fd,st)
+#undef fopen
+#define fopen(p, t) rb_w32_fopen(p, t)
+#undef fdopen
+#define fdopen(h, t) rb_w32_fdopen(h, t)
+#undef fsopen
+#define fsopen(p, t, f) rb_w32_fsopen(p, t, f)
+#endif
+#if defined __BORLANDC__ || defined _WIN32_WCE
+#undef fread
+#define fread(p, m, n, stream) rb_w32_fread(p, m, n, stream)
#endif
#define fsync(h) _commit(h)
#undef stat
@@ -178,6 +188,15 @@ extern int rb_w32_spawn(int, const char
extern int rb_w32_aspawn(int, const char *, char *const *);
extern int kill(int, int);
extern pid_t rb_w32_getpid(void);
+#ifdef __BORLANDC__
+extern int rb_w32_fstat(int fd, struct stat *st);
+extern FILE *rb_w32_fopen(const char *path, const char *type);
+extern FILE *rb_w32_fdopen(int handle, char *type);
+extern FILE *rb_w32_fsopen(const char *path, const char *type, int shflag);
+#endif
+#if defined __BORLANDC__ || defined _WIN32_WCE
+extern size_t rb_w32_fread(void *ptr, size_t size, size_t n, FILE *stream);
+#endif
#include <float.h>
#if !defined __MINGW32__ || defined __NO_ISOCEXT
Index: win32.c
===================================================================
RCS file: /var/cvs/src/ruby/win32/win32.c,v
retrieving revision 1.117
diff -u -w -b -p -r1.117 win32.c
--- win32.c 21 Jun 2004 00:27:39 -0000 1.117
+++ win32.c 22 Jun 2004 00:39:36 -0000
@@ -2726,6 +2726,54 @@ isUNCRoot(const char *path)
}
#ifdef __BORLANDC__
+static int too_many_files(void)
+{
+ register FILE *fp;
+ for (fp = _streams; fp < _streams + _nfile; fp++)
+ if (fp->fd < 0) return 0;
+ return 1;
+}
+#undef fopen
+FILE *
+rb_w32_fopen(const char *path, const char *type)
+{
+ if (too_many_files()) {
+ errno = EMFILE;
+ return NULL;
+ }
+ else {
+ errno = 0;
+ return fopen(path, type);
+ }
+}
+FILE *
+rb_w32_fdopen(int handle, char *type)
+{
+ if (handle < 0) {
+ errno = EBADF;
+ return NULL;
+ }
+ else if (too_many_files()) {
+ errno = EMFILE;
+ return NULL;
+ }
+ else {
+ errno = 0;
+ return _fdopen(handle, type);
+ }
+}
+FILE *
+rb_w32_fsopen(const char *path, const char *type, int shflag)
+{
+ if (too_many_files()) {
+ errno = EMFILE;
+ return NULL;
+ }
+ else {
+ errno = 0;
+ return _fsopen(path, type, shflag);
+ }
+}
#undef fstat
int
rb_w32_fstat(int fd, struct stat *st)
@@ -3034,10 +3082,14 @@ rb_w32_getc(FILE* stream)
else
#endif
{
+#if defined __BORLANDC__ || defined _WIN32_WCE
+ errno = 0;
+#endif
c = _filbuf(stream);
#if defined __BORLANDC__ || defined _WIN32_WCE
if ((c == EOF) && (errno == EPIPE)) {
clearerr(stream);
+ stream->flags |= _F_EOF;
}
#endif
rb_trap_immediate = trap_immediate;
@@ -3065,6 +3117,22 @@ rb_w32_putc(int c, FILE* stream)
}
return c;
}
+
+#if defined __BORLANDC__ || defined _WIN32_WCE
+#undef fread
+size_t
+rb_w32_fread(void *ptr, size_t size, size_t n, FILE *stream)
+{
+ size_t i;
+ errno = 0;
+ i = fread(ptr, size, n, stream);
+ if ((i < n) && (errno == EPIPE)) {
+ clearerr(stream);
+ stream->flags |= _F_EOF;
+ }
+ return i;
+}
+#endif
struct asynchronous_arg_t {
/* output field */