mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/socket.c (constant_arg): constified.
* ext/socket/socket.c (optname_arg): cygwin does not have IPPROTO_IPV6. * ext/socket/mkconstants.rb (ipv6_optname_to_int): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d51c5a137f
commit
9ac6838183
3 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
Sun Jan 4 09:27:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/socket/socket.c (constant_arg): constified.
|
||||
|
||||
* ext/socket/socket.c (optname_arg): cygwin does not have
|
||||
IPPROTO_IPV6.
|
||||
|
||||
* ext/socket/mkconstants.rb (ipv6_optname_to_int): ditto.
|
||||
|
||||
Sun Jan 4 04:33:14 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/socket.c: redundant #ifdef removed.
|
||||
|
|
|
@ -228,11 +228,13 @@ ip_optname_to_int(char *str, int len, int *valp)
|
|||
<%= gen_name_to_int("str", "len", "valp", /\AIP_/, "IP_") %>
|
||||
}
|
||||
|
||||
#ifdef IPPROTO_IPV6
|
||||
static int
|
||||
ipv6_optname_to_int(char *str, int len, int *valp)
|
||||
{
|
||||
<%= gen_name_to_int("str", "len", "valp", /\AIPV6_/, "IPV6_") %>
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
tcp_optname_to_int(char *str, int len, int *valp)
|
||||
|
|
|
@ -242,7 +242,7 @@ ruby_getnameinfo__aix(sa, salen, host, hostlen, serv, servlen, flags)
|
|||
#endif
|
||||
|
||||
static int
|
||||
constant_arg(VALUE arg, int (*str_to_int)(char*, int, int*), char *errmsg)
|
||||
constant_arg(VALUE arg, int (*str_to_int)(char*, int, int*), const char *errmsg)
|
||||
{
|
||||
VALUE tmp;
|
||||
char *ptr;
|
||||
|
@ -295,8 +295,10 @@ optname_arg(int level, VALUE optname)
|
|||
return constant_arg(optname, so_optname_to_int, "unknown socket level option name");
|
||||
case IPPROTO_IP:
|
||||
return constant_arg(optname, ip_optname_to_int, "unknown IP level option name");
|
||||
#ifdef IPPROTO_IPV6
|
||||
case IPPROTO_IPV6:
|
||||
return constant_arg(optname, ipv6_optname_to_int, "unknown IPv6 level option name");
|
||||
#endif
|
||||
case IPPROTO_TCP:
|
||||
return constant_arg(optname, tcp_optname_to_int, "unknown TCP level option name");
|
||||
case IPPROTO_UDP:
|
||||
|
|
Loading…
Add table
Reference in a new issue