Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Consistently adjust FD_SETSIZE on all extensions

Previously only `rubyeventmachine` FD were adjusted. Just to be consistent
all compiled extensions should be doing the same.
  • Loading branch information...
commit 923c8acb14f88103a58975b26c51760de4e960cc 1 parent 5cfcce3
@luislavena luislavena authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 ext/fastfilereader/extconf.rb
View
11 ext/fastfilereader/extconf.rb
@@ -26,6 +26,15 @@ def add_define(name)
add_define 'OS_UNIX'
end
+# Adjust number of file descriptors (FD) on Windows
+
+if RbConfig::CONFIG["host_os"] =~ /mingw/
+ found = RbConfig::CONFIG.values_at("CFLAGS", "CPPFLAGS").
+ any? { |v| v.include?("FD_SETSIZE") }
+
+ add_define "FD_SETSIZE=32767" unless found
+end
+
# Main platform invariances:
case RUBY_PLATFORM
@@ -91,4 +100,4 @@ def add_define(name)
CONFIG['LDSHARED'] = "$(CXX) -shared"
end
-create_makefile "fastfilereaderext"
+create_makefile "fastfilereaderext"
Please sign in to comment.
Something went wrong with that request. Please try again.