diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-23 19:08:35 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-23 19:08:35 +0000 |
| commit | 93acee23217f61a1a2d37f6343c4da8679a2ffd4 (patch) | |
| tree | cf6c55517974848407b5938e1380b89574252b8f | |
| parent | 41aa68faa51bf9f2e967cba9aed727c38bf433c6 (diff) | |
| download | ruby-93acee23217f61a1a2d37f6343c4da8679a2ffd4.tar.gz ruby-93acee23217f61a1a2d37f6343c4da8679a2ffd4.tar.xz ruby-93acee23217f61a1a2d37f6343c4da8679a2ffd4.zip | |
* ext/openssl/ssl.h: undef X509_NAME and PKCS7_SIGNER_INFO to
avoid name confliction on mswin32.
* ext/openssl/ssl.c (ossl_protect_obj2bio): avoid VC++ warnings
in function prototype.
* ext/openssl/ssl.c (ossl_protect_membio2str): ditto.
* ext/openssl/ssl.c (ossl_protect_x509_ary2sk): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 12 | ||||
| -rw-r--r-- | ext/openssl/ossl.c | 6 | ||||
| -rw-r--r-- | ext/openssl/ossl.h | 2 |
3 files changed, 17 insertions, 3 deletions
@@ -1,3 +1,15 @@ +Thu Jul 24 04:05:46 2003 GOTOU Yuuzou <gotoyuzo@notwork.org> + + * ext/openssl/ssl.h: undef X509_NAME and PKCS7_SIGNER_INFO to + avoid name confliction on mswin32. + + * ext/openssl/ssl.c (ossl_protect_obj2bio): avoid VC++ warnings + in function prototype. + + * ext/openssl/ssl.c (ossl_protect_membio2str): ditto. + + * ext/openssl/ssl.c (ossl_protect_x509_ary2sk): ditto. + Thu Jul 24 03:44:04 2003 Michal Rokos <m.rokos@sh.cvut.cz> * ext/openssl/extconf.rb: cut check for OpenSSL version diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index ab4572d2c..559f8806a 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -207,7 +207,7 @@ BIO * ossl_protect_obj2bio(VALUE obj, int *status) { BIO *ret = NULL; - ret = (BIO*)rb_protect((VALUE(*)())ossl_obj2bio, obj, status); + ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status); return ret; } @@ -226,7 +226,7 @@ ossl_membio2str(BIO *bio) VALUE ossl_protect_membio2str(BIO *bio, int *status) { - return rb_protect((VALUE(*)())ossl_membio2str, (VALUE)bio, status); + return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str, (VALUE)bio, status); } STACK_OF(X509) * @@ -256,7 +256,7 @@ ossl_x509_ary2sk(VALUE ary) STACK_OF(X509) * ossl_protect_x509_ary2sk(VALUE ary, int *status) { - return (STACK_OF(X509)*)rb_protect((VALUE(*)())ossl_x509_ary2sk, ary, status); + return (STACK_OF(X509)*)rb_protect((VALUE(*)_((VALUE)))ossl_x509_ary2sk, ary, status); } #if 0 diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index e1cd09ce4..2d921f37b 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -34,6 +34,8 @@ extern "C" { #include <openssl/ssl.h> #include <openssl/hmac.h> #include <openssl/rand.h> +#undef X509_NAME +#undef PKCS7_SIGNER_INFO #if defined(HAVE_OPENSSL_OCSP_H) # define OSSL_OCSP_ENABLED # include <openssl/ocsp.h> |
