1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-10-26 09:11:40 +00:00
parent 201eb37d92
commit bcf61f58d5
3 changed files with 9 additions and 2 deletions

View file

@ -1,4 +1,4 @@
Sun Oct 26 18:07:20 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Oct 26 18:11:23 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (blocking_region_{begin,end}): declared as inline. * thread.c (blocking_region_{begin,end}): declared as inline.
@ -8,6 +8,9 @@ Sun Oct 26 18:07:20 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/etc/etc.c (sGroup): getgrent may not be available. * 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@ruby-lang.org> Sun Oct 26 13:30:28 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (read_all): use the given buffer to read when needs readconv. * io.c (read_all): use the given buffer to read when needs readconv.

View file

@ -2,8 +2,9 @@ require 'mkmf'
target = "io/wait" target = "io/wait"
unless macro_defined?("DOSISH", "#include <ruby.h>") 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| 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 end
if fionread if fionread
$defs << "-DFIONREAD_HEADER=\"<#{fionread}>\"" $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""

View file

@ -14,6 +14,9 @@
#include "ruby/io.h" #include "ruby/io.h"
#include <sys/types.h> #include <sys/types.h>
#if defined(HAVE_SYS_IOCTL_H)
#include <sys/ioctl.h>
#endif
#if defined(FIONREAD_HEADER) #if defined(FIONREAD_HEADER)
#include FIONREAD_HEADER #include FIONREAD_HEADER
#endif #endif