From nobody at rubyforge.org Sat Jul 16 09:27:27 2011 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 16 Jul 2011 09:27:27 -0400 (EDT) Subject: [ruby-oci8-commit] [435] trunk/ruby-oci8/ext/oci8: * ext/oci8/oraconf.rb: Fix for Oracle 11g solaris-sparc32 instant client. Message-ID: <20110716132727.6F98F18583B6@rubyforge.org> Revision: 435 Author: kubo Date: 2011-07-16 09:27:26 -0400 (Sat, 16 Jul 2011) Log Message: ----------- * ext/oci8/oraconf.rb: Fix for Oracle 11g solaris-sparc32 instant client. The machine type of Oracle 10g solaris-sparc32 instant client was sparc but that of oracle 11g is sparc32plus. (Reported by Sanjiv Patel.) Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/ext/oci8/oraconf.rb trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/ext/oci8/oraconf.rb Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2011-06-15 12:56:35 UTC (rev 434) +++ branches/ruby-oci8-2.0/ChangeLog 2011-07-16 13:27:26 UTC (rev 435) @@ -1,3 +1,9 @@ +2011-07-16 KUBO Takehiro + * ext/oci8/oraconf.rb: Fix for Oracle 11g solaris-sparc32 instant client. + The machine type of Oracle 10g solaris-sparc32 instant client was + sparc but that of oracle 11g is sparc32plus. + (Reported by Sanjiv Patel.) + 2011-06-14 KUBO Takehiro * NEWS: add changes between 2.0.5 and 2.0.6. * VERSION: change the version to 2.0.6. Modified: branches/ruby-oci8-2.0/ext/oci8/oraconf.rb =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/oraconf.rb 2011-06-15 12:56:35 UTC (rev 434) +++ branches/ruby-oci8-2.0/ext/oci8/oraconf.rb 2011-07-16 13:27:26 UTC (rev 435) @@ -148,7 +148,7 @@ read_mach_o_unversal(f) else # AIX and Tru64 - raise format("unknown file header: %02x %02x", file_header[0], file_header[1]) + raise format("unknown file header: %02x %02x", file_header[0].to_i, file_header[1].to_i) end ensure f.close @@ -193,6 +193,8 @@ @cpu = :i386 when 15 @cpu = :parisc + when 18 + @cpu = :sparc32plus when 20 @cpu = :ppc when 21 @@ -378,10 +380,10 @@ private - def self.make_proc_to_check_cpu(expect) + def self.make_proc_to_check_cpu(*expect) Proc.new do |file| so = MiniSOReader.new(file) - if so.cpu == expect + if expect.include? so.cpu true else puts " skip: #{file} is for #{so.cpu} cpu." @@ -432,7 +434,7 @@ if is_32bit @@ld_envs = %w[LD_LIBRARY_PATH_32 LD_LIBRARY_PATH] if is_big_endian - check_proc = make_proc_to_check_cpu(:sparc) + check_proc = make_proc_to_check_cpu(:sparc, :sparc32plus) else check_proc = make_proc_to_check_cpu(:i386) end Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2011-06-15 12:56:35 UTC (rev 434) +++ trunk/ruby-oci8/ChangeLog 2011-07-16 13:27:26 UTC (rev 435) @@ -1,3 +1,9 @@ +2011-07-16 KUBO Takehiro + * ext/oci8/oraconf.rb: Fix for Oracle 11g solaris-sparc32 instant client. + The machine type of Oracle 10g solaris-sparc32 instant client was + sparc but that of oracle 11g is sparc32plus. + (Reported by Sanjiv Patel.) + 2011-06-15 KUBO Takehiro * ext/oci8/apiwrap.yml, ext/oci8/bind.c, ext/oci8/oci8.c, ext/oci8/oci8lib.c, lib/oci8/bindtype.rb: drop Oracle 8i support. Modified: trunk/ruby-oci8/ext/oci8/oraconf.rb =================================================================== --- trunk/ruby-oci8/ext/oci8/oraconf.rb 2011-06-15 12:56:35 UTC (rev 434) +++ trunk/ruby-oci8/ext/oci8/oraconf.rb 2011-07-16 13:27:26 UTC (rev 435) @@ -148,7 +148,7 @@ read_mach_o_unversal(f) else # AIX and Tru64 - raise format("unknown file header: %02x %02x", file_header[0], file_header[1]) + raise format("unknown file header: %02x %02x", file_header[0].to_i, file_header[1].to_i) end ensure f.close @@ -193,6 +193,8 @@ @cpu = :i386 when 15 @cpu = :parisc + when 18 + @cpu = :sparc32plus when 20 @cpu = :ppc when 21 @@ -378,10 +380,10 @@ private - def self.make_proc_to_check_cpu(expect) + def self.make_proc_to_check_cpu(*expect) Proc.new do |file| so = MiniSOReader.new(file) - if so.cpu == expect + if expect.include? so.cpu true else puts " skip: #{file} is for #{so.cpu} cpu." @@ -432,7 +434,7 @@ if is_32bit @@ld_envs = %w[LD_LIBRARY_PATH_32 LD_LIBRARY_PATH] if is_big_endian - check_proc = make_proc_to_check_cpu(:sparc) + check_proc = make_proc_to_check_cpu(:sparc, :sparc32plus) else check_proc = make_proc_to_check_cpu(:i386) end From nobody at rubyforge.org Sat Jul 16 09:32:48 2011 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 16 Jul 2011 09:32:48 -0400 (EDT) Subject: [ruby-oci8-commit] [436] trunk/ruby-oci8/ext/oci8: * ext/oci8/extconf.rb, ext/oci8/oci8.h: fix for Solaris compiler. Message-ID: <20110716133248.9CBFD18583B6@rubyforge.org> Revision: 436 Author: kubo Date: 2011-07-16 09:32:48 -0400 (Sat, 16 Jul 2011) Log Message: ----------- * ext/oci8/extconf.rb, ext/oci8/oci8.h: fix for Solaris compiler. (Reported by Sanjiv Patel.) Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/ext/oci8/extconf.rb branches/ruby-oci8-2.0/ext/oci8/oci8.h trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/ext/oci8/extconf.rb trunk/ruby-oci8/ext/oci8/oci8.h Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2011-07-16 13:27:26 UTC (rev 435) +++ branches/ruby-oci8-2.0/ChangeLog 2011-07-16 13:32:48 UTC (rev 436) @@ -1,4 +1,8 @@ 2011-07-16 KUBO Takehiro + * ext/oci8/extconf.rb, ext/oci8/oci8.h: fix for Solaris compiler. + (Reported by Sanjiv Patel.) + +2011-07-16 KUBO Takehiro * ext/oci8/oraconf.rb: Fix for Oracle 11g solaris-sparc32 instant client. The machine type of Oracle 10g solaris-sparc32 instant client was sparc but that of oracle 11g is sparc32plus. Modified: branches/ruby-oci8-2.0/ext/oci8/extconf.rb =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2011-07-16 13:27:26 UTC (rev 435) +++ branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2011-07-16 13:32:48 UTC (rev 436) @@ -112,7 +112,7 @@ have_var("ruby_errinfo", "ruby.h") # ruby 1.8 have_func("rb_errinfo", "ruby.h") # ruby 1.9 -have_type("rb_blocking_function_t", "ruby.h") +have_type("rb_blocking_function_t*", "ruby.h") have_func("rb_set_end_proc", "ruby.h") have_func("rb_class_superclass", "ruby.h") have_func("rb_thread_blocking_region", "ruby.h") Modified: branches/ruby-oci8-2.0/ext/oci8/oci8.h =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/oci8.h 2011-07-16 13:27:26 UTC (rev 435) +++ branches/ruby-oci8-2.0/ext/oci8/oci8.h 2011-07-16 13:32:48 UTC (rev 436) @@ -132,7 +132,7 @@ #if !defined(HAVE_RB_ERRINFO) && defined(HAVE_RUBY_ERRINFO) #define rb_errinfo() ruby_errinfo #endif -#ifndef HAVE_TYPE_RB_BLOCKING_FUNCTION_T +#if !defined HAVE_TYPE_RB_BLOCKING_FUNCTION_T_ && !defined HAVE_TYPE_RB_BLOCKING_FUNCTION_TP typedef VALUE rb_blocking_function_t(void *); #endif Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2011-07-16 13:27:26 UTC (rev 435) +++ trunk/ruby-oci8/ChangeLog 2011-07-16 13:32:48 UTC (rev 436) @@ -1,4 +1,8 @@ 2011-07-16 KUBO Takehiro + * ext/oci8/extconf.rb, ext/oci8/oci8.h: fix for Solaris compiler. + (Reported by Sanjiv Patel.) + +2011-07-16 KUBO Takehiro * ext/oci8/oraconf.rb: Fix for Oracle 11g solaris-sparc32 instant client. The machine type of Oracle 10g solaris-sparc32 instant client was sparc but that of oracle 11g is sparc32plus. Modified: trunk/ruby-oci8/ext/oci8/extconf.rb =================================================================== --- trunk/ruby-oci8/ext/oci8/extconf.rb 2011-07-16 13:27:26 UTC (rev 435) +++ trunk/ruby-oci8/ext/oci8/extconf.rb 2011-07-16 13:32:48 UTC (rev 436) @@ -114,7 +114,7 @@ have_var("ruby_errinfo", "ruby.h") # ruby 1.8 have_func("rb_errinfo", "ruby.h") # ruby 1.9 -have_type("rb_blocking_function_t", "ruby.h") +have_type("rb_blocking_function_t*", "ruby.h") have_func("rb_set_end_proc", "ruby.h") have_func("rb_class_superclass", "ruby.h") have_func("rb_thread_blocking_region", "ruby.h") Modified: trunk/ruby-oci8/ext/oci8/oci8.h =================================================================== --- trunk/ruby-oci8/ext/oci8/oci8.h 2011-07-16 13:27:26 UTC (rev 435) +++ trunk/ruby-oci8/ext/oci8/oci8.h 2011-07-16 13:32:48 UTC (rev 436) @@ -135,7 +135,7 @@ #if !defined(HAVE_RB_ERRINFO) && defined(HAVE_RUBY_ERRINFO) #define rb_errinfo() ruby_errinfo #endif -#ifndef HAVE_TYPE_RB_BLOCKING_FUNCTION_T +#if !defined HAVE_TYPE_RB_BLOCKING_FUNCTION_T_ && !defined HAVE_TYPE_RB_BLOCKING_FUNCTION_TP typedef VALUE rb_blocking_function_t(void *); #endif