summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-13 12:41:12 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-13 12:41:12 +0000
commit84775721bcd0b4b7330e0743fe3d53d9522ae858 (patch)
tree309b499c8376b0cc9f0dcb9a020a4efb4e034dd9 /ext/socket/extconf.rb
parente1809a0cedfd948bdc229653b5e8b0d5972d114e (diff)
* ext/socket/socket.c (rb_getaddrinfo): use getaddrinfo with GVL if
getaddrinfo.c/getnameinfo.c is used. They are not thread safe because gethostbyname/gethostbyaddr is used. (rb_getnameinfo): ditto. * extconf.rb: define GETADDRINFO_EMU if getaddrinfo.c/getnameinfo.c is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 06011d6..443dd7d 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -251,6 +251,7 @@ unless getaddr_info_ok and have_func("getnameinfo", headers) and have_func("geta
$CPPFLAGS="-I. "+$CPPFLAGS
$objs += ["getaddrinfo.#{$OBJEXT}"]
$objs += ["getnameinfo.#{$OBJEXT}"]
+ $defs << "-DGETADDRINFO_EMU"
have_func("inet_ntop") or have_func("inet_ntoa")
have_func("inet_pton") or have_func("inet_aton")
have_func("getservbyport")