diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-13 16:13:31 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-13 16:13:31 +0000 |
commit | 3d9582b7f1fe2647d0d68ab55ccc2223c7cbd389 (patch) | |
tree | 3a84f886c14e2a9a8fe65c664b4f4805e2cbc2d4 /ext/socket | |
parent | a6dcd4ff38476c301f3385a3999fb6452bd462c7 (diff) | |
download | ruby-3d9582b7f1fe2647d0d68ab55ccc2223c7cbd389.tar.gz ruby-3d9582b7f1fe2647d0d68ab55ccc2223c7cbd389.tar.xz ruby-3d9582b7f1fe2647d0d68ab55ccc2223c7cbd389.zip |
support mingw32.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/extconf.rb | 4 | ||||
-rw-r--r-- | ext/socket/sockport.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 91ac8f612..46d5120e2 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 1639fcf82..e3750816c 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 |