diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-11 23:03:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-11 23:03:28 +0000 |
commit | fbfd5fdcb0ba290aa6f6634302cfd5a1cb4d1eb3 (patch) | |
tree | 7fcc21f9d6c291f59b80e16245be6a1d8538114c /ext/openssl | |
parent | e1a52d82b04f1787477a558e34c6e0df8bed3b93 (diff) |
* 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
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/extconf.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index bab92521a7..8102241ca8 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -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") |