Skip to content

Adjust number of file descriptors for Windows #337

Merged
merged 1 commit into from Jun 26, 2012
+10 −1
View
11 ext/extconf.rb
@@ -87,6 +87,15 @@ def manual_ssl_config
add_define "HAVE_KQUEUE" if have_header("sys/event.h") and have_header("sys/queue.h")
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
@@ -163,4 +172,4 @@ def manual_ssl_config
SRC
TRY_LINK.sub!('$(CXX)', '$(CC)')
-create_makefile "rubyeventmachine"
+create_makefile "rubyeventmachine"
Something went wrong with that request. Please try again.