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

2853 Коммитов

Автор SHA1 Сообщение Дата
nobu 27cc677088 * ext/extmk.rb (extmake): removes object files no longer used and
files to be removed by old distclean.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 08:10:10 +00:00
usa dba06de110 * ext/dl/win32/lib/win32/resolv.rb: get rid of warning.
* ext/dl/lib/dl/func.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 07:52:42 +00:00
nobu 2b3a204832 * ext/extmk.rb (extmake), lib/mkmf.rb (create_makefile): $objs and
$srcs are always Array or nil now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 07:25:50 +00:00
usa 2a89c088a2 * ext/dl/win32/lib/win32/{registry,resolv}.rb: use dl/import instead
of Win32API.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:55:26 +00:00
usa 95189045d0 * ext/dl/lib/dl/func.rb (DL::Function.name): delegate to @cfunc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:54:00 +00:00
nobu 1001173ccd * ext/dl/dl.c (rb_dl_init_callbacks): autoloads callbacks.
* ext/dl/callback: split from dl.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:40:40 +00:00
nobu 2233d34b39 * ext/extmk.rb (extmake): initialize $objs before extrace_makefile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:28:55 +00:00
nobu 91dd419efb * ext/dl/lib/dl/cparser.rb (DL::CParser::parse_signature): fixed
variable name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:09:14 +00:00
nobu daa2217d48 * ext/dl/lib/dl/pack.rb (DL::PackInfo): reduced redundant
initialization.

* ext/dl/lib/dl/stack.rb (DL::Stack): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:07:24 +00:00
nobu 0cceff94ca * ext/dl/lib/dl/value.rb (DL::ValueUtil#wrap_arg): NULL for nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:05:21 +00:00
nobu f9ca2119e4 * test/dl: moved from ext/dl/test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:03:23 +00:00
nobu 078928bbdd * ext/extmk.rb (extmake): removes object files no longer used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 05:57:30 +00:00
nobu 91c9a4becb * common.mk (main): passes $(MAKE) to mkmain_cmd
* ext/extmk.rb (command_output): uses arguments to invoke make.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 05:53:18 +00:00
akr 557359d170 * ext/socket/sockport.h (SS_LEN): defined unconditionally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 12:39:47 +00:00
akr 8a00868c3d * ext/socket/ancdata.c (anc_inspect_socket_creds): supress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 12:27:33 +00:00
akr fb5d4ecfb5 * ext/socket/ancdata.c (rsock_discard_cmsg_resource): defined
unconditionally.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 12:14:35 +00:00
akr a36ea435d2 forgot to commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 12:13:00 +00:00
nobu 033bed37c8 * ext/dl/dl.h (dlerror): fixed on Windows.
* ext/dl/handle.c (rb_dlhandle_initialize): returns handle to
  libruby if nil is given on Windows as dlopen.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 02:01:48 +00:00
nobu 46e06b572b * ext/dl/handle.c (rb_dlhandle_sym): get rid of buffer overrun,
and try ASCII WINAPI versions too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 01:50:56 +00:00
akr d79dc0f6a0 * ext/socket/raddrinfo.c: suppress warnings.
* ext/socket/socket.c: ditto.

* ext/socket/unixsocket.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 14:00:48 +00:00
akr aa2b22bba2 * ext/socket/ (rsock_getfamily): renamed from rb_sock_getfamily.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 11:58:13 +00:00
nobu 895b3f6e06 * ext/dl/win32/lib/Win32API.rb (initialize): passes rest
arguments to DL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 10:52:48 +00:00
nobu 2f3c15cb22 * ext/zlib/zlib.c (zstream_run): suppress a warning. a patch from
Charlie Savage at [ruby-core:22607].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 10:39:01 +00:00
nobu 3465e37e63 * ext/dl/cfunc.c (rb_dlcfunc_call): fix for stdcall and missing
argument numbers.  [ruby-core:22601]

* ext/dl/dl.h (DLSTACK_PROTO0_): added.

* ext/dl/mkcallback.rb (gencallback, gen_callback_file),
  (rb_dl_init_callbacks): omit stdcall functions unless supported.

* lib/rubygems/config_file.rb (SHGetFolderPath): stdcall.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 10:02:06 +00:00
nobu 0fee78a198 * ext/bigdecimal/bigdecimal.c (gfDebug): uncommented out.
[ruby-core:22600]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 08:27:17 +00:00
akr 172d208789 * ext/socket/ (rsock_make_hostent): renamed from sock_make_hostent.
(rsock_addrinfo): renamed from sock_addrinfo.
  (rsock_getaddrinfo): renamed from sock_getaddrinfo.
  (rsock_socket): renamed from ruby_socket.
  (rsock_sock_s_socketpair): renamed from sock_s_socketpair.
  (rsock_connect): renamed from ruby_connect.

* ext/socket/socket.c (sock_listen): make it static.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 06:48:22 +00:00
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
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