summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-10 04:55:34 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-10 04:55:34 +0000
commita32bc08d36360adf59806908ebe790ff03f689a2 (patch)
treeaff30ce96dfe57baca2258006515aa59f57e8988 /ext/socket/extconf.rb
parent0de28773260c8c47dec6a39711765c27acc646de (diff)
* configure.in, win32/Makefile.sub (LIBS, COMMON_HEADERS): use
winsock2 on mswin32/mingw. * ext/socket/extconf.rb: ditto. * win32/win32.c (StartSockets): ditto. * win32/win32.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 076f8bf7d7..5e439401ce 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -1,14 +1,10 @@
require 'mkmf'
case RUBY_PLATFORM
-when /bccwin32/
+when /(ms|bcc)win32|mingw/
test_func = "WSACleanup"
have_library("ws2_32", "WSACleanup")
have_func("closesocket")
-when /mswin32|mingw/
- test_func = "WSACleanup"
- have_library("wsock32", "WSACleanup")
- have_func("closesocket")
when /cygwin/
test_func = "socket"
when /beos/
@@ -108,8 +104,7 @@ end
# doug's fix, NOW add -Dss_family... only if required!
doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)}
-if /mswin32|mingw/ !~ RUBY_PLATFORM and
- (doug[] or
+if (doug[] or
with_cppflags($CPPFLAGS + " -Dss_family=__ss_family -Dss_len=__ss_len", &doug))
$defs[-1] = "-DHAVE_SOCKADDR_STORAGE"
end