ruby-changes:16319
From: nobu <ko1@a...>
Date: Sat, 12 Jun 2010 08:04:19 +0900 (JST)
Subject: [ruby-changes:16319] Ruby:r28292 (trunk): * ext/openssl/extconf.rb: __VA_ARGS__ is already checked in configure.
nobu 2010-06-12 08:03:28 +0900 (Sat, 12 Jun 2010) New Revision: 28292 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28292 Log: * ext/openssl/extconf.rb: __VA_ARGS__ is already checked in configure. * ext/openssl/extconf.rb: use try_static_assert for version check. Modified files: trunk/ext/openssl/extconf.rb Index: ext/openssl/extconf.rb =================================================================== --- ext/openssl/extconf.rb (revision 28291) +++ ext/openssl/extconf.rb (revision 28292) @@ -98,11 +98,8 @@ 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") + 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") -end if have_header("openssl/engine.h") have_func("ENGINE_add") have_func("ENGINE_load_builtin_engines") @@ -119,12 +116,9 @@ 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") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/