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

2554 Коммитов

Автор SHA1 Сообщение Дата
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