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

312 Коммитов

Автор SHA1 Сообщение Дата
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 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
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
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
matz 23e6fc744e * ext/socket/socket.c (sock_getaddrinfo): should have updated for
Mac OS X.  a patch from Shumpei Akai in [ruby-dev:37234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-29 09:30:46 +00:00
matz 46e431e3eb * ext/socket/socket.c (sock_s_getaddrinfo): refactored to remove
code duplication regarding getaddrinfo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28 09:32:20 +00:00
nobu 409293eb09 * ext/socket/socket.c (sock_s_getservbyport): check if the port range.
[ruby-core:19460]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 07:16:20 +00:00
nobu 472156c236 * ext/socket/socket.c (sock_s_getservbyname): unuse unnecessary
object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 05:08:10 +00:00
nobu a5ea0e8c32 * ext/socket/socket.c (sock_s_getservbyport): the port should be
converted before the proto so that the #to_int of the former cannot
  alter the latter.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 02:18:00 +00:00
usa 538d87cf11 * ext/socket/socket.c (sock_s_getservbyport): cast to get rid of
warning.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 00:27:52 +00:00
matz c1bb485ca0 * ext/socket/socket.c (sock_s_getservbyport): port should be
network byte order.  a patch from Dave Thomas in [ruby-core:19454].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 23:12:02 +00:00
shugo d423b884b8 * io.c, include/ruby/intern.h (rb_io_ascii8bit_binmode): externed.
* ext/socket/socket.c (init_sock): use rb_io_ascii8bit_binmode()
  instead of rb_io_binmode().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 04:31:15 +00:00
shugo 5545c5aafa * ext/socket/socket.c (init_sock): sockets should be binmode.
* test/socket/test_tcp.rb (test_encoding): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 02:50:43 +00:00
akr f59b1dfbfb rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 00:46:59 +00:00
yugui 8dd118c0db * djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
* djgpp/README.djgpp: ditto.

* djgpp/config.hin: ditto.

* djgpp/config.sed: ditto.

* djgpp/configure.bat: ditto.

* djgpp/mkver.sed: ditto.

* ext/Setup.dj: ditto.

* dln.c: removed djgpp supports.

* file.c: ditto.

* gc.c: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* signal.c: ditto.

* util.c: ditto.

* vm_core.h: ditto.

* lib/fileutils.rb: ditto.

* lib/mkmf.rb: ditto.

* ext/socket/socket.c: ditto.

* test/fileutils/test_fileutils.rb: ditto.

* test/ruby/test_env.rb: ditto.

* test/ruby/test_path.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:25:12 +00:00
yugui bbbd9c0b7b * x68/_dtos18.c: removed. Ruby no longer supports human68k.
* x68/_round.c: ditto.

* x68/fconvert.c: ditto.

* x68/select.c: ditto.

* ext/Setup.x68: ditto.

* missing/x68.c: ditto.

* dln.c (dln_find_exe_r): removed human68k supports.
  (dln_find_1): ditto.

* lib/mkmf.rb: ditto.

* ext/extmk.rb (Init_ext): ditto.

* ext/socket/socket.c (init_sock): ditto.

* gc.c (GC_MALLOC_LIMIT): ditto.
  (rb_setjmp, rb_jmpbuf): ditto.
  (mark_current_machine_context): ditto.

* include/ruby/defines.h (PATH_ENV): ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* test/ruby/test_env.rb: ditto.

* test/ruby/test_path.rb: ditto.

* LEGAL


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:12:13 +00:00
nobu 34c7492e2c * ext/socket/socket.c (host_str): numeric address should be unsigned.
[ruby-core:18971]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 18:12:43 +00:00
matz d7de44a8fc * dln.c: newer BeOS support. a patch from Pete Goodeve
<pete.goodeve at computer.org> in [ruby-core:18712].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-19 00:33:19 +00:00
matz 4c467da68f * ext/socket/mkconstants.rb: add new constants. a patch from
IWAMURO Motonori <deenheart+ruby at gmail.com> in [ruby-dev:36309].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 03:13:14 +00:00
matz d98bc00582 * ext/socket/mkconstants.rb: add some IPV6 constans. [ruby-dev:36175]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 12:38:59 +00:00
ko1 204929af9d * include/ruby/signal.h: removed.
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c,
  io.c, process.c, signal.c: vm_core.h: ditto.
  Some unused external global variables are also removed.
  (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending,
  rb_thread_critical)
* ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c,
  ext/readline/readline.c, ext/socket/depend,
  ext/socket/socket.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 08:00:05 +00:00
ko1 ca6a8b1e2c * include/ruby/intern.h: rename RB_UBF_DFL to
RUBY_UBF_IO and RUBY_UBF_PROCESS.
  Because there is no default (universal) unblocking function.
* ext/socket/socket.c, file.c, io.c, process.c, thread.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 07:44:24 +00:00
nobu ae9af4d333 * ext/socket/socket.c (lookup_order_table): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 06:07:52 +00:00