ruby-changes:32977
From: naruse <ko1@a...>
Date: Thu, 20 Feb 2014 10:56:22 +0900 (JST)
Subject: [ruby-changes:32977] naruse:r45056 (ruby_2_1): merge revision(s) 44638: [Backport #9350]
naruse 2014-02-20 10:56:10 +0900 (Thu, 20 Feb 2014) New Revision: 45056 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45056 Log: merge revision(s) 44638: [Backport #9350] * ext/socket/option.c: IP_MULTICAST_LOOP and IP_MULTICAST_TTL socket option takes a byte on OpenBSD. Fixed by Jeremy Evans. [ruby-core:59496] [Bug #9350] Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/ext/socket/option.c branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 45055) +++ ruby_2_1/ChangeLog (revision 45056) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Thu Feb 20 10:19:40 2014 Tanaka Akira <akr@f...> + + * ext/socket/option.c: IP_MULTICAST_LOOP and IP_MULTICAST_TTL socket + option takes a byte on OpenBSD. + Fixed by Jeremy Evans. [ruby-core:59496] [Bug #9350] + Wed Feb 19 15:25:13 2014 Koichi Sasada <ko1@a...> * gc.c (ruby_gc_set_params): don't show obsolete warnings for Index: ruby_2_1/ext/socket/option.c =================================================================== --- ruby_2_1/ext/socket/option.c (revision 45055) +++ ruby_2_1/ext/socket/option.c (revision 45056) @@ -357,7 +357,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/socket/option.c#L357 sockopt_s_ipv4_multicast_loop(VALUE klass, VALUE value) { #if defined(IPPROTO_IP) && defined(IP_MULTICAST_LOOP) -# ifdef __NetBSD__ +# if defined(__NetBSD__) || defined(__OpenBSD__) unsigned char i = NUM2CHR(rb_to_int(value)); # else int i = NUM2INT(rb_to_int(value)); @@ -387,7 +387,7 @@ sockopt_ipv4_multicast_loop(VALUE self) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/socket/option.c#L387 #if defined(IPPROTO_IP) && defined(IP_MULTICAST_LOOP) if (family == AF_INET && level == IPPROTO_IP && optname == IP_MULTICAST_LOOP) { -# ifdef __NetBSD__ +# if defined(__NetBSD__) || defined(__OpenBSD__) return sockopt_byte(self); # else return sockopt_int(self); @@ -398,7 +398,7 @@ sockopt_ipv4_multicast_loop(VALUE self) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/socket/option.c#L398 UNREACHABLE; } -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(__OpenBSD__) # define inspect_ipv4_multicast_loop(a,b,c,d) inspect_byte(a,b,c,d) #else # define inspect_ipv4_multicast_loop(a,b,c,d) inspect_int(a,b,c,d) @@ -420,7 +420,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/socket/option.c#L420 sockopt_s_ipv4_multicast_ttl(VALUE klass, VALUE value) { #if defined(IPPROTO_IP) && defined(IP_MULTICAST_TTL) -# ifdef __NetBSD__ +# if defined(__NetBSD__) || defined(__OpenBSD__) unsigned char i = NUM2CHR(rb_to_int(value)); # else int i = NUM2INT(rb_to_int(value)); @@ -450,7 +450,7 @@ sockopt_ipv4_multicast_ttl(VALUE self) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/socket/option.c#L450 #if defined(IPPROTO_IP) && defined(IP_MULTICAST_TTL) if (family == AF_INET && level == IPPROTO_IP && optname == IP_MULTICAST_TTL) { -# ifdef __NetBSD__ +# if defined(__NetBSD__) || defined(__OpenBSD__) return sockopt_byte(self); # else return sockopt_int(self); @@ -461,7 +461,7 @@ sockopt_ipv4_multicast_ttl(VALUE self) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/socket/option.c#L461 UNREACHABLE; } -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(__OpenBSD__) # define inspect_ipv4_multicast_ttl(a,b,c,d) inspect_byte(a,b,c,d) #else # define inspect_ipv4_multicast_ttl(a,b,c,d) inspect_int(a,b,c,d) @@ -481,7 +481,7 @@ inspect_int(int level, int optname, VALU https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/socket/option.c#L481 } } -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(__OpenBSD__) static int inspect_byte(int level, int optname, VALUE data, VALUE ret) { Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 45055) +++ ruby_2_1/version.h (revision 45056) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.1" #define RUBY_RELEASE_DATE "2014-02-20" -#define RUBY_PATCHLEVEL 35 +#define RUBY_PATCHLEVEL 36 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44638 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/