diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-07-09 18:02:43 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-07-09 10:34:56 +0000 |
| commit | 0c1c3ffa223cd3272cdbf5371879bee62401f541 (patch) | |
| tree | 6c35609ede76737027d6fb73716a0d167c1f88bf | |
| parent | ddeefa2e7eb091d2ba532cfb9aaaffe15413bb8d (diff) | |
[ruby/io-wait] Revert https://github.com/ruby/io-wait/pull/9 "Make
the gem a noop on Rubies older than
2.6"
This reverts commit https://github.com/ruby/io-wait/commit/75fcb74c327f.
The version that does nothing with pre-ruby 2.6 has already been
released, so there is no longer need to consider older rubies in newer
versions.
https://github.com/ruby/io-wait/commit/930d2f0d07
| -rw-r--r-- | ext/io/wait/extconf.rb | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/ext/io/wait/extconf.rb b/ext/io/wait/extconf.rb index ba223f0ac2..e97efa179d 100644 --- a/ext/io/wait/extconf.rb +++ b/ext/io/wait/extconf.rb @@ -1,25 +1,21 @@ # frozen_string_literal: false require 'mkmf' -if RUBY_VERSION < "2.6" - File.write("Makefile", dummy_makefile($srcdir).join("")) +target = "io/wait" +have_func("rb_io_wait", "ruby/io.h") +have_func("rb_io_descriptor", "ruby/io.h") +unless macro_defined?("DOSISH", "#include <ruby.h>") + have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil + fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h| + have_macro("FIONREAD", [h, ioctl_h].compact) + end + if fionread + $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\"" + create_makefile(target) + end else - target = "io/wait" - have_func("rb_io_wait", "ruby/io.h") - have_func("rb_io_descriptor", "ruby/io.h") - unless macro_defined?("DOSISH", "#include <ruby.h>") - have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil - fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h| - have_macro("FIONREAD", [h, ioctl_h].compact) - end - if fionread - $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\"" - create_makefile(target) - end - else - if have_func("rb_w32_ioctlsocket", "ruby.h") - have_func("rb_w32_is_socket", "ruby.h") - create_makefile(target) - end + if have_func("rb_w32_ioctlsocket", "ruby.h") + have_func("rb_w32_is_socket", "ruby.h") + create_makefile(target) end end |
