summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-11 14:10:34 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-11 14:10:34 +0000
commit01cd3467fbd3e9ea212063d0a7405642b8746b94 (patch)
tree4b5e03ee9f2429e1573f1dda29b136461e0a4671 /ext/socket/extconf.rb
parent709bff4f2b7564c34754feb5f33440a72f802fca (diff)
* ext/socket/extconf.rb: test IPPROTO_IP and IPPROTO_IPV6 constants.
* ext/socket/mkconstants.rb: define macros for enum. [ruby-dev:38849] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 3ce8316..9125ec1 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -110,6 +110,13 @@ 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_func("sendmsg") | have_func("recvmsg")) && /64-darwin/ !~ RUBY_PLATFORM
# CMSG_ macros are broken on 64bit darwin, because of use of __DARWIN_ALIGN.
have_struct_member('struct msghdr', 'msg_control', ['sys/types.h', 'sys/socket.h'])