1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/extconf.rb: __VA_ARGS__ is already checked in configure.

* ext/openssl/extconf.rb: use try_static_assert for version check.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-06-11 23:03:28 +00:00
parent e1a52d82b0
commit fbfd5fdcb0

View file

@ -98,10 +98,7 @@ have_func("SSL_SESSION_get_id")
have_func("SSL_SESSION_cmp")
have_func("OPENSSL_cleanse")
unless have_func("SSL_set_tlsext_host_name", ['openssl/ssl.h'])
have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TLSEXT_HOST_NAME")
end
if try_compile("#define FOO(...) foo(__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n")
$defs.push("-DHAVE_VA_ARGS_MACRO")
have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TLSEXT_HOST_NAME")
end
if have_header("openssl/engine.h")
have_func("ENGINE_add")
@ -119,12 +116,9 @@ if have_header("openssl/engine.h")
have_func("ENGINE_load_sureware")
have_func("ENGINE_load_ubsec")
end
if try_compile(<<SRC)
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER < 0x00907000L
# error "OpenSSL version is less than 0.9.7."
#endif
SRC
if checking_for('OpenSSL version is 0.9.7 or later') {
try_static_assert('OPENSSL_VERSION_NUMBER >= 0x00907000L', 'openssl/opensslv.h')
}
have_header("openssl/ocsp.h")
end
have_struct_member("EVP_CIPHER_CTX", "flags", "openssl/evp.h")