pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases/sqlrelay



Module Name:    pkgsrc
Committed By:   taca
Date:           Mon Jun 12 17:06:18 UTC 2017

Modified Files:
        pkgsrc/databases/sqlrelay: distinfo
Added Files:
        pkgsrc/databases/sqlrelay/patches: patch-src_api_ruby_rubyincludes1.h
            patch-src_api_ruby_sqlrelay.cpp

Log Message:
Add fix for Ruby 2.4 and later.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/databases/sqlrelay/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_rubyincludes1.h \
    pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_sqlrelay.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/sqlrelay/distinfo
diff -u pkgsrc/databases/sqlrelay/distinfo:1.22 pkgsrc/databases/sqlrelay/distinfo:1.23
--- pkgsrc/databases/sqlrelay/distinfo:1.22     Mon Jan 16 13:13:13 2017
+++ pkgsrc/databases/sqlrelay/distinfo  Mon Jun 12 17:06:18 2017
@@ -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_nodejs_package__in.j
 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

Added files:

Index: pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_rubyincludes1.h
diff -u /dev/null pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_rubyincludes1.h:1.1
--- /dev/null   Mon Jun 12 17:06:18 2017
+++ pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_rubyincludes1.h        Mon Jun 12 17:06:18 2017
@@ -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)
Index: pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_sqlrelay.cpp
diff -u /dev/null pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_sqlrelay.cpp:1.1
--- /dev/null   Mon Jun 12 17:06:18 2017
+++ pkgsrc/databases/sqlrelay/patches/patch-src_api_ruby_sqlrelay.cpp   Mon Jun 12 17:06:18 2017
@@ -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