[前][次][番号順一覧][スレッド一覧]

ruby-changes:37035

From: hsbt <ko1@a...>
Date: Sat, 3 Jan 2015 11:50:53 +0900 (JST)
Subject: [ruby-changes:37035] hsbt:r49116 (trunk): * ext/openssl/ossl.h: avoid to build failure of Windows environment.

hsbt	2015-01-03 11:50:31 +0900 (Sat, 03 Jan 2015)

  New Revision: 49116

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49116

  Log:
    * ext/openssl/ossl.h: avoid to build failure of Windows environment.
    * ext/openssl/ossl_ssl_session.c: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/ossl.h
    trunk/ext/openssl/ossl_ssl_session.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49115)
+++ ChangeLog	(revision 49116)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jan  3 11:50:16 2015  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* ext/openssl/ossl.h: avoid to build failure of Windows environment.
+	* ext/openssl/ossl_ssl_session.c: ditto.
+
 Sat Jan  3 11:27:46 2015  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* array.c: Improve performance of Array#shift. use shared instead of
Index: ext/openssl/ossl.h
===================================================================
--- ext/openssl/ossl.h	(revision 49115)
+++ ext/openssl/ossl.h	(revision 49116)
@@ -64,7 +64,9 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.h#L64
 #include <openssl/rand.h>
 #include <openssl/conf.h>
 #include <openssl/conf_api.h>
-#include <openssl/crypto.h>
+#if !defined(_WIN32)
+#  include <openssl/crypto.h>
+#endif
 #undef X509_NAME
 #undef PKCS7_SIGNER_INFO
 #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
Index: ext/openssl/ossl_ssl_session.c
===================================================================
--- ext/openssl/ossl_ssl_session.c	(revision 49115)
+++ ext/openssl/ossl_ssl_session.c	(revision 49116)
@@ -79,7 +79,11 @@ int SSL_SESSION_cmp(const SSL_SESSION *a https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl_session.c#L79
     if (a->ssl_version != b->ssl_version ||
 	a->session_id_length != b->session_id_length)
 	return 1;
+#if defined(_WIN32)
+    return memcmp(a->session_id, b->session_id, a->session_id_length);
+#else
     return CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length);
+#endif
 }
 #endif
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]