mruby-io: use hal-win-io for mingw due to lack of fork/waitpid

mingw provides posix file i/o apis but not unix process management
functions (fork, waitpid) which are required by hal-posix-io. removed
mingw from linux/bsd pattern to let for_windows? predicate select
hal-win-io instead.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-16 19:14:54 +09:00
parent e540547413
commit ec34c93349
+1 -4
View File
@@ -10,13 +10,10 @@ MRuby::Gem::Specification.new('mruby-io') do |spec|
# HAL gems must be explicitly specified in build config (recommended) or via auto-selection below
spec.build.gems.one? { |g| g.name =~ /^hal-.*-io$/ } or begin
# No HAL found - determine appropriate error message or auto-load
# MinGW provides POSIX compatibility, so use hal-posix-io
suggested_hal = if spec.build.primary_toolchain == 'visualcpp'
# Visual C++ on Windows - use native Windows HAL
'hal-win-io'
elsif RUBY_PLATFORM =~ /linux|darwin|bsd|mingw/ ||
(spec.build.kind_of?(MRuby::CrossBuild) && spec.build.host_target =~ /mingw/) ||
spec.cc.command.to_s =~ /mingw/
elsif RUBY_PLATFORM =~ /linux|darwin|bsd/
'hal-posix-io'
elsif spec.for_windows?
'hal-win-io'