From 2d958b7fb03e44e3d65347147e5781e55a8e3b72 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 27 Jan 2009 11:07:41 +0000 Subject: [PATCH] * ext/socket/init.c (socks_connect_blocking): moved from sockssocket.c. [ruby-dev:37834] * sockssocket.c (socks_init): don't omit "int" type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ ext/socket/init.c | 9 +++++++++ ext/socket/sockssocket.c | 11 +---------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14d3c54b54..63284a9a27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Jan 27 20:02:07 2009 Tanaka Akira + + * ext/socket/init.c (socks_connect_blocking): moved from + sockssocket.c. [ruby-dev:37834] + + * sockssocket.c (socks_init): don't omit "int" type. + Tue Jan 27 14:41:33 2009 Nobuyoshi Nakada * cygwin/GNUmakefile.in (RUBYDEF): needs DATA marks to export diff --git a/ext/socket/init.c b/ext/socket/init.c index 1859777e9e..a21c730030 100644 --- a/ext/socket/init.c +++ b/ext/socket/init.c @@ -333,6 +333,15 @@ connect_blocking(void *data) return (VALUE)connect(arg->fd, arg->sockaddr, arg->len); } +#if defined(SOCKS) && !defined(SOCKS5) +static VALUE +socks_connect_blocking(void *data) +{ + struct connect_arg *arg = data; + return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len); +} +#endif + int ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks) { diff --git a/ext/socket/sockssocket.c b/ext/socket/sockssocket.c index 640ddd2f4d..70a6b47562 100644 --- a/ext/socket/sockssocket.c +++ b/ext/socket/sockssocket.c @@ -10,20 +10,11 @@ #include "rubysocket.h" -#if defined(SOCKS) && !defined(SOCKS5) -static VALUE -socks_connect_blocking(void *data) -{ - struct connect_arg *arg = data; - return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len); -} -#endif - #ifdef SOCKS static VALUE socks_init(VALUE sock, VALUE host, VALUE serv) { - static init = 0; + static int init = 0; if (init == 0) { SOCKSinit("ruby");