[前][次][番号順一覧][スレッド一覧]

ruby-changes:30481

From: usa <ko1@a...>
Date: Thu, 15 Aug 2013 17:01:34 +0900 (JST)
Subject: [ruby-changes:30481] usa:r42560 (trunk): * io.c (rb_io_rewind): remove fsync() for Windows to improve the

usa	2013-08-15 17:01:28 +0900 (Thu, 15 Aug 2013)

  New Revision: 42560

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42560

  Log:
    * io.c (rb_io_rewind): remove fsync() for Windows to improve the
      performance.

  Modified files:
    trunk/ChangeLog
    trunk/io.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42559)
+++ ChangeLog	(revision 42560)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Aug 15 16:59:56 2013  NAKAMURA Usaku  <usa@r...>
+
+	* io.c (rb_io_rewind): remove fsync() for Windows to improve the
+	  performance.
+
 Thu Aug 15 16:30:23 2013  NAKAMURA Usaku  <usa@r...>
 
 	* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):
Index: io.c
===================================================================
--- io.c	(revision 42559)
+++ io.c	(revision 42560)
@@ -1654,11 +1654,6 @@ rb_io_rewind(VALUE io) https://github.com/ruby/ruby/blob/trunk/io.c#L1654
 
     GetOpenFile(io, fptr);
     if (io_seek(fptr, 0L, 0) < 0 && errno) rb_sys_fail_path(fptr->pathv);
-#ifdef _WIN32
-    if (GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) == FILE_TYPE_DISK) {
-	fsync(fptr->fd);
-    }
-#endif
     if (io == ARGF.current_file) {
 	ARGF.lineno -= fptr->lineno;
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]