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 | 2c8151010ea62e4c274798e993e77bcbb3f2d386 (patch) | |
tree | 5fe7c28d0269ee6ce49fdf82d28da06adacbc658 | |
parent | 9ef87823fa8d26baffabaac855321102f9e0291c (diff) | |
download | ruby-2c8151010ea62e4c274798e993e77bcbb3f2d386.tar.gz |
socket.c: oops, half-baked modifies were commited; backout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 dcd4cd7e01..f6d5e33412 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 |