From fbfd5fdcb0ba290aa6f6634302cfd5a1cb4d1eb3 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 11 Jun 2010 23:03:28 +0000 Subject: [PATCH] * 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 --- ext/openssl/extconf.rb | 14 ++++---------- 1 file 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(< -#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")