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

ruby-changes:6047

From: usa <ko1@a...>
Date: Tue, 24 Jun 2008 16:55:53 +0900 (JST)
Subject: [ruby-changes:6047] Ruby:r17557 (trunk): * io.c (io_reopen): remove cygwin handling because it seems to be for

usa	2008-06-24 16:54:05 +0900 (Tue, 24 Jun 2008)

  New Revision: 17557

  Modified files:
    trunk/ChangeLog
    trunk/io.c

  Log:
    * io.c (io_reopen): remove cygwin handling because it seems to be for
      C's stdio.
      fixed [ruby-dev:35183]
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17557&r2=17556&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=17557&r2=17556&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17556)
+++ ChangeLog	(revision 17557)
@@ -1,3 +1,9 @@
+Tue Jun 24 16:51:51 2008  NAKAMURA Usaku  <usa@r...>
+
+	* io.c (io_reopen): remove cygwin handling because it seems to be for
+	  C's stdio.
+	  fixed [ruby-dev:35183]
+
 Tue Jun 24 11:12:33 2008  NAKAMURA Usaku  <usa@r...>
 
 	* include/ruby/win32.h, win32/win32.c (rb_w32_getppid): now support
Index: io.c
===================================================================
--- io.c	(revision 17556)
+++ io.c	(revision 17557)
@@ -4410,7 +4410,6 @@
     GetOpenFile(nfile, orig);
 
     if (fptr == orig) return io;
-#if !defined __CYGWIN__
     if (IS_PREP_STDIO(fptr)) {
         if ((fptr->stdio_file == stdin && !(orig->mode & FMODE_READABLE)) ||
             (fptr->stdio_file == stdout && !(orig->mode & FMODE_WRITABLE)) ||
@@ -4421,7 +4420,6 @@
 		     rb_io_flags_mode(orig->mode));
 	}
     }
-#endif
     if (orig->mode & FMODE_READABLE) {
 	pos = io_tell(orig);
     }
@@ -4444,14 +4442,12 @@
     fd = fptr->fd;
     fd2 = orig->fd;
     if (fd != fd2) {
-#if !defined __CYGWIN__
 	if (IS_PREP_STDIO(fptr)) {
 	    /* need to keep stdio objects */
 	    if (dup2(fd2, fd) < 0)
 		rb_sys_fail(orig->path);
 	}
 	else {
-#endif
             if (fptr->stdio_file)
                 fclose(fptr->stdio_file);
             else
@@ -4461,9 +4457,7 @@
 	    if (dup2(fd2, fd) < 0)
 		rb_sys_fail(orig->path);
             fptr->fd = fd;
-#if !defined __CYGWIN__
 	}
-#endif
 	rb_thread_fd_close(fd);
 	if ((orig->mode & FMODE_READABLE) && pos >= 0) {
 	    if (io_seek(fptr, pos, SEEK_SET) < 0) {

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

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