Граф коммитов

2853 Коммитов

Автор SHA1 Сообщение Дата
akr 7a01268aeb * ext/socket/basicsocket.c (bsock_getpeereid): implemented for Solaris
using getpeerucred.

* ext/socket/extconf.rb: check ucred.h and getpeerucred.

* ext/socket/rubysocket.h: include ucred.h if available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12 12:43:04 +00:00
nobu ee159271dd * ext/stringio/stringio.c (strio_ungetc): calculates new position
before reallocation.  [Bug#1099]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12 08:17:53 +00:00
akr a2c779be35 update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 08:49:49 +00:00
akr 83eddaad27 * ext/socket/lib/socket.rb (Socket.udp_server_sockets): call the block
if given.  close the sockets when the block exits.
  (Socket.udp_server_loop): use udp_server_sockets in block form.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 08:39:57 +00:00
akr b9d2a43990 * ext/socket/lib/socket.rb (Socket.tcp_server_sockets): call the block
if given.  close the sockets when the block exits.
  (Socket.tcp_server_loop): use tcp_server_sockets in block form.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 08:35:35 +00:00
akr d27c1748cd rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 08:13:20 +00:00
akr 630e4ef492 * ext/socket/lib/socket.rb (Socket.unix_server_loop): use
unix_server_socket with a block.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 08:03:17 +00:00
akr 3f0d724dc3 * ext/socket/lib/socket.rb (Socket.unix_server_socket): close the
socket when the block exits.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 07:54:52 +00:00
akr 0a954e9117 * ext/socket/lib/socket.rb (Socket.unix_server_socket): call the block
if given.  remove the socket file when the block exits.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 07:51:53 +00:00
akr ff955766d4 * ext/socket/ancdata.c (ancillary_s_ip_pktinfo): make 3rd argument
optional.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 07:44:53 +00:00
akr 4b036bb69b * ext/socket/ancdata.c (anc_inspect_socket_rights): return 1 on
success.  0 on failure.
  (anc_inspect_passcred_credentials): ditto.
  (anc_inspect_socket_creds): ditto.
  (anc_inspect_socket_creds): ditto.
  (anc_inspect_socket_creds): ditto.
  (anc_inspect_ip_recvdstaddr): ditto.
  (anc_inspect_ip_pktinfo): ditto.
  (anc_inspect_ipv6_pktinfo): ditto.
  (ancillary_inspect): check family.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 05:10:47 +00:00
akr f871e8cf0d update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 04:29:12 +00:00
akr c7a66ff804 * ext/socket/ancdata.c (anc_inspect_ip_pktinfo): make result bit
succinct.
  (Init_ancdata): fix number of arguments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 03:56:13 +00:00
akr fa65ca097b * ext/socket/ipsocket.c (Init_ipsocket): undef getpeereid at IPSocket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 02:48:08 +00:00
akr b4e50055c3 * ext/socket/extconf.rb: check getpeereid.
* ext/socket/basicsocket.c (bsock_getpeereid): new method.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 01:22:08 +00:00
akr b8147c444b * ext/socket/lib/socket.rb (Socket::UDPSource#inspect): fix variable
name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 00:59:30 +00:00
akr be25c48638 * ext/socket/socket.c (sock_gethostname): use HOST_NAME_MAX.
* ext/socket/raddrinfo.c (make_ipaddr): local variable renamed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 15:39:16 +00:00
akr 2ee0859119 * ext/socket/init.c (struct recvfrom_arg): use struct
sockaddr_storage.
  (recvfrom_blocking): follow struct recvfrom_arg change.
  (s_recvfrom): ditto.
  (s_recvfrom_nonblock): use struct sockaddr_storage.

* ext/socket/socket.c (sock_accept): use struct sockaddr_storage.
  (sock_accept_nonblock): ditto.
  (sock_sysaccept): ditto.

* ext/socket/ancdata.c (bsock_recvmsg_internal): use struct
  sockaddr_storage.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 14:46:51 +00:00
akr 6245caf58c * ext/socket/basicsocket.c (bsock_getpeername): use struct
sockaddr_storage.
  (bsock_local_address): ditto.
  (bsock_remote_address): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 14:31:21 +00:00
akr 1463f1dfe7 * ext/socket/lib/socket.rb (Socket.udp_server_sockets): new method.
(Socket.udp_server_loop_on): new method.
  (Socket.udp_server_loop): new method
  (Socket.ip_sockets_port0): extracted from tcp_server_sockets_port0.
  (Socket::UDPSource): new class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 12:38:16 +00:00
akr a038fab649 * ext/socket/socket.c (sockaddr_obj): fill pfamily.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 12:15:54 +00:00
akr 98d3eca7fc * ext/socket/option.c (sockopt_s_bool): new method.
(sockopt_bool): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 12:09:57 +00:00
akr 939efe7d4c * ext/socket/option.c (sockopt_family_m): renamed from sockopt_family.
(sockopt_level_m): renamed from sockopt_level.
  (sockopt_optname_m): renamed from sockopt_optname.
  (inspect_local_peercred): follow the renaming.
  (Init_sockopt): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 11:59:04 +00:00
akr ba75dd6b95 * ext/socket/ancdata.c (anc_inspect_socket_creds): refactored to avoid
a rb_str_cat2 call.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 11:57:07 +00:00
knu df0f575e1d Fix grammos regarding the verb "refer".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 08:55:40 +00:00
nobu 160c230f94 * ext/socket/option.c (inspect_local_peercred): constfied.
* ext/socket/ancdata.c (anc_inspect_socket_creds): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 03:57:23 +00:00
akr 2acc18ad99 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 00:18:53 +00:00
akr c6ea437727 * ext/socket/ancdata.c (ip_cmsg_type_to_sym): renamed from
cmsg_type_to_sym.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 16:29:16 +00:00
akr b877fc2f15 * ext/socket/option.c (sockopt_inspect): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 16:23:36 +00:00
akr 97ba0d4aa7 * ext/socket/mkconstants.rb: generate intern_family_noprefix.
* ext/socket/option.c (sockopt_inspect): use intern_family_noprefix
  not to show AF_ prefix.

* ext/socket/ancdata.c (ancillary_inspect): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 16:03:08 +00:00
akr 810dd43a20 * ext/socket/constants.c (level_arg): use unknown_level_to_int for
non internet protocol.
  (optname_arg): use only so_optname_to_int for non internet protocol.
  (cmsg_type_arg): use only scm_optname_to_int for non internet
  protocol.

* ext/socket/mkconstants.rb: generate unknown_level_to_int.
  rename iplevel_to_int to ip_level_to_int.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 14:23:53 +00:00
akr 2dd3fa9f3e * ext/socket/mkconstants.rb: rename level_to_int to iplevel_to_int.
rename intern_level to intern_iplevel.

* ext/socket/constants.c: follow the renaming.

* ext/socket/option.c: ditto.

* ext/socket/ancdata.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 14:05:37 +00:00
akr f5da7031b9 * ext/socket/rubysocket.h (level_arg): add family argument.
(optname_arg): ditto.
  (cmsg_type_arg): ditto.
  (rb_sock_getfamily): declared.

* ext/socket/constants.c (level_arg): add family argument.
  (optname_arg): ditto.
  (cmsg_type_arg): ditto.

* ext/socket/init.c (rb_sock_getfamily): defined.

* ext/socket/option.c (sockopt_initialize): give family for level_arg
  and optname_arg.
  (sockopt_s_int): ditto.

* ext/socket/basicsocket.c (bsock_setsockopt): ditto.
  (bsock_getsockopt): ditto.

* ext/socket/ancdata.c (ancillary_initialize): ditto.
  (ancillary_s_int): ditto.
  (ancillary_cmsg_is_p): ditto.
  (bsock_sendmsg_internal): ditto.
  (bsock_recvmsg_internal): use rb_sock_getfamily.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 13:56:43 +00:00
akr 2092fbcc3a rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 12:52:11 +00:00
akr ecfea8e28e * ext/socket/ancdata.c (ancillary_inspect): show address family.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 12:49:24 +00:00
akr 8977fe1e36 * ext/socket/basicsocket.c (bsock_getsockname): use sockaddr_storage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 11:19:57 +00:00
nobu a9a17a5a44 * ext/win32ole/win32ole.c (load_conv_function51932): fixed for the
case IMultiLanguage is not available.  [ruby-dev:37950]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 11:11:57 +00:00
akr 7ad3567934 * ext/socket/option.c (inspect_int): return 1/0 on success/failure.
(inspect_uint): ditto.
  (inspect_linger): ditto.
  (inspect_socktype): ditto.
  (inspect_timeval): ditto.
  (inspect_peercred): ditto.
  (inspect_local_peercred): ditto.
  (sockopt_inspect): refactored.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 11:04:51 +00:00
akr bee960d4e9 * ext/socket/mkconstants.rb: more constants for Solaris.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 11:00:45 +00:00
akr 7d63280c17 * ext/socket/basicsocket.c (bsock_getsockopt): refine address family
examination.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 10:59:55 +00:00
akr 48de4753d1 * ext/socket/option.c (sockopt_initialize): argument conversion
reordered.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 10:52:55 +00:00
akr fd9c7e8af1 * ext/socket/ancdata.c (ancillary_initialize): add family argument.
(ancdata_new): ditto.
  (ancillary_s_int): ditto.
  (ancillary_family): new function.
  (ancillary_family_m): new method.
  (ancillary_s_ip_pktinfo): follow ancdata_new change.
  (ancillary_s_ipv6_pktinfo): ditto.
  (bsock_recvmsg_internal): examine the socket address family.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 10:49:16 +00:00
akr 70f7660196 * ext/socket/option.c (inspect_local_peercred): check version.
(sockopt_inspect): suppress warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 00:06:41 +00:00
akr 64f12a46d5 * ext/socket/option.c (inspect_peercred): struct ucred contains
effective uid/gid.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 17:04:40 +00:00
akr 2992642245 LOCAL_PEERCRED is also available on MacOS X.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:49:35 +00:00
akr d0454a211e * ext/socket/option.c (sockopt_inspect): add ifdef guard for
LOCAL_PEERCRED.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:45:15 +00:00
akr f11d2b55f7 * ext/socket/option.c (inspect_local_peercred): cr_uid is a effective
uid, not a real uid.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:42:17 +00:00
akr 9e45748143 * ext/socket/extconf.rb: check sys/param.h and sys/ucred.h.
* ext/socket/rubysocket.h: include sys/param.h and sys/ucred.h.

* ext/socket/option.c (inspect_local_peercred): new function to show
  LOCAL_PEERCRED socket option on FreeBSD.
  (sockopt_inspect): show as LOCAL_* socket option if AF_UNIX and level
  is 0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:37:55 +00:00
akr c02ce88762 * ext/socket/rubysocket.h (sockopt_new): add family argument.
* ext/socket/option.c (sockopt_initialize): add vfamily argument.
  (sockopt_new): add family argument and record it in the object.
  (sockopt_family): new method.
  (sockopt_s_int): add vfamily argument.
  (sockopt_inspect): show family.

* ext/socket/basicsocket.c (bsock_getsockopt): check address family
  using getsockname.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:12:27 +00:00
akr 8f9d6d1863 * ext/socket/option.c (inspect_peercred): new function to show
SO_PEERCRED socket option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 14:23:16 +00:00
akr 411e9997d2 * ext/socket/extconf.rb: check struct cmsgcred.
* ext/socket/ancdata.c (anc_inspect_passcred_credentials): add
  "(ucred)".
  (anc_inspect_socket_creds): show struct cmsgcred too, for FreeBSD.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 12:53:55 +00:00
akr e960cf417a * ext/socket/extconf.rb: check struct sockcred.
* ext/socket/ancdata.c (anc_inspect_socket_creds): new function to
  show SCM_CREDS on NetBSD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 11:36:18 +00:00
akr aa28707309 more constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 10:24:51 +00:00
akr a23547cafa * ext/socket/ancdata.c (anc_inspect_passcred_credentials): new
function to show SCM_CREDENTIALS on GNU/Linux.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 09:47:00 +00:00
akr 03149710e8 * ext/socket/raddrinfo.c (init_unix_addrinfo): add socktype argument.
(addrinfo_initialize): follow init_unix_addrinfo change.
  (addrinfo_s_unix): add optional argument: socktype



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 04:53:17 +00:00
akr e3cc17a3ac fix rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 02:10:57 +00:00
nobu 7c93e56560 * lib/mkmf.rb (have_header): needs dependent headers if trying to
compile.

* ext/socket/extconf.rb: net/if.h depends on other headers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 02:44:07 +00:00
nobu 641bdd84ef * ext/openssl/ossl_cipher.c (add_cipher_name_to_ary): used
conditionally.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 15:29:39 +00:00
akr 1bd6111488 * ext/pty/pty.c (chfunc): type fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 22:53:44 +00:00
akr 74063bf4d3 * include/ruby/intern.h (rb_run_exec_options_err): renamed from
rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): declared with 1.9.1 compatible signature.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* process.c (rb_run_exec_options_err): renamed from
  rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): defined.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* io.c: follow above change.

* ext/pty/pty.c: follow above change.

  [ruby-dev:37893]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:33:19 +00:00
akr 88f04bdd32 * ext/socket: AddrInfo is renamed to Addrinfo. [ruby-dev:37876]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:01:43 +00:00
kazu 37131afdd3 * ext/readline/readline.c (Init_readline): entry may be NULL.
[ruby-dev:37891]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 22:42:06 +00:00
akr 5ce10c1359 * ext/socket/socket.c (sock_s_socketpair): make 3rd argument optional.
* ext/socket/unixsocket.c (unix_s_socketpair): follow the above
  change.

* ext/socket/rubysocket.h (sock_s_socketpair): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 16:20:05 +00:00
akr 9dfc90dc70 * ext/socket/raddrinfo.c (addrinfo_ipv6_to_ipv4): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 15:10:03 +00:00
akr 12a5cf8287 revert useless change part in the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 16:40:42 +00:00
akr 20ac101dae * ext/socket/extconf.rb: fix struct in_pktinfo and struct in6_pktinfo
detection.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 16:29:23 +00:00
akr 9274fbfae9 * ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): skip
socket creation error.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 15:21:42 +00:00
kouji d60cd5b379 * ext/readline/extconf.rb: checked rl_set_screen_size and
rl_get_screen_size.

* ext/readline/readline.c (readline_s_set_screen_size): added
  Readline.set_screen_size.

* ext/readline/readline.c (readline_s_get_screen_size): added
  Readline.get_screen_size.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:21:08 +00:00
kouji 4a2b6b2067 * ext/readline/readline.c: updated year of copyright.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:17:26 +00:00
kouji dbf657caad * ext/readline/readline.c (readline_s_set_completion_proc): set
default if proc is nil. fix #1095


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:15:20 +00:00
akr 24eafe8376 * ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): new
private function for allocating same port both IPv4 and IPv6.
  (Socket.tcp_server_sockets): use tcp_server_sockets_port0 for port 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 07:25:57 +00:00
akr 13a468db17 * ext/socket/lib/socket.rb (Socket.tcp_server_sockets): extracted from
Socket.tcp_server_loop.
  (Socket.accept_loop): ditto.
  (Socket.unix_server_socket): extracted from Socket.unix_server_loop.
  (Socket.unix_server_loop): use Socket.accept_loop.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:36:43 +00:00
nobu b256c5fb8f * ext/socket/extconf.rb (in_pktinfo, in6_pktinfo),
ext/socket/ancdata.c: defined in w32api/ws2tcpip.h on cygwin but
  cannot compile for some reason.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 22:58:03 +00:00
akr e53c88a44f rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 22:31:50 +00:00
akr 9946e700c1 * ext/socket/raddrinfo.c (Init_addrinfo): add AddrInfo#to_s as an
alias of AddrInfo#to_sockaddr.

* ext/socket/option.c (Init_sockopt): add Socket::Option#to_s as an
  alias of Socket::Option#data.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 14:44:28 +00:00
akr 29bd89281b * ext/socket/ancdata.c (cmsg_type_to_sym): add #ifdef for no IPv6
environment.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 08:12:10 +00:00
akr 5ad05f37a5 * ext/socket/socket.c (sock_initialize): make 3rd argument, protocol,
optional.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 05:55:56 +00:00
usa 57d85f32f5 * ext/socket/constants.c (cmsg_type_arg): INET6 check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 05:23:23 +00:00
akr b41a9abb6a * ext/socket/option.c: use INET6 instead of IPV6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 05:18:55 +00:00
usa bf23d53b94 * ext/socket/{options,raddrinfo}.c: use INET6 instead of AF_INET6 for
VC++6.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 03:48:31 +00:00
akr 61fc0c6cf4 * ext/socket/rubysocket.h (cmsg_type_arg): declared.
(Init_ancdata): ditto.

* ext/socket/init.c (Init_socket_init): call Init_ancdata.

* ext/socket/constants.c (cmsg_type_arg): defined.

* ext/socket/depend: add dependency for ancdata.o.

* ext/socket/mkconstants.rb: generate scm_optname_to_int.
  more constants.

* ext/socket/extconf.rb: add ancdata.o.

* ext/socket/ancdata.c: new file.  new method
  BasicSocket#{sendmsg,sendmsg_nonblock,recvmsg,recvmsg_nonblock}



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 02:51:02 +00:00
akr ef9206bbea * ext/socket/rubysocket.h (rb_cSockOpt): declared.
(sockopt_new): ditto.
  (Init_sockopt): ditto.

* ext/socket/init.c (Init_socket_init): call Init_sockopt.

* ext/socket/depend: add dependency for option.o

* ext/socket/mkconstants.rb: generate intern_level, intern_so_optname,
  intern_ip_optname, intern_ipv6_optname, intern_tcp_optname,
  intern_udp_optname and intern_scm_optname.

* ext/socket/extconf.rb: add option.o.

* ext/socket/basicsocket.c (bsock_setsockopt): accept Socket::Option
  object.
  (bsock_getsockopt): return Socket::Option object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 01:53:02 +00:00
nobu 2478f1caaf * lib/xmlrpc/server.rb (Server#serve): gets rid of hardcoded
platform names.

* lib/resolv.rb (Resolv::Hosts::DefaultFileName),
  (Resolv::DNS::Config.default_config_hash): tries win32/resolv on
  mswin64 too.

* lib/rubygems/specification.rb (Gem::Specification#ruby_code):
  aded mswin64.

* lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command):
  spawn is better to start a process in background.

* ext/extmk.rb: uses FNM_SYSCASE.

* instruby.rb: installs win32.h on mswin64 platform.
  [ruby-core:21722]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 23:12:52 +00:00
akr f1137963e3 * ext/socket/raddrinfo.c (addrinfo_ipv4_private_p): new method.
(addrinfo_ipv4_loopback_p): ditto.
  (addrinfo_ipv4_multicast_p): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 12:28:50 +00:00
akr 849e730f15 * ext/socket/raddrinfo.c (addrinfo_ipv6_unspecified_p): new method.
(addrinfo_ipv6_loopback_p): ditto.
  (addrinfo_ipv6_multicast_p): ditto.
  (addrinfo_ipv6_linklocal_p): ditto.
  (addrinfo_ipv6_sitelocal_p): ditto.
  (addrinfo_ipv6_v4mapped_p): ditto.
  (addrinfo_ipv6_v4compat_p): ditto.
  (addrinfo_ipv6_mc_nodelocal_p): ditto.
  (addrinfo_ipv6_mc_linklocal_p): ditto.
  (addrinfo_ipv6_mc_sitelocal_p): ditto.
  (addrinfo_ipv6_mc_orglocal_p): ditto.
  (addrinfo_ipv6_mc_global_p): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 11:09:51 +00:00
kouji 374e2f34b1 * ext/curses/curses.c (Init_curses): Curses#crmode and
Curses#nocrmode changes to the module function. 
  fix #916


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 07:12:45 +00:00
usa 68db4a3464 * ext/socket/spclet.c (socket_s_ip_address_list): support Windows XP
or later. (Win2k or earlier is still not supported)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-29 02:25:39 +00:00
usa 17bd806aea * ext/zlib/zlib.c (zstream_run): previous change didn't resolve the
problem.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 15:26:03 +00:00
usa f80356eb91 * ext/zlib/zlib.c (zstream_run): desperately guard the variable.
[ruby-core:20576]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 13:55:13 +00:00
nobu 186f7fe9cf properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 22:22:34 +00:00
akr 2d958b7fb0 * 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
2009-01-27 11:07:41 +00:00
naruse 7cefea6ff4 * ext/ripper/depend: use VPATH.
If a platform doesn't support VPATH, Ruby doesn't support it:
  for exapmle MSYS. [ruby-core:21570]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 04:02:53 +00:00
naruse 6f39590aff * ext/ripper/depend: lex.c's correct path is ../../lex.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 03:24:17 +00:00
matz 0fff7aa624 * ext/ripper/depend: fixed dependency path to lex.c.
[ruby-core:21570]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-26 19:06:39 +00:00
akr efdef4dbe2 * ext/socket/socket.c (socket_s_ip_address_list): renamed from
socket_s_list_ip_address.  [ruby-dev:37806]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-25 07:36:45 +00:00
nobu 45c4ae9b8b * ext/socket/socket.c (socket_s_list_ip_address): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-25 03:33:54 +00:00
technorama 7361a2ecb3 * ext/openssl/ossl_ssl.c: Server Name Indication support.
new methods SSLContext#server_name_cb=, SSLSocket#hostname=.

* test/openssl/test_ssl.rb: Tests for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-24 21:45:42 +00:00
nobu 044965df97 * ext/socket/extconf.rb ($distcleanfiles): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 08:02:41 +00:00
nobu d597a39042 * ext/socket/extconf.rb ($distcleanfiles): removes constdefs.[ch].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 07:57:41 +00:00
akr bd3cdcf394 * ext/socket/socket.c (socket_s_list_ip_address): new method.
(sockaddr_obj): new function.

* ext/socket/rubysocket.h: include ifaddrs.h, sys/ioctl.h,
  sys/sockio.h, net/if.h if available.
  (addrinfo_new): declared.

* ext/socket/raddrinfo.c (addrinfo_new): exported.

* ext/socket/extconf.rb: check ifaddrs.h, sys/ioctl.h, sys/sockio.h,
  net/if.h and getifaddrs.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 11:19:09 +00:00
akr 9ffca4659b * ext/socket/rubysocket.h (pseudo_AF_FTIP): moved from mkconstants.rb.
* ext/socket/mkconstants.rb: prepend header if -H is not given.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 11:06:22 +00:00
naruse 3c13fd9be0 * ext/nkf/nkf-utf8/nkf.c (nkf_buf): use nkf_char.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 08:59:06 +00:00
nobu 11c00acf8e * cont.c (ruby_Init_{Continuation_body,Fiber_as_Coroutine}): prefixed
with ruby_ to export.

* ext/continuation/continuation.c, ext/fiber/fiber.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 07:17:28 +00:00
usa 2ad3120ea6 * ext/nkf/nkf-utf8/nkf.c (nkf_buf_push): maybe a bug.
* ext/nkf/nkf-utf8/nkf.c (options): no need to support help option.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 00:27:17 +00:00
naruse 13313688b2 * ext/nkf/nkf-utf8/nkf.c: Update nkf to 2.0.9.
revert -s meaning as Shift_JIS, etc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 18:52:42 +00:00
akr 6d39bc3189 * ext/socket/mkconstants.rb (SOMAXCONN): defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 16:16:05 +00:00
akr b1956f058f * ext/socket/mkconstants.rb: use erb for generating code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 13:32:31 +00:00
nobu 2aa6644acd * ext/socket/rubysocket.h (rb_cUNIXSocket, rb_cUNIXServer),
(unixpath, unixaddr): UNIX domain sockets depend on sys/un.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 02:22:57 +00:00
nobu fb4bea8aaf * ext/socket/raddrinfo.c (addrinfo_ip_port): use AF_INET6 only when
defined, as well as addrinfo_ipv6_p().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 02:00:52 +00:00
usa f14e2a074a * ext/socket/depend: workaround for nmake. files in depend without
paths should converted by RULE_SUBST, but mkmf.rb cannot recognize
	  macros currently.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 01:35:57 +00:00
usa 80980a98b1 * ext/socket/raddrinfo.c (addrinfo_mdump, addrinfo_mload): support
UNIX socket only on platforms which support it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 00:23:48 +00:00
akr db881044bc * ext/socket/raddrinfo.c (addrinfo_inspect_sockaddr): new
method AddrInfo#inspect_sockaddr.
  (inspect_sockaddr): extracted from addrinfo_inspect.
  (addrinfo_inspect): use inspect_sockaddr.
  (Init_addrinfo): define the new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-18 08:03:24 +00:00
akr d620500dda * ext/socket/raddrinfo.c (addrinfo_ip_address): new method
AddrInfo#ip_address.
  (addrinfo_ip_port): new method AddrInfo#ip_port.
  (Init_addrinfo): define the methods above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-18 07:47:35 +00:00
akr 55bf8fa11c * ext/socket/unixsocket.c: redandant #ifdef removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-18 05:30:35 +00:00
akr ec52a63792 * ext/socket/raddrinfo.c (addrinfo_mdump): don't use symbol.
(addrinfo_mload): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 18:35:15 +00:00
akr 86aa5043d8 * ext/socket/raddrinfo.c (addrinfo_mdump): new method.
(addrinfo_mload): new method.
  (Init_addrinfo): define the method above.

* ext/socket/constants.c (constant_arg): str_to_int's first argument
  constified.

* ext/socket/mkconstants.rb (gen_name_to_int_decl): generated
  function's first argument constified.
  (gen_name_to_int_func_in_guard): ditto.
  (ipproto_to_int): generated.

* ext/socket/rubysocket.h (IS_IP_FAMILY): moved from raddrinfo.c.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 18:14:34 +00:00
akr e2f8800667 * ext/socket/socket.c (sock_s_getnameinfo): accept AddrInfo object.
* ext/socket/raddrinfo.c (rb_check_sockaddr_string_type): defined.

* ext/socket/rubysocket.h (rb_check_sockaddr_string_type): declared.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 16:39:03 +00:00
akr d4510f5973 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 15:40:30 +00:00
akr 52152a63aa * ext/socket/lib/socket.rb: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 13:04:03 +00:00
nobu 67da4aebc5 * configure.in (darwin): get rid of strange settings issue of
apple gcc port, which searches /usr/local/include always but
  /usr/local/lib not.

* ext/readline/readline.c (Init_readline): suppress warnings with
  libedit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 10:20:07 +00:00
akr 28028fc2b9 * ext/socket/mkconstants.rb: generate a header file for generated
functions.

* ext/socket/rubysocket.h: include constdefs.h.  don't declare
  generated functions.

* ext/socket/constants.c: include constdefs.c instead of constants.h.

* ext/socket/depend: dependency updated.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 10:19:03 +00:00
akr 9cd0874fc2 * ext/socket/raddrinfo.c (make_inspectname): add a res argument to
suppress numeric inspectname.
  (init_addrinfo_getaddrinfo): call make_inspectname here.
  (addrinfo_firstonly_new): follow make_inspectname change.
  (addrinfo_list_new): ditto.
  (addrinfo_initialize): follow init_addrinfo_getaddrinfo change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 06:03:42 +00:00
akr 32bbcc6d52 * ext/socket/mkconstants.rb: don't cause an error for duplicate names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 05:53:05 +00:00
akr 3f9d4f1fbd rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 05:52:16 +00:00
akr 97cbab78dc * ext/socket: split files for each class.
* ext/socket/rubysocket.h: common header.

* ext/socket/basicsocket.c: new file for BasicSocket.

* ext/socket/ipsocket.c: new file for IPSocket.

* ext/socket/tcpsocket.c: new file for TCPSocket.

* ext/socket/tcpserver.c: new file for TCPServer.

* ext/socket/sockssocket.c: new file for SOCKSSocket.

* ext/socket/udpsocket.c: new file for UDPSocket.

* ext/socket/unixsocket.c: new file for UNIXSocket.

* ext/socket/unixserver.c: new file for UNIXServer.

* ext/socket/socket.c: now for Socket.

* ext/socket/raddrinfo.c: new file for AddrInfo and name resolution.

* ext/socket/constants.c: new file for constants.

* ext/socket/init.c: new file for utilities.

* ext/socket/mkconstants.rb: export *_to_int.

* ext/socket/extconf.rb: add new object files.

* ext/socket/depend: add dependencies for new files.

* ext/.document: add new files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 04:11:27 +00:00
akr 6184d1d52a * ext/socket/socket.c: move addrinfo code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16 13:31:49 +00:00
akr aaddab6dea * ext/socket/socket.c (addrinfo_s_ip): new method AddrInfo.ip.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 17:06:37 +00:00
akr 3d829c8697 * gc.c (negative_size_allocation_error_with_gvl): abolish a warning.
(negative_size_allocation_error): ditto.

* ext/openssl/ossl.c (ossl_raise): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 13:39:17 +00:00
matz b949be82cf * ext/curses/extconf.rb: check ncursesw earlier than ncurses to
support UTF-8 strings.   non UTF-8 strings should be converted
  explicitly.   [ruby-core:21094]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 07:19:58 +00:00
nobu f188bf2acb * ext/socket/extconf.rb (gai_strerror): checks if available and if
returns const pointer.

* ext/socket/getaddrinfo.c (gai_strerror): defines only if non
  available.  [ruby-core:21328]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 04:09:05 +00:00
akr badd44845e * ext/socket/addrinfo.h (AI_NUMERICSERV): defined.
(AI_MASK): add AI_NUMERICSERV.

* ext/socket/getaddrinfo.c (getaddrinfo): support AI_NUMERICSERV.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 13:57:53 +00:00
akr 84775721bc * ext/socket/socket.c (rb_getaddrinfo): use getaddrinfo with GVL if
getaddrinfo.c/getnameinfo.c is used.  They are not thread safe
  because gethostbyname/gethostbyaddr is used.
  (rb_getnameinfo): ditto.

* extconf.rb: define GETADDRINFO_EMU if getaddrinfo.c/getnameinfo.c is
  used.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 12:41:12 +00:00
usa fc8835a5bb * ext/socket/{getaddrinfo,getnameinfo}.c: need to include ws2tcpip.h
on Windows.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 03:11:17 +00:00
duerst 654e94e1c9 Commit miss in previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 00:55:32 +00:00
usa 370ffc6a2a * ext/socket/extconf.rb: use headers instead of "netdb.h" in checking
getnameinfo() and getaddrinfo() because Windows doesn't have it.
	  see [ruby-dev:37757].

	* ext/socket/sockport.h (SA_LEN): use sockaddr_in6 when defined AF_INET6
	  if INET6 is not defined.  winsock2's getaddrinfo() returns
	  sockaddr_in6 if ipv6 is available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 17:59:45 +00:00
nagai 3f2b281eee * ext/tk/lib/tk.rb: use Encoding.find("locale") instaed of
Encoding.locale_charmap


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 17:10:02 +00:00
akr 91ff87c05d * ext/socket/socket.c (sock_s_unpack_sockaddr_in): check too short
sockaddr.
  (sock_s_unpack_sockaddr_un): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 16:00:03 +00:00
akr 73757753ae * ext/socket/socket.c (addrinfo_ip_unpack): new method
AddrInfo#ip_unpack.
  (addrinfo_unix_path): new method AddrInfo#unix_path.
  (Init_socket): define above methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 14:58:25 +00:00
akr 68552c4248 * ext/socket/socket.c (IS_IP_FAMILY): defined.
(addrinfo_ip_p): use it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 14:32:21 +00:00
akr 7099360a6c rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 06:57:54 +00:00
akr 5c94a67eca * ext/socket/mkconstants.rb: don't use bytesize because 1.9 dependent.
[ruby-core:21266]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 03:34:48 +00:00
nobu f914b5a7c2 * ext/socket/mkconstants.rb (c_str): get rid of a 1.9 feature for
cross compile.  [ruby-core:21243]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-11 00:53:03 +00:00
akr b802f1bb02 add constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-10 18:06:39 +00:00
akr 94c668f1ab rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-10 17:26:17 +00:00
akr 166c122fd3 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-10 17:16:51 +00:00
akr 7f52fa08b1 * ext/socket/mkconstants.rb: don't generate unintended newlines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-10 12:18:26 +00:00
akr 8a1261995e * ext/socket/mkconstants.rb: refactored to nest properly in statically
and dynamically.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-10 11:52:06 +00:00
akr ab8a2c7c1f * ext/socket/socket.c (sock_define_const): use INT2NUM.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-09 12:53:14 +00:00
usa f73dca932c * ext/socket/mkconstants.rb: define macro if default_value is passed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-09 06:41:07 +00:00
nagai c8b8db001b * ext/tk/lib/tk.rb: rescue abnormal Encoding.locale_charmap value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-09 04:21:28 +00:00
akr 80618e75aa * ext/socket/socket.c (bsock_shutdown): accept symbol/string as how.
(shutdown_how_arg): new function.

* ext/socket/mkconstants.rb: generate shutdown_how_to_int.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-08 14:20:47 +00:00
akr 2f31ea3c86 * ext/socket/mkconstants.rb (gen_name_to_int_func): generate
name_to_int functions, not only body.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-08 14:00:34 +00:00
akr c9ef4fc52f * ext/socket/socket.c: don't use AI_NUMERICSERV for platforms which
not define it as old Windows.
  [ruby-dev:37736]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-08 13:45:50 +00:00
akr 0dd41d0d78 * ext/socket/socket.c (init_unix_addrinfo): don't return a value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 22:53:41 +00:00
akr 3802c43ea1 * ext/socket/socket.c (addrinfo_getnameinfo): use NI_DGRAM if socktype
is SOCK_DGRAM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 15:27:09 +00:00
akr 69d908a10c * ext/socket/socket.c (host_str): add flags_ptr argument to specify
AI_NUMERICHOST if host is numeric form.
  (port_str): add flags_ptr argument to specify AI_NUMERICSERV if port
  is numeric form.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 15:21:43 +00:00
akr 55b2bf4dec * ext/socket/socket.c (rb_cAddrInfo): new class AddrInfo.
(s_recvfrom): return AddrInfo as address.
  (s_recvfrom_nonblock): ditto.
  (sock_accept): ditto.
  (sock_accept_nonblock): ditto.
  (sock_sysaccept): ditto.
  (bsock_send): accept AddrInfo as address argument.
  (sock_connect): ditto.
  (sock_connect_nonblock): ditto.
  (sock_bind): ditto.
  (sock_s_unpack_sockaddr_in): ditto.
  (sock_s_unpack_sockaddr_un): ditto.
  (bsock_local_address): new method BasicSocket#local_address.
  (bsock_remote_address): new method BasicSocket#remote_address.
  (addrinfo_initialize): new method AddrInfo#initialize.
  (addrinfo_inspect): new method AddrInfo#inspect.
  (addrinfo_afamily): new method AddrInfo#afamily.
  (addrinfo_pfamily): new method AddrInfo#pfamily.
  (addrinfo_socktype): new method AddrInfo#socktype.
  (addrinfo_protocol): new method AddrInfo#protocol.
  (addrinfo_to_sockaddr): new method AddrInfo#to_sockaddr.
  (addrinfo_canonname): new method AddrInfo#canonname.
  (addrinfo_ip_p): new method AddrInfo#ip?.
  (addrinfo_ipv4_p): new method AddrInfo#ipv4?.
  (addrinfo_ipv6_p): new method AddrInfo#ipv6?.
  (addrinfo_unix_p): new method AddrInfo#unix?.
  (addrinfo_getnameinfo): new method AddrInfo#getnameinfo.
  (addrinfo_s_getaddrinfo): new method AddrInfo.getaddrinfo.
  (addrinfo_s_tcp): new method AddrInfo.tcp.
  (addrinfo_s_udp): new method AddrInfo.udp.
  (addrinfo_s_unix): new method AddrInfo.unix.
  (Init_socket): define new class and methods.
  (sock_getaddrinfo): apply socktype hack regardless of ai_flags.
  (addrinfo_new): defined.
  (get_afamily): ditto.
  (fd_socket_addrinfo): ditto.
  (io_socket_addrinfo): ditto.
  (SockAddrStringValue): ditto.
  (SockAddrStringValuePtr): ditto.
  (sockaddr_string_value): ditto.
  (sockaddr_string_value_ptr): ditto.
  (rb_addrinfo_t): ditto.
  (addrinfo_mark): ditto.
  (addrinfo_free): ditto.
  (addrinfo_s_allocate): ditto.
  (IS_ADDRINFO): ditto.
  (check_addrinfo): ditto.
  (get_addrinfo): ditto.
  (alloc_addrinfo): ditto.
  (init_addrinfo): ditto.
  (addrinfo_new): ditto.
  (call_getaddrinfo): ditto.
  (init_addrinfo_getaddrinfo): ditto.
  (make_inspectname): ditto.
  (addrinfo_firstonly_new): ditto.
  (addrinfo_list_new): ditto.
  (init_unix_addrinfo): ditto.
  (ai_get_afamily): ditto.

* ext/socket/mkconstants.rb: generate intern_protocol_family,
  intern_socktype and intern_ipproto.

  [ruby-dev:37692]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 14:20:15 +00:00
nobu 3117bab125 * ext/socket/socket.c (ruby_getaddrinfo, ruby_getaddrinfo__aix):
constified.

* ext/socket/socket.c (ruby_getnameinfo__aix): protoized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 08:06:29 +00:00
nobu b5470fd243 * ext/socket/socket.c (io_call_close, io_close, pair_yield):
unused unless socketpair exists.

* ext/socket/getnameinfo.c (getnameinfo): moved conditinally used
  variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-06 10:18:44 +00:00
kazu 8dd121b5b7 * ext/curses/curses.c (free_window): use xfree instead of free.
[ruby-dev:37200]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 07:16:12 +00:00
kazu 8f86bc858f * ext/gdbm/gdbm.c (rb_gdbm_fetch): remove needless cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 06:53:42 +00:00
akr d4a0895181 * ext/socket/socket.c (rb_getaddrinfo): defined for address lookup without GVL.
(struct getaddrinfo_arg): defined.
  (nogvl_getaddrinfo): defined.
  (rb_getnameinfo): defined for name lookup without GVL.
  (getnameinfo_arg): defined.
  (nogvl_getnameinfo): defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 13:38:58 +00:00
nobu a7999ab13c * ext/extmk.rb (extmake): does not use both of makefile.rb and
extconf.rb at the same time.

* lib/mkmf.rb (DLLIB): depends on Makefile.  [ruby-core:21096]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 02:11:33 +00:00
nobu 9ac6838183 * ext/socket/socket.c (constant_arg): constified.
* ext/socket/socket.c (optname_arg): cygwin does not have
  IPPROTO_IPV6.

* ext/socket/mkconstants.rb (ipv6_optname_to_int): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 00:27:43 +00:00
akr d51c5a137f * ext/socket/socket.c: redundant #ifdef removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 19:34:17 +00:00
akr a900ab57de * ext/socket/socket.c: don't apply socktype hack [ruby-core:184] for
sock_s_getaddrinfo.
  (sock_getaddrinfo): add socktype_hack argument.
  (sock_addrinfo): call sock_getaddrinfo with socktype_hack.
  (sock_s_getaddrinfo): call sock_getaddrinfo without socktype_hack.
  [ruby-dev:37674]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 14:36:39 +00:00
akr e4b7c0e8a3 * ext/socket/mkconstants.rb: rename family_to_str to intern_family.
it returns ID now.

* ext/socket/socket.c (ipaddr): use intern_family.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 08:46:26 +00:00
akr b5aebd12c0 * ext/socket/mkconstants.rb: use ID in the values of
family_to_str_hash.  family_to_str returns a VALUE.

* ext/socket/socket.c (ipaddr): follow family_to_str change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 08:22:36 +00:00
akr 9ce8d4e3b9 * ext/socket/mkconstants.rb: refactored to gather stringizer
description.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 08:02:36 +00:00
akr 775d5d8f03 * ext/socket/mkconstants.rb: make common prefix optional.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 06:33:24 +00:00
akr d68b60741c * ext/socket/mkconstants.rb: use hash for family_to_str to avoid
linear search.  lenp argument removed.

* ext/socket/socket.c (ipaddr): call family_to_str without lenp
  argument.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 06:01:57 +00:00
akr 270f2034a7 * ext/socket/mkconstants.rb (gen_int_to_name): don't compare constants
in preprocessor because the constants may be enum.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 05:33:56 +00:00
akr 90a65796e7 * ext/socket/mkconstants.rb (gen_int_to_name): add lenp argument.
* ext/socket/socket.c (ipaddr): follow argument change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 05:12:14 +00:00
akr 28c2711230 * ext/socket/mkconstants.rb: check duplicates.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 19:43:49 +00:00
akr aa0ae0d3b6 * ext/socket/socket.c (optname_arg): defined.
(bsock_setsockopt): use optname_arg.
  (bsock_getsockopt): ditto.

* ext/socket/mkconstants.rb: generate so_optname_to_int,
  ip_optname_to_int, ipv6_optname_to_int, tcp_optname_to_int and
  udp_optname_to_int.
  more constants.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 17:40:41 +00:00
akr ff7e0f7f61 * ext/socket/socket.c (constant_arg): extracted from family_arg.
(family_arg): use constant_arg.
  (socktype_arg): ditto.
  (level_arg): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 17:09:35 +00:00
akr 59556a0849 * ext/socket/socket.c (level_arg): defined.
(bsock_setsockopt): use level_arg.
  (bsock_getsockopt): ditto.

* ext/socket/mkconstants.rb: generate level_to_int.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 16:16:08 +00:00
akr c6bbf28a9f * ext/socket/socket.c (family_arg): accept symbols as well.
(socktype_arg): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 15:59:10 +00:00
akr 31fa80dadd * ext/socket/socket.c (sock_s_getaddrinfo): use socktype_arg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 15:50:16 +00:00
akr f0dd0577b0 * ext/socket/socket.c (family_arg): extracted from
setup_domain_and_type.
  (socktype_arg): ditto.
  (udp_init): use family_arg.
  (sock_s_gethostbyaddr): ditto.
  (sock_s_getaddrinfo): ditto.
  (sock_s_getnameinfo): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 15:15:31 +00:00
akr e924cabede * ext/socket/socket.c (sock_s_getnameinfo): use family_to_int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 12:26:57 +00:00
akr 85d13f6165 * ext/socket/mkconstants.rb: check all alias possibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 12:09:34 +00:00
akr 48649d21c9 * ext/socket/mkconstants.rb: more possible aliases.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 12:00:13 +00:00
akr afb0581aa8 * ext/socket/mkconstants.rb: AF_ISO and AF_OSI may be aliased.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 11:55:05 +00:00
akr e485a566ed * ext/socket/socket.c (sock_s_getaddrinfo): use family_to_int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 11:47:55 +00:00
akr 6e4149f04a * ext/socket/socket.c: include constants.h at top.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 11:18:18 +00:00
akr 10bc6f8d49 * ext/socket/mkconstants.rb: add valp argument for family_to_int and
socktype_to_int.

* ext/socket/socket.c (setup_domain_and_type): use valp argument.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 10:54:38 +00:00
akr 175561f8dd * ext/socket/mkconstants.rb: generate family_to_str.
* ext/socket/socket.c (ipaddr): use family_to_str.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 10:37:41 +00:00
akr 9787d4faae * ext/socket/mkconstants.rb: generate socktype_to_int.
* ext/socket/socket.c (setup_domain_and_type): use socktype_to_int.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 08:38:14 +00:00
akr 009ad25fdd * ext/socket/socket.c (setup_domain_and_type): initialize ptr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 08:27:41 +00:00
akr 7454eab701 * ext/socket/mkconstants.rb: refine family_to_int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 08:03:36 +00:00
akr 0c838b4947 * ext/socket/mkconstants.rb: generate family_to_int().
* ext/socket/socket.c (setup_domain_and_type): use family_to_int.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 07:49:31 +00:00
akr 89cf0ec1a6 * ext/socket/mkconstants.rb: generate init_constants function.
* ext/socket/socket.c (Init_socket): call init_constants.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 07:09:19 +00:00
akr 2b3e480bef * ext/socket/mkconstants.rb (Socket::AF_INET6): moved from socket.c.
(Socket::PF_INET6): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 07:04:31 +00:00
akr 1c0e798d5c * ext/socket/mkconstants.rb: use erb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 06:28:34 +00:00
akr 212e90ce3a * ext/socket/mkconstants.rb: add -o option.
* ext/socket/depend: use mkconstants.rb with -o option.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 06:08:41 +00:00
akr ddedc6f125 * ext/socket/socket.c (sock_s_socketpair): yield if a block is given.
(io_call_close): defined.
  (io_close): defined.
  (pair_yield): defined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 15:05:16 +00:00
akr 021aaa70d6 * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): show openssl error
code in EWOULDBLOCK error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 08:18:12 +00:00
akr ef2ff2776b * ext/openssl/ossl_digest.c (GetDigestPtr): use StringValueCStr
instead of STR2CSTR.

* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto.
  (ossl_ec_group_initialize): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 05:55:25 +00:00
akr cb4d7b1a7f * ext/openssl/lib/openssl/buffering.rb (Buffering#read_nonblock):
implemented.

* ext/openssl/ossl_ssl.c (rb_sys_fail_path): removed.
  (fcntl.h): don't include.
  (ossl_ssl_read_internal): defined.
  (ossl_ssl_read): use ossl_ssl_read_internal.
  (ossl_ssl_read_nonblock): use ossl_ssl_read_internal.
  (Init_ossl_ssl): define sysread_nonblock, instead of read_nonblock.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 04:52:18 +00:00
akr a413e50c41 * ext/socket/mkconstants.rb: use sock_define_uconst for INADDR_*
constants because Socket::INADDR_LOOPBACK should be 0x7f000001
  instead of -0xffffff.

* ext/socket/socket.c (sock_define_uconst): defined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-30 12:19:40 +00:00
ko1 6961f8becc * ext/dl/test/test_import.rb: fix a prototype decl.
pointed out by Takehiro Kubo [ruby-core:20971].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-30 08:05:06 +00:00
ko1 d0ed5a9378 * ext/dl/test/test_base.rb: add libc search logic.
this patch is written by Takehiro Kubo.
  [ruby-core:20963] [Bug #932]
* ext/dl/dl.h: Add ",..." as the last argument.
  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]
* ext/dl/lib/dl/stack.rb: add add_padding() to calculate
  alignment.  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]
* ext/dl/test/test_func.rb: atof()'s return value is double.
  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]
* ext/dl/test/test_import.rb:
  - atof()'s return value is double.
  - The types of qsort's second and third argument are size_t.
  - fprintf()'s return value is int.
  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 14:54:24 +00:00
yugui db86fef72f * ext/dl/test/test_base.rb: add x86_64-linux's case again. #932
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 12:39:31 +00:00
matz d33298e524 * ext/io/wait/wait.c (io_nread): returns number of bytes available
for read.  response to feature request #936 in [ruby-core:20917].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 09:07:20 +00:00
matz 95327358ce * ext/io/wait/wait.c (io_ready_p): updated to follow RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 09:01:38 +00:00
matz 527cc92793 * ext/socket/socket.c (s_recvfrom_nonblock): revert r21162.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 08:14:35 +00:00
matz 445b6d5d01 * ext/socket/socket.c (s_recvfrom_nonblock): fixed awesome typo.
sorry.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 07:50:07 +00:00
matz 6dd1910a3d * ext/socket/socket.c (s_recvfrom_nonblock): default maxlen to be
65536.  suggested by akr in [ruby-core:20918].  response to
  feature request #936 in [ruby-core:20917].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 07:32:56 +00:00
yugui 69b2c8cc44 * Makefile.in (ext-clean): ext-clean always fails.
* ext/dl/ripper/extconf.rb: adds y.output into the clean list.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 05:51:31 +00:00
naruse 6e658ea392 * test/ext/dl/test_base.rb : add BSD's case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 12:42:39 +00:00
yugui f6cc65ae48 * ext/dl/lib/dl/import.rb (DL::Importer#sizeof): follows
a feature change in 1.9.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 12:13:32 +00:00
yugui 28001c849d * ext/dl/lib/dl/import.rb (DL::Importer#extern): adds filename and
line number to module_eval'ing for readability of backtrace.
  (DL::Importer#bind): ditto.

* ext/dl/lib/dl/struct.rb (DL::CStructBuilder#create): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 12:13:24 +00:00
takano32 0781d24aaa Sun Dec 28 17:10:13 2008 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* ext/dl/test/test_dl2.rb: modify strncpy, strcpy, qsort, types.
	  Bug #633 [ruby-core:19289]
	* ext/dl/test/test_base.rb: /lib/libc.so is x86_64 binary in x86_64 architecture.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 08:10:20 +00:00
takano32 04b672f34b * ext/dl/test/test_base.rb: use libc.dylib when the platform is darwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 03:58:02 +00:00
takano32 f0f281c1c1 * ext/dl/test/test_base.rb: use lib64 when the architecture is x86_64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 12:48:20 +00:00
akr 423bbf80d5 * process.c (rb_fork): propagete an error message from child to parent.
(rb_f_exec): show details of error in child process on
  exception.
  (save_redirect_fd): add error message arguments.
  (run_exec_dup2): ditto.
  (run_exec_close): ditto.
  (run_exec_open): ditto.
  (run_exec_dup2_child): ditto.
  (run_exec_pgroup): ditto.
  (run_exec_rlimit): ditto.
  (rb_run_exec_options): ditto.
  (rb_exec): ditto.
  (rb_exec_atfork): ditto.
  (rb_spawn_internal): ditto.
  (rb_spawn): ditto.
  (rb_f_system): follow arguments change.
  (proc_daemon): ditto.
  (rb_f_spawn): show details of error in child process on exception.

* io.c (popen_exec): add error message arguments.
  (pipe_open): show details of error in child process on exception.

* include/ruby/intern.h (rb_run_exec_options): add error message
  arguments.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* ext/pty/pty.c (chfunc): add error message arguments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 13:15:54 +00:00
nagai 3be4523bde * ext/tk/tcltklib.c: fix wrong flag value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22 09:04:14 +00:00
nagai 6c650f35f9 * ext/tk/lib/tk.rb: temporary patch for trouble on TkAqua (> Tk8.4.9).
* ext/tk/sample/demos-jp/widget: set encoding to a demo-code string to
  avoid garbled text on the Code Window.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-21 17:56:38 +00:00
akr cad0fbddf8 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 14:33:31 +00:00
akr d74d2d13cb rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 15:48:22 +00:00
akr 0a3a98aea4 * ext/socket/socket.c (unix_recv_io): relax msg_controllen error
check.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 10:47:52 +00:00
akr 8ae0a40d02 * ext/pty/extconf.rb: check util.h for OpenBSD.
* ext/pty/pty.c: include util.h if available.  fix variable name.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 10:38:19 +00:00
matz 842be2d7cb * ext/bigdecimal/bigdecimal.c (VpToString): reverted modification
(that caused a bug) in r20359.  [ruby-dev:37370]

* ext/bigdecimal/bigdecimal.c (BigDecimal_limit): comment update.
  [ruby-dev:37465]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 13:10:35 +00:00
akr e27fbfbc98 * ext/pty/pty.c (getDevice): add nomesg argument.
(get_device_once): add nomesg argument.  chmod slave tty to 0600
  if nomesg.  more error tests.
  (no_mesg): new function.
  (pty_open): make slave tty's mode 0600.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 11:39:17 +00:00
akr 56709edc89 * ext/pty/extconf.rb: check posix_openpt.
* ext/pty/pty.c (get_device_once): use posix_openpt if available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 10:49:12 +00:00
akr bfaef6a336 * ext/pty/pty.c (pty_open): set FMODE_SYNC and FMODE_DUPLEX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 14:35:00 +00:00
akr 4da3316ca3 * ext/pty/pty.c (pty_open): new method PTY.open.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 13:48:51 +00:00
akr 005e756537 * ext/pty/pty.c (get_device_once): use DEVICELEN instead of
sizeof SlaveName.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 12:25:03 +00:00
akr 67e43bfdf3 * ext/pty/pty.c (chfunc): make it static.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 12:02:09 +00:00
akr 9bfd822bd1 * ext/pty/pty.c (child_info): add slavename.
(chfunc): use slavename.
  (establishShell): set slavename.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 12:01:08 +00:00
akr 6e03277db0 * process.c (forked_child): new variable.
(before_exec): don't call rb_thread_stop_timer_thread if
  forked_child.
  (after_exec): reset forked_child after rb_thread_start_timer_thread.
  (rb_fork): set forked_child just after fork in child.

* ext/pty/pty.c (chfunc): extracted from establishShell.
  (establishShell): use rb_fork.

  [ruby-dev:37418]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 16:40:01 +00:00
tadf 8729368f14 * complex.c (nucomp_canonicalization): renamed.
* ext/math/complex.c: followed the above change.

	* rational.c (nurat_canonicalization): renamed.

	* ext/math/rational.c: followed the above change.

	* configure.in: defines a new macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 23:40:55 +00:00
kouji 8b123714e2 * ext/readline/readline.c
(readline_s_get_completion_append_character): uses locale
  encoding but not ASCII-8BIT.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 16:13:11 +00:00
kouji 02a37bee67 * ext/readline/readline.c: r20662 reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 12:44:08 +00:00
kouji 74ea7d93c1 * ext/readline/readline.c (readline_readline): changed the message
of IOError to 'closed stdin' from 'stdin closed' if stdin was
  closed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 10:17:01 +00:00
kouji cfb8e8301e * ext/readline/readline.c: used the ExportStringValue macro
instead of the OutputStringValue macro. removed the
  OutputStringValue macro.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 10:04:42 +00:00
matz 82c719c337 * ext/bigdecimal/bigdecimal.c (BigDecimal_round): should be round
to integer.  [ruby-dev:37355]

* ext/bigdecimal/bigdecimal.c (BigDecimal_divmod): division should
  be integer.  [incompatible] [ruby-dev:37355]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-10 16:54:43 +00:00
nobu b2e82f2dfb * ext/curses/curses.c: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 04:46:54 +00:00
nobu 7f36764938 * ext/curses/curses.c: made indentation consistent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 04:42:51 +00:00
matz 3cde544d47 * ext/curses/curses.c (curses_use_default_colors): add new
method.  a patch from Giancarlo F Bellido
  <support at coaxialhost.com> in [ruby-core:20434].

* ext/curses/curses.c (curses_tabsize_set): ditto.

* ext/curses/curses.c (curses_tabsize_get): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 04:31:41 +00:00
matz 70cf909fdd * ext/bigdecimal/bigdecimal.c (BigDecimal_truncate): return
integer if no optional argument given. [incompatible]

* ext/bigdecimal/bigdecimal.c (BigDecimal_floor): ditto.

* ext/bigdecimal/bigdecimal.c (BigDecimal_ceil): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 16:46:48 +00:00
matz 57f7d8c2cd * ext/openssl/ossl_ssl.c (ossl_ssl_read_nonblock):
OpenSSL::SSL::SSLSocket should implement read_nonblock.  a patch
  from Aaron Patterson in [ruby-core:20277].  fix: #814 [ruby-core:20241]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 07:21:10 +00:00
matz f5332d6b5e * ext/curses/curses.c (curses_getch): no ISPRINT(). [ruby-core:20294]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 05:52:30 +00:00
matz 782576a519 * ext/curses/curses.c (window_getch): avoid ISPRINT() macro which
has an issue with OpenSolaris.  [ruby-core:20189]

* signal.c (ruby_signal): EINVAL from sigaction(2) is not a bug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 04:57:58 +00:00
nagai 694fab958c * ext/tk/lib/tk/menu.rb: TkOptionMenubutton.new fails to treat
'parent' and 'variable' options on a Hash argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 21:03:49 +00:00
nagai 57746bb6fa * ext/tk/lib/tk.rb: bug fix. use ::RubyVM instead of ::VM [ruby-list:45676]
* ext/tk/tcltklib.c: update RELEASE_DATE


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 20:10:28 +00:00
nobu 13424f32fe * ext/tk/tcltklib.c (ip_ruby_cmd, ip_invoke_with_position): must
not access internal union directly.  [ruby-list:45670]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 05:48:55 +00:00
nobu aa39c4491a * io.c (rb_io_getc, rb_io_readchar): documentation correction from
Emiel van de Laar.  [ruby-core:20212]

* ext/stringio/stringio.c (strio_ungetbyte): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 03:22:12 +00:00
mame 0646c1e0d6 * ext/pty/pty.c (Init_pty): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:05:46 +00:00