aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/deprecation.rb
blob: d026f028076cf03cceb3ef7f622eb5878afb0b9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module OpenSSL
  def self.check_func(func, header)
    unless flag = (@deprecated_warning_flag ||= nil)
      if try_compile("", flag = "-Werror=deprecated-declarations")
        if with_config("broken-apple-openssl")
          flag = "-Wno-deprecated-declarations"
        end
        $warnflags << " #{flag}"
      else
        flag = ""
      end
      @deprecated_warning_flag = flag
    end
    have_func(func, header, flag)
  end
end