pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases/sqlrelay Add fix for Ruby 2.4 and later.
details: https://anonhg.NetBSD.org/pkgsrc/rev/e90e97153f45
branches: trunk
changeset: 363612:e90e97153f45
user: taca <taca%pkgsrc.org@localhost>
date: Mon Jun 12 17:06:18 2017 +0000
description:
Add fix for Ruby 2.4 and later.
diffstat:
databases/sqlrelay/distinfo | 4 +-
databases/sqlrelay/patches/patch-src_api_ruby_rubyincludes1.h | 9 +
databases/sqlrelay/patches/patch-src_api_ruby_sqlrelay.cpp | 77 +++++++++++
3 files changed, 89 insertions(+), 1 deletions(-)
diffs (109 lines):
diff -r dea70020a757 -r e90e97153f45 databases/sqlrelay/distinfo
--- a/databases/sqlrelay/distinfo Mon Jun 12 17:02:00 2017 +0000
+++ b/databases/sqlrelay/distinfo Mon Jun 12 17:06:18 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2017/01/16 13:13:13 fhajny Exp $
+$NetBSD: distinfo,v 1.23 2017/06/12 17:06:18 taca Exp $
SHA1 (sqlrelay-1.0.0.tar.gz) = 3f350a71fea8177a8e003524b6833347f741153b
RMD160 (sqlrelay-1.0.0.tar.gz) = 1bc6c1ac02eb8a58c1aa8e2bacd0c8662a283aad
@@ -12,3 +12,5 @@
SHA1 (patch-src_api_php_sql__relay.cpp) = 9e33260f4e4331874187e5b30db17d4478710385
SHA1 (patch-src_api_ruby_getcflags.rb) = 033e26ef03db4851f493d831c37ec947662d47ee
SHA1 (patch-src_api_ruby_getsitearchdir.rb) = 603c66ed45f854b833eefbcdbd58e41465fb8120
+SHA1 (patch-src_api_ruby_rubyincludes1.h) = 7b06afbbdfc4d0ab4fd1288336eea795f4e1bce7
+SHA1 (patch-src_api_ruby_sqlrelay.cpp) = 3081ffd0e2a373c14e6dd602728f72a1dfb6461b
diff -r dea70020a757 -r e90e97153f45 databases/sqlrelay/patches/patch-src_api_ruby_rubyincludes1.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/sqlrelay/patches/patch-src_api_ruby_rubyincludes1.h Mon Jun 12 17:06:18 2017 +0000
@@ -0,0 +1,9 @@
+$NetBSD: patch-src_api_ruby_rubyincludes1.h,v 1.1 2017/06/12 17:06:18 taca Exp $
+
+Use better cast for Ruby 2.1 and later.
+
+--- src/api/ruby/rubyincludes1.h.orig 2016-12-20 08:40:41.000000000 +0000
++++ src/api/ruby/rubyincludes1.h
+@@ -1 +1 @@
+-#define CAST VALUE(*)()
++#define CAST VALUE(*)(ANYARGS)
diff -r dea70020a757 -r e90e97153f45 databases/sqlrelay/patches/patch-src_api_ruby_sqlrelay.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/sqlrelay/patches/patch-src_api_ruby_sqlrelay.cpp Mon Jun 12 17:06:18 2017 +0000
@@ -0,0 +1,77 @@
+$NetBSD: patch-src_api_ruby_sqlrelay.cpp,v 1.1 2017/06/12 17:06:18 taca Exp $
+
+Fix for Ruby 2.4 and later.
+
+--- src/api/ruby/sqlrelay.cpp.orig 2016-12-20 08:40:41.000000000 +0000
++++ src/api/ruby/sqlrelay.cpp
+@@ -922,9 +922,11 @@ static VALUE sqlrcur_substitution(int ar
+ Data_Get_Struct(self,sqlrcursor,sqlrcur);
+ if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
+ sqlrcur->substitution(STR2CSTR(variable),STR2CSTR(value));
+- } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
++ } else if (rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#ifndef RUBY_INTEGER_UNIFICATION
++ rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
+ rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
+- rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#endif
+ rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
+ sqlrcur->substitution(STR2CSTR(variable),NUM2INT(value));
+ } else if (rb_obj_is_instance_of(value,rb_cFloat)==Qtrue) {
+@@ -958,9 +960,12 @@ static VALUE sqlrcur_inputBind(int argc,
+ rb_scan_args(argc,argv,"22",&variable,&value,&precision,&scale);
+ Data_Get_Struct(self,sqlrcursor,sqlrcur);
+ if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
+- if ((rb_obj_is_instance_of(precision,rb_cBignum)==Qtrue ||
++ if ((rb_obj_is_instance_of(precision,rb_cInteger)==Qtrue ||
++
++#ifndef RUBY_INTEGER_UNIFICATION
++ rb_obj_is_instance_of(precision,rb_cBignum)==Qtrue ||
+ rb_obj_is_instance_of(precision,rb_cFixnum)==Qtrue ||
+- rb_obj_is_instance_of(precision,rb_cInteger)==Qtrue ||
++#endif
+ rb_obj_is_instance_of(precision,rb_cNumeric)==Qtrue) &&
+ NUM2INT(precision)>0) {
+ // in this case, the precision parameter is actually
+@@ -970,9 +975,11 @@ static VALUE sqlrcur_inputBind(int argc,
+ } else {
+ sqlrcur->inputBind(STR2CSTR(variable),STR2CSTR(value));
+ }
+- } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
++ } else if (rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#ifndef RUBY_INTEGER_UNIFICATION
++ rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
+ rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
+- rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#endif
+ rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
+ sqlrcur->inputBind(STR2CSTR(variable),NUM2INT(value));
+ } else if (rb_obj_is_instance_of(value,rb_cFloat)==Qtrue) {
+@@ -1140,9 +1147,11 @@ static VALUE sqlrcur_substitutions(int a
+ if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
+ sqlrcur->substitution(STR2CSTR(variable),
+ STR2CSTR(value));
+- } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
++ } else if (rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#ifndef RUBY_INTEGER_UNIFICATION
++ rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
+ rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
+- rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#endif
+ rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
+ sqlrcur->substitution(STR2CSTR(variable),
+ NUM2INT(value));
+@@ -1197,9 +1206,11 @@ static VALUE sqlrcur_inputBinds(int argc
+ }
+ if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
+ sqlrcur->inputBind(STR2CSTR(variable),STR2CSTR(value));
+- } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
++ } else if (rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#ifndef RUBY_INTEGER_UNIFICATION
++ rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
+ rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
+- rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
++#endif
+ rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
+ sqlrcur->inputBind(STR2CSTR(variable),NUM2INT(value));
+ } else if (rb_obj_is_instance_of(value,rb_cFloat)==Qtrue) {
Home |
Main Index |
Thread Index |
Old Index