From 397ebbc62dafef02c9c47ea2d67fd31253f7b81b Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 7 Jun 2023 03:44:07 +0900 Subject: [PATCH] [ruby/openssl] Drop support for Ruby 2.6 Ruby 2.6 has reached EOL on 2022-03. Requiring Ruby 2.7 allows us to use C99 syntax. https://github.com/ruby/openssl/commit/f6ba75e51e --- ext/openssl/openssl.gemspec | 2 +- ext/openssl/ossl.c | 16 ---------------- ext/openssl/ossl.h | 6 ------ 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/ext/openssl/openssl.gemspec b/ext/openssl/openssl.gemspec index 3a2f64f6767d8c..674dc20debf05b 100644 --- a/ext/openssl/openssl.gemspec +++ b/ext/openssl/openssl.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.extra_rdoc_files = Dir["*.md"] spec.rdoc_options = ["--main", "README.md"] - spec.required_ruby_version = ">= 2.6.0" + spec.required_ruby_version = ">= 2.7.0" spec.metadata["msys2_mingw_dependencies"] = "openssl" end diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 81069c8b93fa0e..c3b9f47a01dd1b 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -369,22 +369,6 @@ ossl_get_errors(VALUE _) */ VALUE dOSSL; -#if !defined(HAVE_VA_ARGS_MACRO) -void -ossl_debug(const char *fmt, ...) -{ - va_list args; - - if (dOSSL == Qtrue) { - fprintf(stderr, "OSSL_DEBUG: "); - va_start(args, fmt); - vfprintf(stderr, fmt, args); - va_end(args); - fprintf(stderr, " [CONTEXT N/A]\n"); - } -} -#endif - /* * call-seq: * OpenSSL.debug -> true | false diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index facb80aa73cdcd..8add914fd7baf4 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -157,7 +157,6 @@ VALUE ossl_to_der_if_possible(VALUE); */ extern VALUE dOSSL; -#if defined(HAVE_VA_ARGS_MACRO) #define OSSL_Debug(...) do { \ if (dOSSL == Qtrue) { \ fprintf(stderr, "OSSL_DEBUG: "); \ @@ -166,11 +165,6 @@ extern VALUE dOSSL; } \ } while (0) -#else -void ossl_debug(const char *, ...); -#define OSSL_Debug ossl_debug -#endif - /* * Include all parts */