зеркало из https://github.com/github/ruby.git
* ext/socket/extconf.rb: check recvmsg even if sendmsg is exists.
* ext/socket/socket.c (thread_read_select): restored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2a07445e0b
Коммит
26d111540e
|
@ -1,3 +1,9 @@
|
|||
Sun Oct 5 23:27:09 2003 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* ext/socket/extconf.rb: check recvmsg even if sendmsg is exists.
|
||||
|
||||
* ext/socket/socket.c (thread_read_select): restored.
|
||||
|
||||
Mon Oct 6 16:23:38 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* marshal.c (w_object): wrong method name in the message.
|
||||
|
|
|
@ -194,7 +194,7 @@ end
|
|||
have_header("netinet/tcp.h") if not /cygwin/ =~ RUBY_PLATFORM # for cygwin 1.1.5
|
||||
have_header("netinet/udp.h")
|
||||
|
||||
if have_func("sendmsg") or have_func("recvmsg")
|
||||
if have_func("sendmsg") | have_func("recvmsg")
|
||||
have_struct_member('struct msghdr', 'msg_control', header=['sys/types.h', 'sys/socket.h'])
|
||||
have_struct_member('struct msghdr', 'msg_accrights', header=['sys/types.h', 'sys/socket.h'])
|
||||
end
|
||||
|
|
|
@ -1502,6 +1502,19 @@ unix_send_io(sock, val)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_RECVMSG) && (defined(HAVE_ST_MSG_CONTROL) || defined(HAVE_ST_MSG_ACCRIGHTS))
|
||||
static void
|
||||
thread_read_select(fd)
|
||||
int fd;
|
||||
{
|
||||
fd_set fds;
|
||||
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
rb_thread_select(fd+1, &fds, 0, 0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
unix_recv_io(argc, argv, sock)
|
||||
int argc;
|
||||
|
|
Загрузка…
Ссылка в новой задаче