ruby-changes:21870
From: nobu <ko1@a...>
Date: Thu, 1 Dec 2011 17:00:57 +0900 (JST)
Subject: [ruby-changes:21870] nobu:r33919 (trunk): * ext/socket/extconf.rb: add arguments for macro calls.
nobu 2011-12-01 16:59:21 +0900 (Thu, 01 Dec 2011) New Revision: 33919 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33919 Log: * ext/socket/extconf.rb: add arguments for macro calls. [ruby-core:41370] [Bug#5681] Modified files: trunk/ChangeLog trunk/ext/socket/extconf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 33918) +++ ChangeLog (revision 33919) @@ -1,3 +1,8 @@ +Thu Dec 1 16:59:24 2011 Nobuyoshi Nakada <nobu@r...> + + * ext/socket/extconf.rb: add arguments for macro calls. + [ruby-core:41370] [Bug#5681] + Thu Dec 1 16:20:16 2011 Nobuyoshi Nakada <nobu@r...> * lib/mkmf.rb (MakeMakefile#try_func): fix broken patch at r33834. Index: ext/socket/extconf.rb =================================================================== --- ext/socket/extconf.rb (revision 33918) +++ ext/socket/extconf.rb (revision 33919) @@ -6,7 +6,6 @@ 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 @@ $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 @@ 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"]) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/