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

unless macro_defined?("DOSISH", "#include <ruby.h>")
  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