From 85aa73835eb427a4131a0bbb6249865a9bd003ca Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 24 Jul 2003 02:22:32 +0000 Subject: * ext/io/wait/extconf.rb: removed unnecessary backward compatibility stuff. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/io/wait/extconf.rb | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'ext/io') diff --git a/ext/io/wait/extconf.rb b/ext/io/wait/extconf.rb index 0c1a870474..a766ccbe6f 100644 --- a/ext/io/wait/extconf.rb +++ b/ext/io/wait/extconf.rb @@ -1,28 +1,12 @@ require 'mkmf' target = "io/wait" -unless defined?(checking_for) - def checking_for(msg) - STDOUT.print "checking for ", msg, "..." - STDOUT.flush - STDOUT.puts((r = yield) ? "yes" : "no") - r - end -end -unless defined?(macro_defined?) - def macro_defined?(macro, src, opt="") - try_cpp(src + <<"SRC", opt) -#ifndef #{macro} -# error -#endif -SRC - end -end 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 - exit 1 unless fionread - $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\"" - create_makefile(target) + if fionread + $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\"" + create_makefile(target) + end end -- cgit v1.2.3