From 5cea368b61c716c5e6ff38f100ca2385e19a228d Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Sun, 19 Jun 2005 16:29:17 +0000 Subject: * ext/openssl/openssl_missing.c, ext/openssl/ossl.h, ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c, ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid compiler warnings. suggested by Mical Rokos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ ext/openssl/openssl_missing.c | 3 +++ ext/openssl/ossl.h | 2 +- ext/openssl/ossl_asn1.c | 4 +--- ext/openssl/ossl_bio.c | 3 +++ ext/openssl/ossl_pkcs12.h | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 056f261161..829c82af27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Jun 20 01:26:49 2005 GOTOU Yuuzou + + * ext/openssl/openssl_missing.c, ext/openssl/ossl.h, + ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c, + ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid + compiler warnings. suggested by Mical Rokos. + Sun Jun 19 17:22:02 CEST 2005 Michael Neumann * lib/xmlrpc/utils.rb: Patch by Nobuhiro IMAI fixes the following diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c index dfa5f90012..dd4e942cbb 100644 --- a/ext/openssl/openssl_missing.c +++ b/ext/openssl/openssl_missing.c @@ -106,6 +106,9 @@ HMAC_CTX_cleanup(HMAC_CTX *ctx) #endif #if !defined(HAVE_EVP_CIPHER_CTX_COPY) +#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE) +#include +#endif /* * this function does not exist in OpenSSL yet... or ever?. * a future version may break this function. diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index c5054beba2..f678ac1188 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -45,7 +45,7 @@ extern "C" { #include #undef X509_NAME #undef PKCS7_SIGNER_INFO -#if defined(HAVE_OPENSSL_ENGINE_H) && !defined(OPENSSL_NO_ENGINE) +#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE) # define OSSL_ENGINE_ENABLED # include #endif diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index 1ce5fa50c5..9f55f6c68c 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -42,21 +42,19 @@ asn1time_to_time(ASN1_TIME *time) } else { tm.tm_year += 1900; } - tm.tm_mon -= 1; break; case V_ASN1_GENERALIZEDTIME: if (sscanf(time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { ossl_raise(rb_eTypeError, "bad GENERALIZEDTIME format" ); } - tm.tm_mon -= 1; break; default: rb_warning("unknown time format"); return Qnil; } argv[0] = INT2NUM(tm.tm_year); - argv[1] = INT2NUM(tm.tm_mon+1); + argv[1] = INT2NUM(tm.tm_mon); argv[2] = INT2NUM(tm.tm_mday); argv[3] = INT2NUM(tm.tm_hour); argv[4] = INT2NUM(tm.tm_min); diff --git a/ext/openssl/ossl_bio.c b/ext/openssl/ossl_bio.c index eba6414339..9f22c97919 100644 --- a/ext/openssl/ossl_bio.c +++ b/ext/openssl/ossl_bio.c @@ -9,6 +9,9 @@ * (See the file 'LICENCE'.) */ #include "ossl.h" +#ifdef HAVE_UNISTD_H +#include +#endif BIO * ossl_obj2bio(VALUE obj) diff --git a/ext/openssl/ossl_pkcs12.h b/ext/openssl/ossl_pkcs12.h index fa73c4bec5..01dde2bc30 100644 --- a/ext/openssl/ossl_pkcs12.h +++ b/ext/openssl/ossl_pkcs12.h @@ -4,7 +4,7 @@ * $Id$ */ #if !defined(_OSSL_PKCS12_H_) -#define _OSSL_PKCS7_H_ +#define _OSSL_PKCS12_H_ extern VALUE mPKCS12; extern VALUE cPKCS12; -- cgit v1.2.3