[#19261] lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@...

なかだです。

29 messages 2003/01/01
[#19360] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "K.Kosako" <kosako@...> 2003/01/15

nobu.nakada@nifty.ne.jpさんの

[#19361] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/15

なひです。

[#19364] Re: lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@... 2003/01/17

なかだです。

[#19366] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/17

なひです。

[#19299] [BUG] errno == 0 — Kazuhiro Yoshida <moriq@...>

もりきゅうです。win32だけかもしれません。

22 messages 2003/01/04
[#19301] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19302] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19303] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19304] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19306] Re: [BUG] errno == 0 — nobu.nakada@... 2003/01/05

なかだです。

[ruby-dev:19304] Re: [BUG] errno == 0

From: "U.Nakamura" <usa@...>
Date: 2003-01-04 06:03:12 UTC
List: ruby-dev #19304
こんにちは、なかむら(う)です。
# なんか私ばっかり書いてますが

In message "[ruby-dev:19303] Re: [BUG] errno == 0"
    on Jan.04,2003 13:51:56, <usa@osb.att.ne.jp> wrote:
> [ruby-dev:18426]と同じっぽいです。
> この線で対策します。

1.8のmswin32とmingw32は対処しました。

bccwin32はfflush()では救えなかったので対処してません。
fseek(fp, SEEK_CUR, 0)はOKっぽいので、下記のパッチのような方
法でこの問題自体は潰せますが、なんか他にもいろいろありそうな
感じだったので深く踏み込んではいません。

Index: io.c
===================================================================
RCS file: /home/cvs/ruby/io.c,v
retrieving revision 1.175
diff -u -1 -p -r1.175 io.c
--- io.c	2002/12/21 18:02:00	1.175
+++ io.c	2003/01/04 06:00:52
@@ -225,2 +225,7 @@ rb_io_check_readable(fptr)
     fptr->mode |= FMODE_RBUF;
+#elif NEED_IO_SEEK_BETWEEN_RW
+    if ((fptr->mode & FMODE_WBUF) && !fptr->f2) {
+	io_seek(fptr, SEEK_CUR, 0);
+    }
+    fptr->mode |= FMODE_RBUF;
 #endif
@@ -238,2 +243,6 @@ rb_io_check_writable(fptr)
 	io_fflush(fptr->f, fptr);
+    }
+#elif NEED_IO_SEEK_BETWEEN_RW
+    if ((fptr->mode & FMODE_RBUF) && !fptr->f2) {
+	io_seek(fptr, SEEK_CUR, 0);
     }
Index: bcc32/Makefile.sub
===================================================================
RCS file: /home/cvs/ruby/bcc32/Makefile.sub,v
retrieving revision 1.19
diff -u -1 -p -r1.19 Makefile.sub
--- bcc32/Makefile.sub	2002/12/31 12:31:12	1.19
+++ bcc32/Makefile.sub	2003/01/04 06:00:52
@@ -244,2 +244,4 @@ config.h: Makefile $(srcdir)bcc32/Makefi
 
+\#define NEED_IO_SEEK_BETWEEN_RW 1
+
 \#define RSHIFT(x,y) ((x)>>y)

それでは。
-- 
U.Nakamura <usa@osb.att.ne.jp>



In This Thread