ruby-changes:8477
From: usa <ko1@a...>
Date: Wed, 29 Oct 2008 00:30:27 +0900 (JST)
Subject: [ruby-changes:8477] Ruby:r20009 (ruby_1_9_1): * win32/win32.c (rb_w32_open): need to seek to the end of the file when
usa 2008-10-29 00:30:03 +0900 (Wed, 29 Oct 2008) New Revision: 20009 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20009 Log: * win32/win32.c (rb_w32_open): need to seek to the end of the file when O_APPEND is specified. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/win32/win32.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20008) +++ ruby_1_9_1/ChangeLog (revision 20009) @@ -1,3 +1,8 @@ +Wed Oct 29 00:29:46 2008 NAKAMURA Usaku <usa@r...> + + * win32/win32.c (rb_w32_open): need to seek to the end of the file when + O_APPEND is specified. + Tue Oct 28 23:03:46 2008 Yuki Sonoda (Yugui) <yugui@y...> * test/ruby/test_proc.rb: filled all patterns for testing Index: ruby_1_9_1/win32/win32.c =================================================================== --- ruby_1_9_1/win32/win32.c (revision 20008) +++ ruby_1_9_1/win32/win32.c (revision 20009) @@ -4129,8 +4129,10 @@ fd = -1; goto quit; } - if (!(flags & (FDEV | FPIPE)) && (oflag & O_APPEND)) + if (!(flags & (FDEV | FPIPE)) && (oflag & O_APPEND)) { flags |= FAPPEND; + SetFilePointer(h, 0, NULL, FILE_END); + } _set_osfhnd(fd, (long)h); _osfile(fd) = flags | FOPEN; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/