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

ruby-changes:8416

From: nobu <ko1@a...>
Date: Sun, 26 Oct 2008 18:11:56 +0900 (JST)
Subject: [ruby-changes:8416] Ruby:r19947 (trunk): * ext/io/wait/{extconf.rb,wait.c}: needs sys/ioctl.h for fcntl on

nobu	2008-10-26 18:11:40 +0900 (Sun, 26 Oct 2008)

  New Revision: 19947

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

  Log:
    * ext/io/wait/{extconf.rb,wait.c}: needs sys/ioctl.h for fcntl on
      cygwin.

  Modified files:
    trunk/ChangeLog
    trunk/ext/io/wait/extconf.rb
    trunk/ext/io/wait/wait.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19946)
+++ ChangeLog	(revision 19947)
@@ -1,4 +1,4 @@
-Sun Oct 26 18:07:20 2008  Nobuyoshi Nakada  <nobu@r...>
+Sun Oct 26 18:11:23 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* thread.c (blocking_region_{begin,end}): declared as inline.
 
@@ -8,6 +8,9 @@
 
 	* ext/etc/etc.c (sGroup): getgrent may not be available.
 
+	* ext/io/wait/{extconf.rb,wait.c}: needs sys/ioctl.h for fcntl on
+	  cygwin.
+
 Sun Oct 26 13:30:28 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* io.c (read_all): use the given buffer to read when needs readconv.
Index: ext/io/wait/wait.c
===================================================================
--- ext/io/wait/wait.c	(revision 19946)
+++ ext/io/wait/wait.c	(revision 19947)
@@ -14,6 +14,9 @@
 #include "ruby/io.h"
 
 #include <sys/types.h>
+#if defined(HAVE_SYS_IOCTL_H)
+#include <sys/ioctl.h>
+#endif
 #if defined(FIONREAD_HEADER)
 #include FIONREAD_HEADER
 #endif
Index: ext/io/wait/extconf.rb
===================================================================
--- ext/io/wait/extconf.rb	(revision 19946)
+++ ext/io/wait/extconf.rb	(revision 19947)
@@ -2,8 +2,9 @@
 target = "io/wait"
 
 unless macro_defined?("DOSISH", "#include <ruby.h>")
+  have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil
   fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h|
-    have_macro("FIONREAD", h)
+    have_macro("FIONREAD", [h, ioctl_h].compact)
   end
   if fionread
     $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""

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

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