summaryrefslogtreecommitdiff
path: root/ext/socket/ipsocket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:48:22 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:48:22 +0000
commit172d20878955c7b8eca9ebc782dfa7e91340dc8c (patch)
tree66243818fc9ea9d53404f371b088c304e8e1bb21 /ext/socket/ipsocket.c
parenta6274c1e72689ad0425560a637f96beeb9e93ad2 (diff)
* ext/socket/ (rsock_make_hostent): renamed from sock_make_hostent.
(rsock_addrinfo): renamed from sock_addrinfo. (rsock_getaddrinfo): renamed from sock_getaddrinfo. (rsock_socket): renamed from ruby_socket. (rsock_sock_s_socketpair): renamed from sock_s_socketpair. (rsock_connect): renamed from ruby_connect. * ext/socket/socket.c (sock_listen): make it static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ipsocket.c')
-rw-r--r--ext/socket/ipsocket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index 23b87f4..78c8576 100644
--- a/ext/socket/ipsocket.c
+++ b/ext/socket/ipsocket.c
@@ -46,19 +46,19 @@ init_inetsock_internal(struct inetsock_arg *arg)
int fd, status = 0;
const char *syscall = 0;
- arg->remote.res = sock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM,
+ arg->remote.res = rsock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM,
(type == INET_SERVER) ? AI_PASSIVE : 0);
/*
* Maybe also accept a local address
*/
if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) {
- arg->local.res = sock_addrinfo(arg->local.host, arg->local.serv, SOCK_STREAM, 0);
+ arg->local.res = rsock_addrinfo(arg->local.host, arg->local.serv, SOCK_STREAM, 0);
}
arg->fd = fd = -1;
for (res = arg->remote.res; res; res = res->ai_next) {
- status = ruby_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
+ status = rsock_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
syscall = "socket(2)";
fd = status;
if (fd < 0) {
@@ -81,8 +81,8 @@ init_inetsock_internal(struct inetsock_arg *arg)
}
if (status >= 0) {
- status = ruby_connect(fd, res->ai_addr, res->ai_addrlen,
- (type == INET_SOCKS));
+ status = rsock_connect(fd, res->ai_addr, res->ai_addrlen,
+ (type == INET_SOCKS));
syscall = "connect(2)";
}
}
@@ -223,7 +223,7 @@ static VALUE
ip_s_getaddress(VALUE obj, VALUE host)
{
struct sockaddr_storage addr;
- struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0);
+ struct addrinfo *res = rsock_addrinfo(host, Qnil, SOCK_STREAM, 0);
/* just take the first one */
memcpy(&addr, res->ai_addr, res->ai_addrlen);