OSDN Git Service

ruby-1.9.1-rc1
[splhack/AndroidRuby.git] / lib / ruby-1.9.1-rc1 / ext / io / wait / extconf.rb
1 require 'mkmf'
2 target = "io/wait"
3
4 unless macro_defined?("DOSISH", "#include <ruby.h>")
5   have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil
6   fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h|
7     have_macro("FIONREAD", [h, ioctl_h].compact)
8   end
9   if fionread
10     $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""
11     create_makefile(target)
12   end
13 else
14   if have_func("rb_w32_ioctlsocket", "ruby.h")
15     have_func("rb_w32_is_socket", "ruby.h")
16     create_makefile(target)
17   end
18 end