mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state,
but it is a dummy. * ext/socket/option.c: Solaris 11 doesn't have u_intN_t. * ext/socket/option.c: Solaris 11 needs inspect_tcpi_msec. * ext/socket/raddrinfo.c: Solaris 11 has AF_PACKET but doesn't have related macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									526b12964f
								
							
						
					
					
						commit
						4e8fbe1778
					
				
					 4 changed files with 21 additions and 7 deletions
				
			
		
							
								
								
									
										12
									
								
								ChangeLog
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								ChangeLog
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,3 +1,15 @@
 | 
			
		|||
Wed Mar 25 16:46:49 2015  NARUSE, Yui  <naruse@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state,
 | 
			
		||||
	  but it is a dummy.
 | 
			
		||||
 | 
			
		||||
	* ext/socket/option.c: Solaris 11 doesn't have u_intN_t.
 | 
			
		||||
 | 
			
		||||
	* ext/socket/option.c: Solaris 11 needs inspect_tcpi_msec.
 | 
			
		||||
 | 
			
		||||
	* ext/socket/raddrinfo.c: Solaris 11 has AF_PACKET but doesn't have
 | 
			
		||||
	  related macros.
 | 
			
		||||
 | 
			
		||||
Wed Mar 25 17:03:08 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* ext/-test-/file/fs.c (get_fsname): try magic number only if
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -384,7 +384,9 @@ if have_type("struct tcp_info", headers)
 | 
			
		|||
  have_const("TCP_LISTEN", headers)
 | 
			
		||||
  have_const("TCP_CLOSING", headers)
 | 
			
		||||
  have_struct_member('struct tcp_info', 'tcpi_state', headers)
 | 
			
		||||
  have_struct_member('struct tcp_info', 'tcpi_ca_state', headers)
 | 
			
		||||
  if /solaris/ !~ RUBY_PLATFORM
 | 
			
		||||
    have_struct_member('struct tcp_info', 'tcpi_ca_state', headers)
 | 
			
		||||
  end
 | 
			
		||||
  have_struct_member('struct tcp_info', 'tcpi_retransmits', headers)
 | 
			
		||||
  have_struct_member('struct tcp_info', 'tcpi_probes', headers)
 | 
			
		||||
  have_struct_member('struct tcp_info', 'tcpi_backoff', headers)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -883,14 +883,14 @@ inspect_ipv6_mreq(int level, int optname, VALUE data, VALUE ret)
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
inspect_tcpi_options(VALUE ret, u_int8_t options)
 | 
			
		||||
inspect_tcpi_options(VALUE ret, uint8_t options)
 | 
			
		||||
{
 | 
			
		||||
    int sep = '=';
 | 
			
		||||
 | 
			
		||||
    rb_str_cat2(ret, " options");
 | 
			
		||||
#define INSPECT_TCPI_OPTION(optval, name) \
 | 
			
		||||
    if (options & (optval)) { \
 | 
			
		||||
        options &= ~(u_int8_t)(optval); \
 | 
			
		||||
        options &= ~(uint8_t)(optval); \
 | 
			
		||||
        rb_str_catf(ret, "%c%s", sep, name); \
 | 
			
		||||
        sep = ','; \
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -923,14 +923,14 @@ inspect_tcpi_options(VALUE ret, u_int8_t options)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
inspect_tcpi_usec(VALUE ret, const char *prefix, u_int32_t t)
 | 
			
		||||
inspect_tcpi_usec(VALUE ret, const char *prefix, uint32_t t)
 | 
			
		||||
{
 | 
			
		||||
    rb_str_catf(ret, "%s%u.%06us", prefix, t / 1000000, t % 1000000);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef __linux__
 | 
			
		||||
#if defined(__linux__) || defined(__sun)
 | 
			
		||||
static void
 | 
			
		||||
inspect_tcpi_msec(VALUE ret, const char *prefix, u_int32_t t)
 | 
			
		||||
inspect_tcpi_msec(VALUE ret, const char *prefix, uint32_t t)
 | 
			
		||||
{
 | 
			
		||||
    rb_str_catf(ret, "%s%u.%03us", prefix, t / 1000, t % 1000);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1210,7 +1210,7 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
 | 
			
		|||
          }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef AF_PACKET
 | 
			
		||||
#if defined(AF_PACKET) && defined(__linux__)
 | 
			
		||||
          /* GNU/Linux */
 | 
			
		||||
          case AF_PACKET:
 | 
			
		||||
          {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue