io-console 0.8.2 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,17 +5,12 @@ require 'mkmf'
5
5
  # See https://bugs.ruby-lang.org/issues/20345
6
6
  MakeMakefile::RbConfig ||= ::RbConfig
7
7
 
8
- have_func("rb_syserr_fail_str(0, Qnil)") or
9
- have_func("rb_syserr_new_str(0, Qnil)") or
10
- abort
11
-
12
- have_func("rb_interned_str_cstr")
13
- have_func("rb_io_path", "ruby/io.h")
14
- have_func("rb_io_descriptor", "ruby/io.h")
15
- have_func("rb_io_get_write_io", "ruby/io.h")
16
- have_func("rb_io_closed_p", "ruby/io.h")
17
- have_func("rb_io_open_descriptor", "ruby/io.h")
18
- have_func("rb_ractor_local_storage_value_newkey")
8
+ have_func("rb_interned_str_cstr") # Ruby 3.0
9
+ have_func("rb_ractor_local_storage_value_newkey") # Ruby 3.0
10
+ have_func("rb_io_descriptor", "ruby/io.h") # Ruby 3.1
11
+ have_func("rb_io_path", "ruby/io.h") # Ruby 3.3
12
+ have_func("rb_io_closed_p", "ruby/io.h") # Ruby 3.3
13
+ have_func("rb_io_open_descriptor", "ruby/io.h") # Ruby 3.3
19
14
 
20
15
  is_wasi = /wasi/ =~ MakeMakefile::RbConfig::CONFIG["platform"]
21
16
  # `ok` can be `true`, `false`, or `nil`:
@@ -28,6 +23,7 @@ ok = true if (RUBY_ENGINE == "ruby" && !is_wasi) || RUBY_ENGINE == "truffleruby"
28
23
  hdr = nil
29
24
  case
30
25
  when macro_defined?("_WIN32", "")
26
+ win32 = true
31
27
  # rb_w32_map_errno: 1.8.7
32
28
  vk_header = File.exist?("#$srcdir/win32_vk.list") ? "chksum" : "inc"
33
29
  vk_header = "#{'{$(srcdir)}' if $nmake == ?m}win32_vk.#{vk_header}"
@@ -49,10 +45,13 @@ when true
49
45
  # rb_sym2str: 2.2.0
50
46
  if have_macro("HAVE_RUBY_FIBER_SCHEDULER_H")
51
47
  $defs << "-D""HAVE_RB_IO_WAIT=1"
52
- elsif have_func("rb_scheduler_timeout") # 3.0
53
- have_func("rb_io_wait")
48
+ elsif have_func("rb_scheduler_timeout") # Ruby 3.0 (internal)
49
+ have_func("rb_io_wait") # Ruby 3.0
54
50
  end
55
- have_func("ttyname_r") or have_func("ttyname")
51
+ have_func("rb_category_warn")
52
+ have_const("RB_WARN_CATEGORY_DEPRECATED")
53
+ win32 or have_func("ttyname_r") or have_func("ttyname")
54
+ have_func("rb_prepend_module") # not exported by TruffleRuby
56
55
  create_makefile("io/console") {|conf|
57
56
  conf << "\n""VK_HEADER = #{vk_header}\n"
58
57
  }