2003-07-23 05:26:53 -04:00
|
|
|
require 'mkmf'
|
|
|
|
target = "io/wait"
|
|
|
|
|
2003-08-05 23:11:14 -04:00
|
|
|
unless macro_defined?("DOSISH", "#include <ruby.h>")
|
2003-07-23 05:26:53 -04:00
|
|
|
fionread = %w[sys/ioctl.h sys/filio.h].find do |h|
|
2006-09-16 03:15:22 -04:00
|
|
|
have_macro("FIONREAD", h)
|
2003-07-23 05:26:53 -04:00
|
|
|
end
|
2003-07-23 22:22:32 -04:00
|
|
|
if fionread
|
|
|
|
$defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""
|
|
|
|
create_makefile(target)
|
|
|
|
end
|
2005-07-17 00:47:38 -04:00
|
|
|
else
|
|
|
|
if have_func("rb_w32_ioctlsocket", "ruby.h")
|
|
|
|
have_func("rb_w32_is_socket", "ruby.h")
|
|
|
|
create_makefile(target)
|
|
|
|
end
|
2003-07-23 05:26:53 -04:00
|
|
|
end
|