* 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
This commit is contained in:
akr 2009-01-27 11:07:41 +00:00
parent 9c29032c73
commit 2d958b7fb0
3 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,10 @@
Tue Jan 27 20:02:07 2009 Tanaka Akira <akr@fsij.org>
* 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 <nobu@ruby-lang.org> Tue Jan 27 14:41:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* cygwin/GNUmakefile.in (RUBYDEF): needs DATA marks to export * cygwin/GNUmakefile.in (RUBYDEF): needs DATA marks to export

View File

@ -333,6 +333,15 @@ connect_blocking(void *data)
return (VALUE)connect(arg->fd, arg->sockaddr, arg->len); 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 int
ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks) ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
{ {

View File

@ -10,20 +10,11 @@
#include "rubysocket.h" #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 #ifdef SOCKS
static VALUE static VALUE
socks_init(VALUE sock, VALUE host, VALUE serv) socks_init(VALUE sock, VALUE host, VALUE serv)
{ {
static init = 0; static int init = 0;
if (init == 0) { if (init == 0) {
SOCKSinit("ruby"); SOCKSinit("ruby");