1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2009-02-02 22:58:03 +00:00
parent e53c88a44f
commit b256c5fb8f
3 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,9 @@
Tue Feb 3 07:57:58 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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.
Tue Feb 3 07:02:11 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* missing/langinfo.c (nl_langinfo_codeset): accepts iso-8859

View file

@ -188,7 +188,7 @@ ancillary_int(VALUE self)
static VALUE
ancillary_s_ip_pktinfo(VALUE self, VALUE v_addr, VALUE v_ifindex, VALUE v_spec_dst)
{
#if defined(IPPROTO_IP) && defined(IP_PKTINFO) /* GNU/Linux */
#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
unsigned int ifindex;
struct sockaddr_in sa;
struct in_pktinfo pktinfo;
@ -226,7 +226,7 @@ ancillary_s_ip_pktinfo(VALUE self, VALUE v_addr, VALUE v_ifindex, VALUE v_spec_d
static VALUE
ancillary_ip_pktinfo(VALUE self)
{
#if defined(IPPROTO_IP) && defined(IP_PKTINFO) /* GNU/Linux */
#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
int level, type;
VALUE data;
struct in_pktinfo pktinfo;
@ -397,7 +397,7 @@ anc_inspect_ip_recvdstaddr(int level, int type, VALUE data, VALUE ret)
}
#endif
#if defined(IPPROTO_IP) && defined(IP_PKTINFO) /* GNU/Linux */
#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
static int
anc_inspect_ip_pktinfo(int level, int type, VALUE data, VALUE ret)
{
@ -426,7 +426,7 @@ anc_inspect_ip_pktinfo(int level, int type, VALUE data, VALUE ret)
}
#endif
#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO) /* IPv6 RFC3542 */
#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN6_PKTINFO) /* IPv6 RFC3542 */
static int
anc_inspect_ipv6_pktinfo(int level, int type, VALUE data, VALUE ret)
{
@ -508,7 +508,7 @@ ancillary_inspect(VALUE self)
# if defined(IP_RECVDSTADDR) /* 4.4BSD */
case IP_RECVDSTADDR: if (anc_inspect_ip_recvdstaddr(level, type, data, ret) == -1) goto dump; break;
# endif
# if defined(IP_PKTINFO) /* GNU/Linux */
# if defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
case IP_PKTINFO: if (anc_inspect_ip_pktinfo(level, type, data, ret) == -1) goto dump; break;
# endif
default: goto dump;

View file

@ -299,6 +299,14 @@ end
have_header("sys/un.h")
have_header("sys/uio.h")
have_type("struct in_pktinfo") {|src|
src.sub(%r'^/\*top\*/', '\1'"\n#if defined(IPPROTO_IP) && defined(IP_PKTINFO)") <<
"#else\n" << "#error\n" << ">>>>>> no in_pktinfo <<<<<<\n" << "#endif\n"
}
have_type("struct in6_pktinfo") {|src|
src.sub(%r'^/\*top\*/', '\1'"\n#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO)") <<
"#else\n" << "#error\n" << ">>>>>> no in6_pktinfo <<<<<<\n" << "#endif\n"
}
$distcleanfiles << "constants.h" << "constdefs.*"