drbrain
d341276561
* ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X
...
10.7+. [ruby-trunk - Bug #8517 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 20:32:42 +00:00
nobu
5ec5c6d52c
socket: fix build error and warnings on mingw
...
* ext/socket/extconf.rb: check for if_nametoindex() for
i686-w64-mingw32, and check for declarations of if_indextoname() and
if_nametoindex().
* ext/socket/ifaddr.c (ifaddr_ifindex): not-implement unless
if_nametoindex() is available.
* ext/socket/rubysocket.h: declare if_indextoname() and
if_nametoindex() if available but not declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14 14:24:42 +00:00
akr
2ad4c65b54
* ext/socket/extconf.rb: Check socketpair again.
...
It is required on Unix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 12:51:38 +00:00
usa
cb3fcdcdc3
* win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]
...
emulate getipaddrs(3) on Unix.
* win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above
function.
* include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't
substitute for any function, so use non-prefixed name.
* ext/socket/extconf.rb (socketpair); follow above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 11:29:32 +00:00
akr
b323d7d54c
* ext/socket: New method, Socket.getifaddrs, implemented.
...
[ruby-core:54777] [Feature #8368 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11 08:32:26 +00:00
akr
301821bd45
* ext/socket/extconf.rb: Set close_fds false for Cygwin.
...
Cygwin doesn't support fd passing.
This enables socket extension library cross-compilable by default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-07 03:10:46 +00:00
akr
86d4511fe6
* ext/socket/extconf.rb: Make default_ipv6 true for Cygwin.
...
Cygwin supports IPv6 since Cygwin 1.7.1 (2009-12).
http://cygwin.com/ml/cygwin-announce/2009-12/msg00027.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-03 05:11:06 +00:00
akr
ef215077bc
* ext/socket/extconf.rb: Redundant test removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27 08:23:21 +00:00
akr
fbbd7e29e7
* ext/socket/extconf.rb (test_recvmsg_with_msg_peek_creates_fds):
...
Extracted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27 07:00:26 +00:00
akr
56e982d447
* ext/socket/extconf.rb: Use a block of enable_config() for
...
--{enable,disable}-close-fds-by-recvmsg-with-peek configure option
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 09:42:14 +00:00
akr
a36cd96c2a
* ext/curses/extconf.rb: Test linkability of curses_version at first.
...
* ext/socket/extconf.rb: Test the behavior of fd passing with MSG_PEEK
only if recvmsg(), msg_control member, AF_UNIX and SCM_RIGHTS are
available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 03:43:19 +00:00
akr
a0fa43b094
* ext/socket/extconf.rb: Don't use WIDE getaddrinfo by default.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25 09:17:54 +00:00
akr
0ff2e1d531
* ext/socket/extconf.rb: Remove obsolete options: ---with-ipv6-lib and
...
--with-ipv6-libdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25 08:57:15 +00:00
akr
79b807118f
* ext/socket/extconf.rb: Implement
...
--{enable,disable}-close-fds-by-recvmsg-with-peek configure option
for cross-compiling.
Make --{enable,disable}-wide-getaddrinfo configure option
cross-compiling friendly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25 08:45:58 +00:00
akr
ed33fcae5a
* ext/socket/extconf.rb: Extract C programs as toplevel constants.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25 03:03:59 +00:00
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