summaryrefslogtreecommitdiffstats
path: root/ext/io
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-24 02:22:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-24 02:22:32 +0000
commit8187dbae0b352e75cb1a1aac50ecd3e9cab5fc40 (patch)
tree9b66fd0479fce03d9f13e260624f3c1773326dc4 /ext/io
parent6e8ea9f45a5115d502a6b273fc5da7fd4c69e58c (diff)
downloadruby-8187dbae0b352e75cb1a1aac50ecd3e9cab5fc40.tar.gz
ruby-8187dbae0b352e75cb1a1aac50ecd3e9cab5fc40.tar.xz
ruby-8187dbae0b352e75cb1a1aac50ecd3e9cab5fc40.zip
* ext/io/wait/extconf.rb: removed unnecessary backward compatibility stuff.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io')
-rw-r--r--ext/io/wait/extconf.rb24
1 files changed, 4 insertions, 20 deletions
diff --git a/ext/io/wait/extconf.rb b/ext/io/wait/extconf.rb
index 0c1a87047..a766ccbe6 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