summaryrefslogtreecommitdiff
path: root/ext/io/wait/extconf.rb
blob: a766ccbe6f272e0e94b62eb3700c9a69db4d43a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require 'mkmf'
target = "io/wait"

unless /djgpp|mswin|mingw|human/ =~ RUBY_PLATFORM
  fionread = %w[sys/ioctl.h sys/filio.h].find do |h|
    checking_for("FIONREAD") {macro_defined?("FIONREAD", "#include <#{h}>\n")}
  end
  if fionread
    $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""
    create_makefile(target)
  end
end