summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-01 07:59:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-01 07:59:21 +0000
commit05e2da638f2fbb5da018c9585dea066e9de5f979 (patch)
treeade7bb3aaf7a6a39d238db1e380d724a9679dff3 /ext/socket/extconf.rb
parentb5be93097941c246fd43218e810b7be2ec2955a4 (diff)
* ext/socket/extconf.rb: add arguments for macro calls.
[ruby-core:41370] [Bug#5681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 473f89f..5ff0f98 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -6,7 +6,6 @@ case RUBY_PLATFORM
when /(ms|bcc)win(32|64)|mingw/
test_func = "WSACleanup"
have_library("ws2_32", "WSACleanup")
- $defs << "-DHAVE_SOCKETPAIR"
when /cygwin/
test_func = "socket"
when /beos/
@@ -430,9 +429,10 @@ if getaddr_info_ok == :wide or
$defs << "-DGETADDRINFO_EMU"
end
-have_func("inet_ntop") or have_func("inet_ntoa")
-have_func("inet_pton") or have_func("inet_aton")
-have_func("getservbyport")
+have_func('inet_ntop(0, (const void *)0, (char *)0, 0)') or
+ have_func("inet_ntoa(*(struct in_addr *)NULL)")
+have_func('inet_pton(0, "", (void *)0)') or have_func('inet_aton("", (struct in_addr *)0)')
+have_func('getservbyport(0, "")')
have_header("arpa/nameser.h")
have_header("resolv.h")
@@ -482,8 +482,8 @@ $distcleanfiles << "constants.h" << "constdefs.*"
if have_func(test_func)
have_func("hsterror")
have_func("getipnodebyname") or have_func("gethostbyname2")
- have_func("socketpair") unless $defs.include?("-DHAVE_SOCKETPAIR")
- unless have_func("gethostname")
+ have_func("socketpair(0, 0, 0, 0)")
+ unless have_func("gethostname((char *)0, 0)")
have_func("uname")
end
if enable_config("socks", ENV["SOCKS_SERVER"])