aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ruby_missing.h
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-09-24 16:59:33 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-09-24 16:59:33 +0900
commite72d960db2623b21ee001b5a7b9d9e6ff55bdf94 (patch)
treee8ca72f73d8f84498c556b94f2be24e5aa3e8ff8 /ext/openssl/ruby_missing.h
parent51ff8162bd454169010eadb8f2ef727402df04db (diff)
parent14e116554b56b722337b285adfc30481155dd1de (diff)
downloadruby-openssl-e72d960db2623b21ee001b5a7b9d9e6ff55bdf94.tar.gz
Merge branch 'maint'
* maint: Ruby/OpenSSL 2.0.6 test/test_engine: check if RC4 is supported test/test_engine: suppress stderr ossl.c: make legacy locking callbacks reentrant ossl.c: use struct CRYPTO_dynlock_value for non-dynamic locks ssl: prevent SSLSocket#sysread* from leaking uninitialized data test/test_pair: replace sleep with IO.select tool/ruby-openssl-docker: update test/test_ssl: do not run NPN tests for LibreSSL >= 2.6.1 test/test_ssl: skip tmp_ecdh_callback test for LibreSSL >= 2.6.1 test/test_pair: disable compression test/test_ssl: suppress warning in test_alpn_protocol_selection_cancel ruby.h: unnormalized Fixnum value test/test_pair: fix test_write_nonblock{,_no_exceptions}
Diffstat (limited to 'ext/openssl/ruby_missing.h')
-rw-r--r--ext/openssl/ruby_missing.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/openssl/ruby_missing.h b/ext/openssl/ruby_missing.h
index b8a0a0c1..069acc8b 100644
--- a/ext/openssl/ruby_missing.h
+++ b/ext/openssl/ruby_missing.h
@@ -10,9 +10,15 @@
#if !defined(_OSSL_RUBY_MISSING_H_)
#define _OSSL_RUBY_MISSING_H_
+/* Ruby 2.4 */
#ifndef RB_INTEGER_TYPE_P
-/* for Ruby 2.3 compatibility */
-#define RB_INTEGER_TYPE_P(obj) (RB_FIXNUM_P(obj) || RB_TYPE_P(obj, T_BIGNUM))
+# define RB_INTEGER_TYPE_P(obj) (RB_FIXNUM_P(obj) || RB_TYPE_P(obj, T_BIGNUM))
+#endif
+
+/* Ruby 2.5 */
+#ifndef ST2FIX
+# define RB_ST2FIX(h) LONG2FIX((long)(h))
+# define ST2FIX(h) RB_ST2FIX(h)
#endif
#endif /* _OSSL_RUBY_MISSING_H_ */