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

ruby-changes:18402

From: nobu <ko1@a...>
Date: Wed, 29 Dec 2010 21:22:36 +0900 (JST)
Subject: [ruby-changes:18402] Ruby:r30425 (trunk): * io.c (maygvl_copy_stream_wait_readwrite): define if USE_SENDFILE

nobu	2010-12-29 21:20:16 +0900 (Wed, 29 Dec 2010)

  New Revision: 30425

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

  Log:
    * io.c (maygvl_copy_stream_wait_readwrite): define if USE_SENDFILE

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30424)
+++ ChangeLog	(revision 30425)
@@ -1,3 +1,7 @@
+Wed Dec 29 21:20:13 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (maygvl_copy_stream_wait_readwrite): define if USE_SENDFILE
+
 Wed Dec 29 20:37:43 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/extmk.rb: strip current directory prefix.
Index: io.c
===================================================================
--- io.c	(revision 30424)
+++ io.c	(revision 30425)
@@ -8370,22 +8370,6 @@
     return 0;
 }
 
-static int
-maygvl_copy_stream_wait_readwrite(struct copy_stream_struct *stp)
-{
-    int ret;
-    rb_fd_zero(&stp->fds);
-    rb_fd_set(stp->src_fd, &stp->fds);
-    rb_fd_set(stp->dst_fd, &stp->fds);
-    ret = rb_fd_select(rb_fd_max(&stp->fds), &stp->fds, NULL, NULL, NULL);
-    if (ret == -1) {
-        stp->syserr = "select";
-        stp->error_no = errno;
-        return -1;
-    }
-    return 0;
-}
-
 #ifdef HAVE_SENDFILE
 
 # ifdef __linux__
@@ -8439,6 +8423,22 @@
 
 #ifdef USE_SENDFILE
 static int
+maygvl_copy_stream_wait_readwrite(struct copy_stream_struct *stp)
+{
+    int ret;
+    rb_fd_zero(&stp->fds);
+    rb_fd_set(stp->src_fd, &stp->fds);
+    rb_fd_set(stp->dst_fd, &stp->fds);
+    ret = rb_fd_select(rb_fd_max(&stp->fds), &stp->fds, NULL, NULL, NULL);
+    if (ret == -1) {
+        stp->syserr = "select";
+        stp->error_no = errno;
+        return -1;
+    }
+    return 0;
+}
+
+static int
 nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
 {
     struct stat src_stat, dst_stat;

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

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