From 1dea1927752dfb4e09b2db6fc13589eb16a7e336 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 5 Dec 2011 05:29:31 +0000 Subject: * include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert r33876. [ruby-core:41475] [Bug #5706] * ext/socket/extconf.rb: the alternative hack for [Bug #5675]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/extconf.rb | 4 +++- ext/socket/rubysocket.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/socket') diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 330ee39c5f..ba180c820e 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -483,7 +483,9 @@ $distcleanfiles << "constants.h" << "constdefs.*" if have_func(test_func) have_func("hsterror") have_func("getipnodebyname") or have_func("gethostbyname2") - have_func("socketpair(0, 0, 0, 0)") + if !have_func("socketpair(0, 0, 0, 0)") and have_func("rb_w32_socketpair(0, 0, 0, 0)") + $defs << "-Dsocketpair(a,b,c,d)=rb_w32_socketpair((a),(b),(c),(d))" + end unless have_func("gethostname((char *)0, 0)") have_func("uname") end diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index d6f990eed9..3e2f6c9565 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -4,7 +4,6 @@ #include "ruby/ruby.h" #include "ruby/io.h" #include "ruby/util.h" -#include "ruby/subst.h" #include "internal.h" #include #include -- cgit v1.2.3