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

2853 Коммитов

Автор SHA1 Сообщение Дата
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
akr 411e9997d2 * ext/socket/extconf.rb: check struct cmsgcred.
* ext/socket/ancdata.c (anc_inspect_passcred_credentials): add
  "(ucred)".
  (anc_inspect_socket_creds): show struct cmsgcred too, for FreeBSD.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 12:53:55 +00:00
akr e960cf417a * ext/socket/extconf.rb: check struct sockcred.
* ext/socket/ancdata.c (anc_inspect_socket_creds): new function to
  show SCM_CREDS on NetBSD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 11:36:18 +00:00
akr aa28707309 more constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 10:24:51 +00:00
akr a23547cafa * ext/socket/ancdata.c (anc_inspect_passcred_credentials): new
function to show SCM_CREDENTIALS on GNU/Linux.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 09:47:00 +00:00
akr 03149710e8 * ext/socket/raddrinfo.c (init_unix_addrinfo): add socktype argument.
(addrinfo_initialize): follow init_unix_addrinfo change.
  (addrinfo_s_unix): add optional argument: socktype



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 04:53:17 +00:00
akr e3cc17a3ac fix rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 02:10:57 +00:00
nobu 7c93e56560 * lib/mkmf.rb (have_header): needs dependent headers if trying to
compile.

* ext/socket/extconf.rb: net/if.h depends on other headers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 02:44:07 +00:00
nobu 641bdd84ef * ext/openssl/ossl_cipher.c (add_cipher_name_to_ary): used
conditionally.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 15:29:39 +00:00
akr 1bd6111488 * ext/pty/pty.c (chfunc): type fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 22:53:44 +00:00
akr 74063bf4d3 * include/ruby/intern.h (rb_run_exec_options_err): renamed from
rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): declared with 1.9.1 compatible signature.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* process.c (rb_run_exec_options_err): renamed from
  rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): defined.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* io.c: follow above change.

* ext/pty/pty.c: follow above change.

  [ruby-dev:37893]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:33:19 +00:00
akr 88f04bdd32 * ext/socket: AddrInfo is renamed to Addrinfo. [ruby-dev:37876]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:01:43 +00:00
kazu 37131afdd3 * ext/readline/readline.c (Init_readline): entry may be NULL.
[ruby-dev:37891]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 22:42:06 +00:00
akr 5ce10c1359 * ext/socket/socket.c (sock_s_socketpair): make 3rd argument optional.
* ext/socket/unixsocket.c (unix_s_socketpair): follow the above
  change.

* ext/socket/rubysocket.h (sock_s_socketpair): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 16:20:05 +00:00
akr 9dfc90dc70 * ext/socket/raddrinfo.c (addrinfo_ipv6_to_ipv4): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 15:10:03 +00:00
akr 12a5cf8287 revert useless change part in the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 16:40:42 +00:00
akr 20ac101dae * ext/socket/extconf.rb: fix struct in_pktinfo and struct in6_pktinfo
detection.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 16:29:23 +00:00
akr 9274fbfae9 * ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): skip
socket creation error.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 15:21:42 +00:00
kouji d60cd5b379 * ext/readline/extconf.rb: checked rl_set_screen_size and
rl_get_screen_size.

* ext/readline/readline.c (readline_s_set_screen_size): added
  Readline.set_screen_size.

* ext/readline/readline.c (readline_s_get_screen_size): added
  Readline.get_screen_size.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:21:08 +00:00
kouji 4a2b6b2067 * ext/readline/readline.c: updated year of copyright.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:17:26 +00:00
kouji dbf657caad * ext/readline/readline.c (readline_s_set_completion_proc): set
default if proc is nil. fix #1095


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:15:20 +00:00
akr 24eafe8376 * ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): new
private function for allocating same port both IPv4 and IPv6.
  (Socket.tcp_server_sockets): use tcp_server_sockets_port0 for port 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 07:25:57 +00:00
akr 13a468db17 * ext/socket/lib/socket.rb (Socket.tcp_server_sockets): extracted from
Socket.tcp_server_loop.
  (Socket.accept_loop): ditto.
  (Socket.unix_server_socket): extracted from Socket.unix_server_loop.
  (Socket.unix_server_loop): use Socket.accept_loop.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:36:43 +00:00
nobu b256c5fb8f * ext/socket/extconf.rb (in_pktinfo, in6_pktinfo),
ext/socket/ancdata.c: defined in w32api/ws2tcpip.h on cygwin but
  cannot compile for some reason.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 22:58:03 +00:00
akr e53c88a44f rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 22:31:50 +00:00
akr 9946e700c1 * ext/socket/raddrinfo.c (Init_addrinfo): add AddrInfo#to_s as an
alias of AddrInfo#to_sockaddr.

* ext/socket/option.c (Init_sockopt): add Socket::Option#to_s as an
  alias of Socket::Option#data.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 14:44:28 +00:00
akr 29bd89281b * ext/socket/ancdata.c (cmsg_type_to_sym): add #ifdef for no IPv6
environment.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 08:12:10 +00:00
akr 5ad05f37a5 * ext/socket/socket.c (sock_initialize): make 3rd argument, protocol,
optional.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 05:55:56 +00:00
usa 57d85f32f5 * ext/socket/constants.c (cmsg_type_arg): INET6 check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 05:23:23 +00:00
akr b41a9abb6a * ext/socket/option.c: use INET6 instead of IPV6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 05:18:55 +00:00
usa bf23d53b94 * ext/socket/{options,raddrinfo}.c: use INET6 instead of AF_INET6 for
VC++6.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 03:48:31 +00:00
akr 61fc0c6cf4 * ext/socket/rubysocket.h (cmsg_type_arg): declared.
(Init_ancdata): ditto.

* ext/socket/init.c (Init_socket_init): call Init_ancdata.

* ext/socket/constants.c (cmsg_type_arg): defined.

* ext/socket/depend: add dependency for ancdata.o.

* ext/socket/mkconstants.rb: generate scm_optname_to_int.
  more constants.

* ext/socket/extconf.rb: add ancdata.o.

* ext/socket/ancdata.c: new file.  new method
  BasicSocket#{sendmsg,sendmsg_nonblock,recvmsg,recvmsg_nonblock}



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 02:51:02 +00:00
akr ef9206bbea * ext/socket/rubysocket.h (rb_cSockOpt): declared.
(sockopt_new): ditto.
  (Init_sockopt): ditto.

* ext/socket/init.c (Init_socket_init): call Init_sockopt.

* ext/socket/depend: add dependency for option.o

* ext/socket/mkconstants.rb: generate intern_level, intern_so_optname,
  intern_ip_optname, intern_ipv6_optname, intern_tcp_optname,
  intern_udp_optname and intern_scm_optname.

* ext/socket/extconf.rb: add option.o.

* ext/socket/basicsocket.c (bsock_setsockopt): accept Socket::Option
  object.
  (bsock_getsockopt): return Socket::Option object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 01:53:02 +00:00
nobu 2478f1caaf * lib/xmlrpc/server.rb (Server#serve): gets rid of hardcoded
platform names.

* lib/resolv.rb (Resolv::Hosts::DefaultFileName),
  (Resolv::DNS::Config.default_config_hash): tries win32/resolv on
  mswin64 too.

* lib/rubygems/specification.rb (Gem::Specification#ruby_code):
  aded mswin64.

* lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command):
  spawn is better to start a process in background.

* ext/extmk.rb: uses FNM_SYSCASE.

* instruby.rb: installs win32.h on mswin64 platform.
  [ruby-core:21722]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 23:12:52 +00:00
akr f1137963e3 * ext/socket/raddrinfo.c (addrinfo_ipv4_private_p): new method.
(addrinfo_ipv4_loopback_p): ditto.
  (addrinfo_ipv4_multicast_p): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 12:28:50 +00:00
akr 849e730f15 * ext/socket/raddrinfo.c (addrinfo_ipv6_unspecified_p): new method.
(addrinfo_ipv6_loopback_p): ditto.
  (addrinfo_ipv6_multicast_p): ditto.
  (addrinfo_ipv6_linklocal_p): ditto.
  (addrinfo_ipv6_sitelocal_p): ditto.
  (addrinfo_ipv6_v4mapped_p): ditto.
  (addrinfo_ipv6_v4compat_p): ditto.
  (addrinfo_ipv6_mc_nodelocal_p): ditto.
  (addrinfo_ipv6_mc_linklocal_p): ditto.
  (addrinfo_ipv6_mc_sitelocal_p): ditto.
  (addrinfo_ipv6_mc_orglocal_p): ditto.
  (addrinfo_ipv6_mc_global_p): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 11:09:51 +00:00
kouji 374e2f34b1 * ext/curses/curses.c (Init_curses): Curses#crmode and
Curses#nocrmode changes to the module function. 
  fix #916


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 07:12:45 +00:00
usa 68db4a3464 * ext/socket/spclet.c (socket_s_ip_address_list): support Windows XP
or later. (Win2k or earlier is still not supported)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-29 02:25:39 +00:00
usa 17bd806aea * ext/zlib/zlib.c (zstream_run): previous change didn't resolve the
problem.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 15:26:03 +00:00
usa f80356eb91 * ext/zlib/zlib.c (zstream_run): desperately guard the variable.
[ruby-core:20576]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 13:55:13 +00:00
nobu 186f7fe9cf properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 22:22:34 +00:00
akr 2d958b7fb0 * ext/socket/init.c (socks_connect_blocking): moved from
sockssocket.c.  [ruby-dev:37834]

* sockssocket.c (socks_init): don't omit "int" type.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 11:07:41 +00:00
naruse 7cefea6ff4 * ext/ripper/depend: use VPATH.
If a platform doesn't support VPATH, Ruby doesn't support it:
  for exapmle MSYS. [ruby-core:21570]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 04:02:53 +00:00
naruse 6f39590aff * ext/ripper/depend: lex.c's correct path is ../../lex.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 03:24:17 +00:00
matz 0fff7aa624 * ext/ripper/depend: fixed dependency path to lex.c.
[ruby-core:21570]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-26 19:06:39 +00:00
akr efdef4dbe2 * ext/socket/socket.c (socket_s_ip_address_list): renamed from
socket_s_list_ip_address.  [ruby-dev:37806]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-25 07:36:45 +00:00
nobu 45c4ae9b8b * ext/socket/socket.c (socket_s_list_ip_address): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-25 03:33:54 +00:00
technorama 7361a2ecb3 * ext/openssl/ossl_ssl.c: Server Name Indication support.
new methods SSLContext#server_name_cb=, SSLSocket#hostname=.

* test/openssl/test_ssl.rb: Tests for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-24 21:45:42 +00:00
nobu 044965df97 * ext/socket/extconf.rb ($distcleanfiles): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 08:02:41 +00:00
nobu d597a39042 * ext/socket/extconf.rb ($distcleanfiles): removes constdefs.[ch].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 07:57:41 +00:00
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
nagai c8b8db001b * ext/tk/lib/tk.rb: rescue abnormal Encoding.locale_charmap value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-09 04:21:28 +00:00