aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/deprecation.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-01 05:18:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-01 05:18:02 +0000
commitd32155358c67466d038436e6f03d41494043c53b (patch)
tree1f325a04a07f9a5fafa01f0d24f5b7c2bdd7744b /ext/openssl/deprecation.rb
parent633cebb0efdf00b9a49493b65614c2d2d3b84905 (diff)
downloadruby-d32155358c67466d038436e6f03d41494043c53b.tar.gz
* ext/openssl/deprecation.rb (OpenSSL.check_func): check if header is
available for macro compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/deprecation.rb')
-rw-r--r--ext/openssl/deprecation.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/openssl/deprecation.rb b/ext/openssl/deprecation.rb
index d026f02807..39ebfa0d37 100644
--- a/ext/openssl/deprecation.rb
+++ b/ext/openssl/deprecation.rb
@@ -1,5 +1,5 @@
module OpenSSL
- def self.check_func(func, header)
+ def self.deprecated_warning_flag
unless flag = (@deprecated_warning_flag ||= nil)
if try_compile("", flag = "-Werror=deprecated-declarations")
if with_config("broken-apple-openssl")
@@ -11,6 +11,11 @@ module OpenSSL
end
@deprecated_warning_flag = flag
end
- have_func(func, header, flag)
+ flag
+ end
+
+ def self.check_func(func, header)
+ have_func(func, header, deprecated_warning_flag) and
+ have_header(header, nil, deprecated_warning_flag)
end
end