diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-24 06:56:02 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-24 06:56:02 +0000 |
commit | cf701160b72c7cf65970db64ea8b6004ad3008a8 (patch) | |
tree | ef6692f5c5eea2b21fe0cc039434260082ef6bb4 | |
parent | 242d1879f3105377fe1153a21043bebbbaa7b208 (diff) | |
download | ruby-cf701160b72c7cf65970db64ea8b6004ad3008a8.tar.gz ruby-cf701160b72c7cf65970db64ea8b6004ad3008a8.tar.xz ruby-cf701160b72c7cf65970db64ea8b6004ad3008a8.zip |
* ext/openssl/extconf.rb: add check for win32 OpenSSL libraries.
* ext/openssl/extconf.rb: add check for __VA_AEGS__.
* ext/openssl/ossl.h: avoid non C99 compiler errors.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | ext/openssl/extconf.rb | 18 | ||||
-rw-r--r-- | ext/openssl/ossl.h | 2 |
3 files changed, 19 insertions, 15 deletions
@@ -1,3 +1,11 @@ +Thu Jul 24 15:50:42 JST 2003 GOTOU Yuuzou <gotoyuzo@notwork.org> + + * ext/openssl/extconf.rb: add check for win32 OpenSSL libraries. + + * ext/openssl/extconf.rb: add check for __VA_AEGS__. + + * ext/openssl/ossl.h: avoid non C99 compiler errors. + Thu Jul 24 13:32:56 2003 Yukihiro Matsumoto <matz@ruby-lang.org> * eval.c (thgroup_add): no warning for terminated threads. @@ -12672,7 +12680,7 @@ Fri Apr 13 16:41:18 2001 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (none): should clear cmdarg_stack too. -Fri Apr 13 06:19:29 2001 GOTOU YUUZOU <gotoyuzo@notwork.org> +Fri Apr 13 06:19:29 2001 GOTOU Yuuzou <gotoyuzo@notwork.org> * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on some platforms. @@ -14833,7 +14841,7 @@ Tue Sep 19 13:07:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (yylex): was confusing $~ and $_. -Tue Sep 19 13:06:53 2000 GOTOU YUUZOU <gotoyuzo@notwork.org> +Tue Sep 19 13:06:53 2000 GOTOU Yuuzou <gotoyuzo@notwork.org> * signal.c (rb_f_kill): signum may be a negative number, should be treated by signed number. @@ -17005,7 +17013,7 @@ Fri Feb 25 12:50:20 2000 Yukihiro Matsumoto <matz@netlab.co.jp> * eval.c (rb_thread_start_timer): interval changed to 10ms from 50ms. -Fri Feb 25 06:42:26 2000 GOTOU YUUZOU <gotoyuzo@notwork.org> +Fri Feb 25 06:42:26 2000 GOTOU Yuuzou <gotoyuzo@notwork.org> * ext/socket/socket.c (ip_addrsetup): hostp should remain NULL if host is nil. diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 8ebe3e7f1..2335fc680 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -18,14 +18,6 @@ require "mkmf" dir_config("openssl") -if RUBY_PLATFORM =~ /mswin32/ - CRYPTOLIB="libeay32" - SSLLIB="ssleay32" -else - CRYPTOLIB="crypto" - SSLLIB="ssl" -end - if !defined? message def message(*s) printf(*s) @@ -76,9 +68,10 @@ end message "=== Checking for required stuff... ===\n" result = have_header("openssl/crypto.h") -result &= have_library(CRYPTOLIB, "OpenSSL_add_all_digests") -result &= have_library(SSLLIB, "SSL_library_init") - +result &= ( have_library("crypto", "OpenSSL_add_all_digests") || + have_library("libeay32", "OpenSSL_add_all_digests") ) +result &= ( have_library("ssl", "SSL_library_init") || + have_library("ssleay32", "SSL_library_init") ) if !result message "=== Checking for required stuff failed. ===\n" message "Makefile wasn't created. Fix the errors above.\n" @@ -109,6 +102,9 @@ have_func("BN_mod_sqr") have_func("BN_mod_add") have_func("BN_mod_sub") have_func("CONF_get1_default_config_file") +if try_cpp("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n") + $defs.push("-DHAVE_VA_ARGS_MACRO") +end have_header("openssl/ocsp.h") have_struct_member("EVP_CIPHER_CTX", "flags", "openssl/evp.h") diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 2d921f37b..d334ad744 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -143,7 +143,7 @@ int ossl_verify_cb(int, X509_STORE_CTX *); */ extern VALUE dOSSL; -#if defined(__GNUC__) || __STDC_VERSION__ >= 199901L +#if defined(HAVE_VA_ARGS_MACRO) #define OSSL_Debug(fmt, ...) do { \ if (dOSSL == Qtrue) { \ fprintf(stderr, "OSSL_DEBUG: "); \ |