summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/openssl/deprecation.rb9
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d5ae190529..965635afb75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 1 14:17:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/openssl/deprecation.rb (OpenSSL.check_func): check if header is
+ available for macro compatibility.
+
Tue May 1 10:53:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_settracefunc.rb: ignore traces from another threads
diff --git a/ext/openssl/deprecation.rb b/ext/openssl/deprecation.rb
index d026f028076..39ebfa0d374 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