From: nobu.nakada@... Date: 2003-02-14T14:54:29+09:00 Subject: [ruby-dev:19570] Re: Fw: Ruby 1.8.0 bugs なかだです。 At Fri, 14 Feb 2003 12:47:05 +0900, WATANABE Hirofumi wrote: > たぶん > #ifdef __CYGWIN__ > extern int _fmode; > _fmode |= _O_BINARY; > #endif > をどこかに入れれば済んでしまうんではないかと。 それだけだとstdinとかには効かないようなので、prep_stdio()と Init_IO()でしょうか。 Index: io.c =================================================================== RCS file: /cvs/ruby/src/ruby/io.c,v retrieving revision 1.185 diff -u -2 -p -r1.185 io.c --- io.c 9 Feb 2003 18:36:22 -0000 1.185 +++ io.c 14 Feb 2003 05:52:36 -0000 @@ -2784,4 +2784,8 @@ prep_stdio(f, mode, klass) MakeOpenFile(io, fp); +#ifdef __CYGWIN__ + mode |= O_BINARY; + setmode(fileno(f), O_BINARY); +#endif fp->f = f; fp->mode = mode; @@ -3895,4 +3899,9 @@ void Init_IO() { +#ifdef __CYGWIN__ + extern int _fmode; + _fmode |= O_BINARY; +#endif + rb_eIOError = rb_define_class("IOError", rb_eStandardError); rb_eEOFError = rb_define_class("EOFError", rb_eIOError); -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦