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

126 Коммитов

Автор SHA1 Сообщение Дата
nobu 53fdb9e190 socket/extconf.rb: add -D
* ext/socket/extconf.rb: $defs needs -D or -U.  nothing is added
  otherwize.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 17:44:35 +00:00
nobu f12df1a752 socket/extconf.rb: check struct in_addr6
* ext/socket/extconf.rb: check struct in_addr6, which is defined in
  VC6 instead of in6_addr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 17:42:48 +00:00
nobu c7135ddd2d socket/extconf.rb: RSTRING_SOCKLEN
* ext/socket/extconf.rb (RSTRING_SOCKLEN): macro to cast RSTRING_LEN
  to socklen_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 07:58:51 +00:00
akr b2a1339f24 * ext/socket/extconf.rb: Remove condition for bcc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04 14:25:19 +00:00
akr da39199964 * ext/socket/extconf.rb: Specify arguments to test functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 22:24:57 +00:00
akr 7181490def * ext/socket/extconf.rb: Test functions and libraries after headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 13:10:04 +00:00
akr 1580dd29dd * ext/socket/extconf.rb: don't test ss_family and ss_len member of
struct sockaddr_storage.  They are not used now except SunOS
  specific code.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 03:40:16 +00:00
akr 733d65df5e * ext/socket/extconf.rb: don't test sys/feature_tests.h which is not
used now.
  It was included in r7901 as "bug of gcc 3.0 on Solaris 8 ?".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 00:59:24 +00:00
akr 4b5b88ec79 * ext/socket/extconf.rb: reorder header tests to consider inclusion
order in rubysocket.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 00:25:54 +00:00
akr d6d0e85320 * configure.in, ext/socket/extconf.rb: test netinet/in_systm.h in
ext/socket/extconf.rb instead of configure.in.

  Originally, netinet/in_systm.h is included for NextStep, OpenStep,
  and Rhapsody.  [ruby-core:1596]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 23:46:44 +00:00
akr 899ba99b90 * configure.in: don't test xti.h here.
* ext/socket/extconf.rb: test xti.h here.

  Originally, xti.h is included for IRIX [ruby-core:14447].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 22:59:40 +00:00
akr cb31e78379 * ext/socket/extconf.rb: test struct sockaddr_un and its member,
sun_len.

* ext/socket/sockport.h (INIT_SOCKADDR_UN): new macro defined.

* ext/socket/socket.c (sock_s_pack_sockaddr_un): use INIT_SOCKADDR_UN.

* ext/socket/unixsocket.c (rsock_init_unixsock): ditto.

* ext/socket/raddrinfo.c (init_unix_addrinfo): ditto.
  (addrinfo_mload): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 22:19:05 +00:00
usa cd63b84ce9 * ext/socket/extconf.rb: workaround for mswin/mingw build problem.
sendmsg emulation in win32/win32.c is not enough.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 19:23:50 +00:00
akr 41b2a6f01b * ext/socket/extconf.rb: use all all tested available headers for
have_func.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 15:20:34 +00:00
akr a60e2e5820 * ext/socket/extconf.rb: test struct sockaddr_storage directly.
* ext/socket/rubysocket.h: use HAVE_TYPE_STRUCT_SOCKADDR_STORAGE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-15 03:36:05 +00:00
akr ed193c50f5 * ext/socket/extconf.rb: don't define HAVE_SA_LEN and HAVE_SA_LEN.
use HAVE_STRUCT_SOCKADDR_SA_LEN and HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
  instead.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 23:20:27 +00:00
akr eb4ae6bc54 add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 14:41:28 +00:00
akr 22a04e5720 * ext/socket/extconf.rb: don't define socklen_t here, just test.
* ext/socket/rubysocket.h: define socklen_t if not available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 12:01:24 +00:00
akr d7923c8279 * ext/socket/extconf.rb: test functions just after struct members.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-12 20:51:19 +00:00
akr c799b11273 * ext/socket/extconf.rb: test structure members just after types test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-10 14:43:00 +00:00
akr 5b057eeff2 * ext/socket/extconf.rb: test types just after headers test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-10 11:58:53 +00:00
akr 474e3cd2a7 add comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-10 03:29:37 +00:00
akr 1ab6dccf4b * ext/socket/extconf.rb: test headers at first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-10 03:11:00 +00:00
nobu a110d1782e extconf.rb: fix warnings
* ext/socket/extconf.rb: fix warnings from IN6_IS_ADDR_ macros in
  apple's netinet6/in6.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-26 02:31:40 +00:00
usa 8e66cbccb7 * ext/socket/extconf.rb: now enable IPv6 by default on mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19 04:27:59 +00:00
nobu a2749dbbf1 * ext/socket/extconf.rb: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05 07:52:43 +00:00
luislavena 44d20d61c7 Do not define _WIN32_WINNT multiple times
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-12 18:28:17 +00:00
usa 2470d7811f * ext/socket/extconf.rb: forgotten to define HAVE_SOCKETPAIR for
windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-08 03:59:10 +00:00
usa 1dea192775 * include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert
r33876.  [ruby-core:41475] [Bug #5706]

* ext/socket/extconf.rb: the alternative hack for [Bug #5675].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 05:29:31 +00:00
nobu b0f588fe0e * ext/socket/extconf.rb: get rid of warnings by
-Wmissing-declarations or -Wold-style-definition options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-01 08:45:22 +00:00
nobu 05e2da638f * ext/socket/extconf.rb: add arguments for macro calls.
[ruby-core:41370] [Bug#5681]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-01 07:59:21 +00:00
akr 5dbc3d1e79 * ext/socket/init.c (cloexec_accept): new function to use accept4 if
available.
  (rsock_s_accept_nonblock): use cloexec_accept.
  (accept_blocking): ditto.

* ext/socket/extconf.rb: check accept4.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-31 23:26:19 +00:00
akr 29f354df63 * ext/socket/extconf.rb: refine the recvmsg test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24 11:35:56 +00:00
akr 0283c3d0bb * ext/socket/extconf.rb: fix the recvmsg test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24 11:04:11 +00:00
akr f5b9de7502 * ext/socket/extconf.rb: test recvmsg allocates file descriptors for
fd passing even with MSG_PEEK.

* ext/socket/ancdata.c: use the above test result.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 23:57:50 +00:00
kosaki 908baefe7d * internal.h: move rb_thread_io_blocking_region() declaration
from intern.h to internal.h. It's still experimental API and
  need more discussion. [ruby-dev:43698]
* include/ruby/intern.h: ditto.

* ext/socket/rubysocket.h: include internal.h.
* ext/socket/depend: add internal.h dependency.
* ext/socket/extconf.rb: add $INCFLAGS to topdir.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-21 12:31:17 +00:00
kosaki 6bd4afaab8 * ext/socket/extconf.rb: Fix build error which was introduced r30372.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 17:21:08 +00:00
usa 7c9fbd226b * ext/socket/extconf.rb: check the existence of if_indextoname().
* ext/socket/option.c: yesterday's akr's commits destroyed the build of
  some unrelated platforms (such as Windows).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 16:41:13 +00:00
akr 01da08a29c * ext/socket/option.c (inspect_ipv4_add_drop_membership): new function
to inspect struct ip_mreq and struct ip_mreqn for
  IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
  Socket::Option.new(:INET, :IP, :ADD_MEMBERSHIP,
  [239,255,99,81, 0,0,0,0].pack("CCCCCCCC")).inspect is now
  "#<Socket::Option: INET IP ADD_MEMBERSHIP 239.255.99.81 0.0.0.0>".
  (inspect_ipv4_multicast_if): new function to inspect struct in_addr
  and struct ip_mreqn for IP_MULTICAST_IF.
  Socket::Option.new(:INET, :IP, :MULTICAST_IF,
  [192,168,0,7].pack("CCCC")).inspect is now
  "#<Socket::Option: INET IP MULTICAST_IF 192.168.0.7>".

* ext/socket/extconf.rb: check struct ip_mreq and struct ip_mreqn.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 14:35:28 +00:00
akr 1b40391d3d * ext/socket/option.c (inspect_ipv6_mreq): new function to inspect
struct ipv6_mreq for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP.
  Socket::Option.new(:INET6, :IPV6, :JOIN_GROUP,
  [0xff12,0,0,0,0,0,0,1, 2].pack("nnnnnnnnI!")).inspect is now:
  "#<Socket::Option: INET6 IPV6 JOIN_GROUP ff12::1 eth0>"

* ext/socket/extconf.rb: check struct ipv6_mreq.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 09:29:24 +00:00
usa f6150aa7df * ext/socket/extconf.rb: win64 is just same with win32 about socket.
notice: but wince is not same.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-01 15:26:58 +00:00
nobu 4c916ec8b7 * ext/socket/rubysocket.h (__DARWIN_ALIGNBYTES): workaround of a
bug in system header of darwin 9.  [ruby-core:32341]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-13 10:56:52 +00:00
usa 61086883b6 * ext/socket/extconf.rb: mswin/mingw ruby has socketpair(), but it's
not exist as such name in ruby static library, so mkmf.rb cannot
  find it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19 10:59:47 +00:00
usa 851a023843 * ext/socket/extconf.rb: test all IPPROTO_* constants for recent Win32
SDK.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-12 02:40:09 +00:00
akr 01cd3467fb * ext/socket/extconf.rb: test IPPROTO_IP and IPPROTO_IPV6 constants.
* ext/socket/mkconstants.rb: define macros for enum.

  [ruby-dev:38849]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-11 14:10:34 +00:00
nobu 0dc145e7b2 * ext/socket/extconf.rb: CMSG_ macros are broken on 64bit darwin,
because of use of __DARWIN_ALIGN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28 08:14:18 +00:00
akr fe98a03c53 * ext/socket/extconf.rb: suppress a warning.
* ext/extmk.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26 12:34:51 +00:00
nobu 815fccb4dc * ext/socket/extconf.rb: use have_struct_member.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-30 21:01:13 +00:00
nobu 1069e0f335 * ext/socket/extconf.rb: fix for wide-getaddrinfo option.
* ext/socket/addrinfo.c: rename {addr,name}info functions to ensure
  those are used on darwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-30 20:56:41 +00:00
kanemoto 501e9360dd * ext/socket/extconf.rb : Compilation failure on AIX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 16:41:33 +00:00