summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-13 16:13:31 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-13 16:13:31 +0000
commit6d53b692ab91c8817736cdec78b388e6e4990806 (patch)
tree3a84f886c14e2a9a8fe65c664b4f4805e2cbc2d4 /ext/socket
parent9da4f78db46764be6dae5e7e83ff48cbecb3fb23 (diff)
support mingw32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/extconf.rb4
-rw-r--r--ext/socket/sockport.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 91ac8f6123..46d5120e2e 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -2,8 +2,8 @@ require 'mkmf'
$LDFLAGS += " -L/usr/local/lib" if File.directory?("/usr/local/lib")
$CFLAGS += " -Dss_family=__ss_family -Dss_len=__ss_len"
-case PLATFORM
-when /mswin32/
+case RUBY_PLATFORM
+when /mswin32|mingw/
test_func = "WSACleanup"
have_library("wsock32", "WSACleanup")
have_func("closesocket")
diff --git a/ext/socket/sockport.h b/ext/socket/sockport.h
index 1639fcf828..e3750816c6 100644
--- a/ext/socket/sockport.h
+++ b/ext/socket/sockport.h
@@ -40,4 +40,9 @@
# define SET_SIN_LEN(si,len)
#endif
+#ifndef IN_MULTICAST
+# define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
+# define IN_MULTICAST(i) IN_CLASSD(i)
+#endif
+
#endif