mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* ext/socket/extconf.rb: test all IPPROTO_* constants for recent Win32
SDK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									07b314f07b
								
							
						
					
					
						commit
						851a023843
					
				
					 2 changed files with 11 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Wed May 12 11:39:10 2010  NAKAMURA Usaku  <usa@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* ext/socket/extconf.rb: test all IPPROTO_* constants for recent Win32
 | 
			
		||||
	  SDK.
 | 
			
		||||
 | 
			
		||||
Wed May 12 10:57:04 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* numeric.c (flo_to_s): make minimum string representation.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,12 +110,11 @@ end
 | 
			
		|||
have_header("netinet/tcp.h") if /cygwin/ !~ RUBY_PLATFORM # for cygwin 1.1.5
 | 
			
		||||
have_header("netinet/udp.h")
 | 
			
		||||
 | 
			
		||||
%w[
 | 
			
		||||
  IPPROTO_IP
 | 
			
		||||
  IPPROTO_IPV6
 | 
			
		||||
].each {|name|
 | 
			
		||||
  have_const(name, headers)
 | 
			
		||||
}
 | 
			
		||||
if !have_macro("IPPROTO_IPV6", headers) && have_const("IPPROTO_IPV6", headers)
 | 
			
		||||
  IO.read(File.join(File.dirname(__FILE__), "mkconstants.rb")).sub(/\A.*^__END__$/m, '').split(/\r?\n/).grep(/\AIPPROTO_\w*/){$&}.each {|name|
 | 
			
		||||
    have_const(name, headers) unless $defs.include?("-DHAVE_CONST_#{name.upcase}")
 | 
			
		||||
  }
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if (have_func("sendmsg") | have_func("recvmsg")) && /64-darwin/ !~ RUBY_PLATFORM
 | 
			
		||||
  # CMSG_ macros are broken on 64bit darwin, because of use of __DARWIN_ALIGN.
 | 
			
		||||
| 
						 | 
				
			
			@ -342,7 +341,7 @@ have_header("ucred.h", headers)
 | 
			
		|||
have_func("getpeerucred")
 | 
			
		||||
 | 
			
		||||
# workaround for recent Windows SDK
 | 
			
		||||
$defs << "-DIPPROTO_IPV6=IPPROTO_IPV6" if have_const("IPPROTO_IPV6") && !have_macro("IPPROTO_IPV6")
 | 
			
		||||
$defs << "-DIPPROTO_IPV6=IPPROTO_IPV6" if $defs.include?("-DHAVE_CONST_IPPROTO_IPV6") && !have_macro("IPPROTO_IPV6")
 | 
			
		||||
 | 
			
		||||
$distcleanfiles << "constants.h" << "constdefs.*"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue