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

2777 Коммитов

Автор SHA1 Сообщение Дата
akr c49f05dd79 * ext/socket: add rsock_prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 06:30:41 +00:00
akr 2ba6eec1fa * ext/socket/ancdata.c (ancillary_unix_rights): check message type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28 09:29:26 +00:00
akr 54cd7ea168 * ext/socket/lib/socket.rb (BasicSocket#connect_address): returns ::1
if the address is IPv4-mapped IPv6 address for 0.0.0.0 for MacOS X.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28 06:05:44 +00:00
akr 5fb1faf2bf * ext/socket/raddrinfo.c: suppress strict-aliasing warning with
gcc version 4.4.0 20090219 (Red Hat 4.4.0-0.21) on Fedora 11 Alpha.

* ext/socket/socket.c: ditto.

* ext/socket/unixsocket.c: ditto.

* ext/socket/sockport.h (SS_LEN): defined.
  (SET_SS_LEN): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27 15:21:23 +00:00
akr d8c66c4333 * ext/socket/ancdata.c (bsock_recvmsg_internal): close FDs passed by
SCM_RIGHTS unless :scm_rights=>true is given.
  (discard_cmsg): extracted from rsock_discard_cmsg_resource.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27 14:23:54 +00:00
akr a7d581fa2f * ext/openssl/lib/openssl/buffering.rb: define Buffering module under
OpenSSL.  [ruby-dev:37906]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27 13:15:35 +00:00
akr 770f854176 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 14:39:12 +00:00
akr 7f44badcbe rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 14:18:09 +00:00
akr ecb22ce2c5 * ext/socket/lib/socket.rb (BasicSocket#connect_address): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 14:15:39 +00:00
akr 2276b2f904 * ext/socket/mkconstants.rb: more MSG_* constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 16:35:05 +00:00
akr e6f0b1de89 * ext/socket/option.c (sockopt_level): extracted from sockopt_level_m.
(sockopt_optname): extracted from sockopt_optname_m.
  (sockopt_data): apply StringValue.
  (sockopt_s_linger): new method.
  (sockopt_linger): new method.
  (inspect_linger): show onoff value if it is neither 0 nor 1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 15:26:25 +00:00
akr 1ff020df70 * ext/socket/ancdata.c (ancillary_unix_rights): raise
NotImplementedError if no fd passing feature.
  (ancillary_timestamp): raise NotImplementedError if no timestamp
  feature.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 14:24:10 +00:00
akr 56c52c1da8 * ext/socket/ancdata.c (ancillary_s_unix_rights): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 14:19:24 +00:00
akr c17b915eb8 * ext/socket/unixsocket.c (unix_recv_io): prevent FD leak when 2 fd is
sent on LP64 platform.

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

* ext/socket/ancdata.c (rsock_discard_cmsg_resource): renamed from
  discard_cmsg_resource.  export it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 14:03:42 +00:00
knu 400ded9338 * class.c (rb_scan_args): Allow specifying the number of trailing
mandatory arguments right after the number of optional arguments
  only if the number of leading mandatory arguments is not omitted.

* ext/socket/tcpserver.c (tcp_svr_init): Make use of it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:41:39 +00:00
matz 02316f11d5 * ext/curses/curses.c (curses_colors): new method added. a patch
from Alexander Beisig in [ruby-core:22331].

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:19:17 +00:00
akr 470103861e add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 13:19:04 +00:00
akr 0ae09794e5 * ext/socket/socket.c (sockaddr_obj): convert fe80:1::1 to fe80::1%1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 13:02:59 +00:00
akr 7e20506eae reordered.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 12:08:23 +00:00
akr e137e939b7 * ext/socket/ancdata.c (ancillary_timestamp): support SCM_BINTIME.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 10:56:57 +00:00
akr b404c651d2 * ext/socket/ancdata.c (ancillary_timestamp): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 10:45:46 +00:00
nobu 9632241261 * common.mk (main): split from exts and makes main program after
building exts with miniruby, to get rid of overwriting running
  program.  [ruby-core:22339]

* Makefile.in, win32/Makefile.sub (RUNCMD, MKMAIN_CMD): macros to
  run script file.

* ext/extmk.rb (parse_args): added --command-output option which
  creates script file to make main program.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 10:01:08 +00:00
nobu ff9bfed83d * common.mk (ripper.c): exec can't work on Windows.
* ext/ripper/depend (.SUFFIXES): nmake doesn't have .y by default.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 08:58:10 +00:00
akr 605cd65904 * ext/socket/ancdata.c (inspect_timespec_as_abstime): new function to
show struct timespec.
  (ancillary_inspect): use it for SCM_TIMESTAMPNS on GNU/Linux.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 11:41:38 +00:00
akr 23e286f3fb * ext/socket/ancdata.c (inspect_bintime_as_abstime): new function to
show struct bintime.
  (ancillary_inspect): use it for SCM_BINTIME on FreeBSD.

* ext/socket/mkconstants.rb: define SCM_BINTIME.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 11:32:43 +00:00
akr a0e3e8e4d1 * ext/socket/ancdata.c (inspect_timeval_as_abstime): use time_t
variable to avoid a warning on environments which use long as
  tv_sec as NetBSD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 11:21:45 +00:00
akr 97ef9728d5 * ext/socket/mkconstants.rb: define SO_TIMESTAMPNS and SCM_TIMESTAMPNS
if available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 18:20:11 +00:00
akr b7fe065741 * ext/socket/ancdata.c (ancillary_inspect): use SCM_TIMESTAMP instead
of SO_TIMESTAMP.  SCM_TIMESTAMP != SO_TIMESTAMP on MacOS X.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:55:52 +00:00
akr 475a350df8 * ext/socket/ancdata.c (inspect_timeval_as_abstime): new function.
(ancillary_inspect): use it for SO_TIMESTAMP.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:46:51 +00:00
akr 0c95958c2d * ext/socket/option.c (inspect_timeval_as_interval): renamed from
inspect_timeval.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:27:15 +00:00
akr cdca4e19d0 * ext/socket/option.c (inspect_timeval): fix the size test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:10:47 +00:00
akr 80d230c394 * ext/socket/option.c (inspect_linger): message refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 11:09:55 +00:00
akr 22cef963c3 * ext/socket/init.c (s_recvfrom): use rb_io_wait_readable after
recvfrom.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 10:28:38 +00:00
akr c160c6e59e * ext/socket/option.c (inspect_errno): new function.
(sockopt_inspect): use inspect_errno for SO_ERROR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 09:40:42 +00:00
nobu 0ec57a60af * ext/socket/init.c (s_recvfrom_nonblock): handles EAGAIN too.
* ext/socket/init.c (s_accept_nonblock): ditto, and EPROTO depends
  on platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 04:38:46 +00:00
akr 88860a065e rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 04:06:15 +00:00
akr 47c6ecfa64 * ext/socket/ancdata.c (bsock_recvmsg_internal): handle EMSGSIZE as
well.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 17:16:18 +00:00
akr 6b0f596719 * ext/socket/ancdata.c (bsock_recvmsg_internal): check max length
overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 17:04:22 +00:00
akr 60f2cec646 * ext/socket/ancdata.c (bsock_recvmsg_internal): don't call
discard_cmsg_resource when EMFILE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 16:53:30 +00:00
akr ad2f293d4f * ext/socket/ancdata.c (bsock_recvmsg_internal): gc when SCM_RIGHTS
hit the file descriptor limit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 16:49:44 +00:00
akr 9cfe35ad50 * io.c (io_getpartial): error message describes what should be
waited after nonblocking error.
  (rb_io_write_nonblock): ditto.

* ext/socket/init.c (s_recvfrom_nonblock): ditto.
  (s_accept_nonblock): ditto.

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

* ext/socket/ancdata.c (bsock_sendmsg_internal): ditto.
  (bsock_recvmsg_internal): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 15:57:52 +00:00
akr d227ca29f4 * ext/socket/ancdata.c (bsock_recvmsg_internal): check recvmsg error
earlier.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 15:32:52 +00:00
akr 90fc8d84ad rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 14:05:07 +00:00
akr 09396dcf21 * ext/socket/ancdata.c (make_io_for_unix_rights): cmsg_len may be
bigger than msg_controllen.
  freeze unix_rights array.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 14:01:17 +00:00
akr 98f82fc633 * ext/socket/ancdata.c (bsock_recvmsg_internal): fix exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 13:18:02 +00:00
akr bed4294451 * ext/socket/ancdata.c (ancillary_unix_rights): method renamed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 12:13:38 +00:00
nobu 3e1394f36f * ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): OCSP_basic_verify
returns positive value on success, not non-zero.  [ruby-core:21762]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 06:39:52 +00:00
nobu 22f1a984f1 * ext/etc/etc.c (etc_each_group): defines only when Etc::Group is
available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 06:14:27 +00:00
takano32 90f84988fc * ext/socket/rubysocket.h: add "#include <sys/stat.h>"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 23:47:21 +00:00
akr 18afbc891c * ext/socket/ancdata.c (ancillary_rights): new method.
(make_io_for_rights): new function to allocate
  IOs for FDs in SCM_RIGHTS message.
  (bsock_recvmsg_internal): use make_io_for_rights.  So the FDs can be
  closed by GC.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 18:43:15 +00:00
akr 75ba47e8e8 * ext/socket/ancdata.c (discard_cmsg_resource): new function to close
file descriptors in control message.
  (bsock_recvmsg_internal): call discard_cmsg_resource before retrying
  recvmsg.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 13:47:53 +00:00
akr f1a39b9e5c * ext/socket/ancdata.c (bsock_recvmsg_internal): prevent misalignment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 12:48:11 +00:00
akr 34152d654a * ext/socket/ancdata.c (bsock_sendmsg_internal): avoid misalignment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 12:35:22 +00:00
akr d89e09b308 * ext/socket/ancdata.c (bsock_recvmsg_internal): reduce code on
environments which have no control message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 12:27:13 +00:00
akr e1f9891eeb forgot to add.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 22:02:22 +00:00
nobu 056d798ed2 * ext/dl/handle.c (rb_dlhandle_sym): moved conditionally used variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 18:17:51 +00:00
nobu da97071549 * ext/socket/option.c: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 18:14:20 +00:00
akr 9bd0ecd917 add comments for rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 16:29:43 +00:00
akr 0b058a1c2a forgot to modify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 16:17:03 +00:00
akr e14c9923b4 * ext/openssl: avoid cyclic require.
* ext/openssl/lib/openssl/ssl-internal.rb: renamed from ssl.rb

* ext/openssl/lib/openssl/x509-internal.rb: renamed from x509.rb.

* lib/net/imap.rb: require openssl, instead of openssl/ssl.

* lib/net/pop.rb: require openssl, instead of openssl/ssl.

[ruby-dev:38018]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 16:09:44 +00:00
nobu 47d55a02a3 * ext/etc/etc.c (Etc::Passwd.each, Etc::Group.each): new methods.
[ruby-dev:37999]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 15:55:49 +00:00
akr 28cf7a6d6f * ext/socket/ancdata.c (bsock_sendmsg_internal): make the padding
removing only on NetBSD.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 14:26:34 +00:00
akr 2f8b471b89 fix an error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 10:43:55 +00:00
akr 3d39a9a070 * ext/socket/ancdata.c (bsock_sendmsg_internal): should not remove the
last padding of control messages, basically.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 10:40:20 +00:00
akr d9bb9b3255 * ext/socket/mkconstants.rb: generate rb_define_const directly for
rdoc.

* ext/.document: add socket/constdefs.c.

* ext/socket/constants.c (sock_define_const): removed.
  (sock_define_uconst): ditto.
  (rb_mSockConst): new static variable.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-16 16:55:33 +00:00
akr 351f54de45 * ext/socket/ancdata.c (bsock_sendmsg_internal) [OpenBSD]: don't remove
the last padding to prevent sendmsg failure in test_udp_server in
  test/socket/test_socket.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-16 14:34:01 +00:00
akr 9d37857e2b * ext/socket/sockport.h (SET_SA_LEN): cast to void for supressing a
warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 17:21:53 +00:00
akr 760ee609d2 fix rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 17:11:32 +00:00
akr 3a7c7e2d06 add a constant: IFNAMSIZ.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 14:49:40 +00:00
akr 9842858add rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 14:43:12 +00:00
nobu 1fb7ce6303 * ext/dl/win32/lib/Win32API.rb (Win32API#initialize): DL.dlopen
raises DLError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 14:37:11 +00:00
akr 36dcff1cf5 * ext/socket/socket.c (Init_socket): define TCPServer#listen and
UNIXServer#listen here for rdoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 12:14:00 +00:00
akr 840e6c70e8 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 12:01:53 +00:00
akr 5b8339edf6 * ext/socket/ancdata.c (extract_ipv6_pktinfo): set sa_len for 4.4BSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 12:00:25 +00:00
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