summaryrefslogtreecommitdiff
path: root/ext/socket
AgeCommit message (Collapse)Author
2013-02-10* ext/socket/extconf.rb: test types just after headers test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-10add comments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-10* ext/socket/extconf.rb: test headers at first.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-04init.c: declaration-after-statementnobu
* ext/socket/init.c (cloexec_accept): fix declaration-after-statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-31* ext/socket/raddrinfo.c (rsock_unix_sockaddr_len): returnshugo
sizeof(sa_familiy_t) if path is empty. see "Autobind Feature" in unix(7) for details. * ext/socket/lib/socket.rb (unix_socket_abstract_name?): treat an empty path as an abstract name. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* ext/socket/basicsocket.c (bsock_getsockname): ignore truncatedakr
part of socket address. (bsock_getpeername): ditto. (bsock_local_address): ditto. (bsock_remote_address): ditto. * ext/socket/unixsocket.c (unix_path): ditto. (unix_addr): ditto. (unix_peeraddr): ditto. * ext/socket/init.c (cloexec_accept): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* ext/socket/unixsocket.c (rsock_init_unixsock): use rb_inspect()shugo
because rb_sys_fail_str() fails if its argument contains NUL. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29* ext/socket/socket.c (sock_s_pack_sockaddr_un): calculate theshugo
correct address length of an abstract socket. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-26extconf.rb: fix warningsnobu
* ext/socket/extconf.rb: fix warnings from IN6_IS_ADDR_ macros in apple's netinet6/in6.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-25* ext/socket/raddrinfo (rsock_unix_sockaddr_len): renamed fromshugo
rsock_unixpath_len, because it returns not the length of the path, but the length of a socket address for the path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-25* ext/socket/raddrinfo.c (rsock_unixpath_len, init_unix_addrinfo),shugo
ext/socket/unixsocket.c (unixsock_connect_internal, rsock_init_unixsock): calculate the correct address length of an abstract socket. Without this fix, sizeof(struct sockaddr_un) is specified as the length of an abstract socket for bind(2) or connect(2), so the address of the socket is filled with extra NUL characters. See unix(7) for details. * ext/socket/lib/socket.rb (unix_server_socket): don't access the file system if the platform is Linux and path starts with NUL, which means that the socket is an abstract socket. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-23* ext/socket/ipsocket.c (IPSocket#peeraddr): Fix examplezzak
[ruby-core:46429] [Bug #6732] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20fix indentkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22Supress warnings: unused variablesnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-20* include/ruby/ruby.h: add C APIs.nari
VALUE rb_newobj_of(VALUE klass, VALUE flags) #define NEWOBJ_OF(obj,type,klass,flags) These allow to change a allocation strategy depending on klass or flags. * gc.c: ditto * array.c: use new C API. * bignum.c: ditto * class.c: ditto * complex.c: ditto * ext/socket/ancdata.c: ditto * ext/socket/option.c: ditto * hash.c: ditto * io.c: ditto * marshal.c: ditto * numeric.c: ditto * object.c: ditto * random.c: ditto * range.c: ditto * rational.c: ditto * re.c: ditto * string.c: ditto * struct.c: ditto [Feature #7177][Feature #7047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-20* ext/socket/socket.c: Documentation for Socketzzak
Based on a patch by David Albert [Bug #7105] [ruby-core:47828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-10* ext/socket/{basicksocket,init,udpsocket}.c: revert some parts ofusa
r36944. it breaks mswin/mingw ruby and brought into many many crashes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-09* ext/socket/basicsocket.c (rsock_bsock_send):kosaki
avoid unnecessary select() calls before doing I/O Patch by Eric Wong. [Feature #4538] [ruby-core:35586] * ext/socket/init.c (rsock_s_recvfrom): ditto. * ext/socket/init.c (rsock_s_accept): ditto. * ext/socket/udpsocket.c (udp_send): ditto. * io.c (io_fflush): ditto. * io.c (io_binwrite): ditto. * io.c (rb_io_syswrite): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29option.c: mingw64 onlynobu
* ext/socket/option.c (inet_ntop): something weird only on mingw64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29option.c: use rb_w32_inet_ntopnobu
* ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of inet_ntop directly, which is unavailable on older version Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29win32.c: rb_w32_inet_ntop should be constnobu
* win32/win32.c (rb_w32_inet_ntop): type should be const. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-28ext/socket: suppress warnings on mingw64nobu
* ext/socket/ancdata.c (nogvl_sendmsg_func): explicitly cast via VALUE to suppress a warning on mingw64. * ext/socket/option.c: declare inet_ntop() for mingw64 which has the function but lacks arpa/inet.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20* ext/socket/raddrinfo.c (addrinfo_ipv6_unique_local_p): Addeddrbrain
Addrinfo#ipv6_unique_local? to detect RFC 4193 unique local addresses. Part of #6692 * ext/socket/rubysocket.h: Add IN6_IS_ADDR_UNIQUE_LOCAL macro if missing. * test/socket/test_addrinfo.rb: Test for ipv6_unqiue_local? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19* ext/socket/init.c (rsock_init_sock): need to update max fd on allusa
platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19* ext/socket/extconf.rb: now enable IPv6 by default on mswin.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11get rid of warningsnobu
* io.c (sysopen_func, rb_sysopen_internal): cast through VALUE to get rid of warnings. fixup of r36355. * process.c (rb_waitpid_blocking, rb_waitpid): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10rb_thread_call_without_gvlnobu
* include/ruby/thread.h: new header file for thread stuff. * thread.c (rb_thread_call_without_gvl): export. [Feature#4328] returns void* instead of VALUE. [Feature #5543] * thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-09* dln.c: Simplify and make consistent an ifdef for Mac OS X.kosaki
* ext/socket/rubysocket.h: ditto. * ext/tk/stubs.c: ditto. * io.c: ditto. * process.c: ditto. * signal.c: ditto. * vm_dump.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23use RB_TYPE_P() instead of comparison of TYPE()nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26* ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longestakr
path in sockaddr_un, really. reported by nagachika. http://d.hatena.ne.jp/nagachika/20120426/ruby_trunk_changes_35474_35476 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26suppress a warning.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26* ext/socket/raddrinfo.c (init_unix_addrinfo): support the longestakr
path in sockaddr_un. (inspect_sockaddr): ditto. (addrinfo_mdump): ditto. (addrinfo_mload): ditto. (rsock_unixpath_str): new function. (rsock_unixpath): removed. (rsock_unixaddr): use rsock_unixpath_str. * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest path in sockaddr_un. (sock_s_unpack_sockaddr_un): ditto. (sock_s_gethostbyaddr): unused variable removed. * ext/socket/unixsocket.c (rsock_init_unixsock): support the longest path in sockaddr_un. * ext/socket/rubysocket.h (rsock_unixpath_str): declared. (rsock_unixpath): removed. * test/socket/test_unix.rb: comment out test_nul because abstract unix sockets may contain NULs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-25* ext/socket/raddrinfo.c (init_unix_addrinfo): refine error messageakr
format. (addrinfo_mload): show more information on "too long AF_UNIX path" error. (addrinfo_unix_path): ditto for "too short AF_UNIX address" and "too long AF_UNIX address" error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24* ext/socket/raddrinfo.c (init_unix_addrinfo): show actual path lengthakr
when it is too long for Unix socket. * ext/socket/unixsocket.c (rsock_init_unixsock): ditto. * ext/socket/socket.c (sock_s_pack_sockaddr_un): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-20update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13* encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "controldrbrain
reaches end of non-void function" warnings. [ruby-trunk - Bug #6066] * re.c (name_to_backref_number): ditto. * object.c (rb_Float): ditto. * io.c (io_readpartial): ditto. * io.c (io_read_nonblock): ditto. * pack.c (rb_uv_to_utf8): ditto. * proc.c (rb_method_entry_arity): ditto. * vm_method.c (rb_f_notimplement): ditto. * struct.c (rb_struct_aset_id): ditto. * class.c (rb_scan_args): ditto. * process.c (rlimit_resource_type): ditto. * process.c (rlimit_resource_value): ditto. * process.c (p_uid_switch): ditto. * process.c (p_gid_switch): ditto. * ext/digest/digest.c (rb_digest_instance_update): ditto. * ext/digest/digest.c (rb_digest_instance_finish): ditto. * ext/digest/digest.c (rb_digest_instance_reset): ditto. * ext/digest/digest.c (rb_digest_instance_block_length): ditto. * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto. * ext/dl/handle.c (rb_dlhandle_close): ditto. * ext/tk/tcltklib.c (pending_exception_check0): ditto. * ext/tk/tcltklib.c (pending_exception_check1): ditto. * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto. * ext/tk/tcltklib.c (lib_get_reltype_name): ditto. * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto. * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto. * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto. * ext/fiddle/conversions.c (generic_to_value): ditto. * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto. * ext/socket/socket.c (sock_s_getnameinfo): ditto. * ext/ripper/eventids2.c (ripper_token2eventid): ditto. * cont.c (return_fiber): ditto. * dmydln.c (dln_load): ditto. * vm_insnhelper.c (vm_search_normal_superclass): ditto. * bignum.c (big_fdiv): ditto. * marshal.c (r_symlink): ditto. * marshal.c (r_symbol): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05* ext/socket/extconf.rb: fix typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-27* io.c, process.c, time.c, ext: use rb_sys_fail_str instead ofnobu
rb_sys_fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-02update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-12Do not define _WIN32_WINNT multiple timesluislavena
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09* ext/socket/lib/socket.rb (family_addrinfo): don't require protocolakr
equality. For example, protocol 0 and IPPROTO_TCP is not problem for TCP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09* ext/socket/lib/socket.rb (family_addrinfo): return the givenakr
addrinfo object. Patch by Ippei Obayashi. [ruby-dev:45095] [Bug #5845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-20* ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.orgkazu
* ext/socket/ancdata.c: ditto * test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto * test/syck/test_yaml.rb: ditto * doc/ChangeLog-1.9.3: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-08* ext/socket/extconf.rb: forgotten to define HAVE_SOCKETPAIR forusa
windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revertusa
r33876. [ruby-core:41475] [Bug #5706] * ext/socket/extconf.rb: the alternative hack for [Bug #5675]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-01* ext/socket/extconf.rb: get rid of warnings bynobu
-Wmissing-declarations or -Wold-style-definition options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-01* ext/socket/extconf.rb: add arguments for macro calls.nobu
[ruby-core:41370] [Bug#5681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28* include/ruby/subst.h: moved Windows specific substitions fromnobu
win32.h. * ext/socket/rubysocket.h: include ruby/subst.h. [Bug #5675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-06* ext/socket/rubysocket.h (rsock_recvmsg): declared.akr
* ext/socket/ancdata.c (rsock_recvmsg): extracted from nogvl_recvmsg_func. (nogvl_recvmsg_func): use rsock_recvmsg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05* ext/socket/socket.c (rsock_socketpair0): refactored.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e