summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-04 09:33:39 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-04 09:33:39 +0000
commit9ba6e0738a1455d4a9079c391953148df9316065 (patch)
treec51a55852b484bd1d797f2af9c5311ddebc826ce /ext/socket/extconf.rb
parent1320f85fb0afffddfcded7c726ac4d1fa41a64e7 (diff)
* ext/socket/extconf.rb: The IPv6 stack of Cygwin is still incomplete.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 11639c0b0d..29f9b5d189 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -62,7 +62,8 @@ else
end
$ipv6 = false
-if enable_config("ipv6", true)
+default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
+if enable_config("ipv6", default_ipv6)
if try_link(<<EOF)
#include <sys/types.h>
#include <sys/socket.h>
@@ -160,7 +161,7 @@ end
#ifdef _WIN32
# include <windows.h>
# include <winsock.h>
-#endif
+#else
# include <sys/types.h>
# include <netdb.h>
# include <string.h>
@@ -219,7 +220,7 @@ EOF
$CFLAGS="-DHAVE_SA_LEN "+$CFLAGS
end
-have_header("netinet/tcp.h") if not /cygwin/ === RUBY_PLATFORM # for cygwin 1.1.5
+have_header("netinet/tcp.h") if not /cygwin/ =~ RUBY_PLATFORM # for cygwin 1.1.5
have_header("netinet/udp.h")
have_struct_member('struct msghdr', 'msg_control', header=['sys/types.h', 'sys/socket.h'])