summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-07 01:51:47 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-07 01:51:47 +0000
commit8282bdbf559929c9265bf15c8dc10bc350a895d4 (patch)
treefa8c32251e487def968f4e48e23c83d5cdf7d171 /ext
parent3a381c19bcff2ecccfe6e38b3d803a9440da22b3 (diff)
downloadruby-8282bdbf559929c9265bf15c8dc10bc350a895d4.tar.gz
ruby-8282bdbf559929c9265bf15c8dc10bc350a895d4.tar.xz
ruby-8282bdbf559929c9265bf15c8dc10bc350a895d4.zip
* win32/{configure.bat, setup.mak, Makefile.sub, win32.h}: add
support new configure option `--with-winsock2'. * win32/win32.c (StartSockets): ditto. * ext/socket/extconf.rb: ditto. * win32/win32.c (open_ifs_socket): new function. * win32/win32.c (StartSockets, rb_w32_socket): use open_ifs_socket() instead of socket(). ifs socket support is backported from trunk. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/extconf.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 5ee30a222..6469535ca 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -6,7 +6,11 @@ when /bccwin32/
have_library("ws2_32", "WSACleanup")
when /mswin32|mingw/
test_func = "WSACleanup"
- have_library("wsock32", "WSACleanup")
+ if /USE_WINSOCK2/ =~ $CPPFLAGS
+ have_library("ws2_32", "WSACleanup")
+ else
+ have_library("wsock32", "WSACleanup")
+ end
when /cygwin/
test_func = "socket"
when /beos/