diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-22 07:35:02 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-22 07:35:02 +0000 |
commit | 7cb0f6c89c8a59e945862689abb3260611ca4703 (patch) | |
tree | 5fe7c28d0269ee6ce49fdf82d28da06adacbc658 /ext/socket | |
parent | e1ce2adf80fefc70da40c01842609310f20ae4bf (diff) | |
download | ruby-7cb0f6c89c8a59e945862689abb3260611ca4703.tar.gz ruby-7cb0f6c89c8a59e945862689abb3260611ca4703.tar.xz ruby-7cb0f6c89c8a59e945862689abb3260611ca4703.zip |
socket.c: oops, half-baked modifies were commited; backout
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/socket.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index dcd4cd7e0..f6d5e3341 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -973,7 +973,6 @@ static VALUE tcp_s_gethostbyname(obj, host) VALUE obj, host; { -#if 0 struct sockaddr_storage addr; struct hostent *h; char **pch; @@ -1086,33 +1085,6 @@ tcp_s_gethostbyname(obj, host) #endif return ary; -#else - - struct addrinfo hints, *res, *r; - VALUE ary, names; - int error; - - rb_secure(3); - MEMZERO(&hints, struct addrinfo, 1); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - r = res = ip_addrsetup(host, Qnil); - ary = rb_ary_new(); - rb_ary_push(ary, rb_tainted_str_new2(r->ai_canonname)); - r = r->ai_next; - names = rb_ary_new(); - rb_ary_push(ary, names); - rb_ary_push(ary, INT2NUM(res->ai_family)); - for (r = res; r; r = r->ai_next) { - if (r != res) { - rb_ary_push(names, rb_tainted_str_new2(r->ai_canonname)); - } - rb_ary_push(ary, mkipaddr(r->ai_addr)); - } - freeaddrinfo(res); - - return ary; -#endif } static VALUE |