[ruby-oci8-commit] [355] trunk/ruby-oci8/ext/oci8: * ext/oci8/oraconf.rb: Fixed to compile for AIX instant clients.
nobody at rubyforge.org
nobody at rubyforge.org
Sat Sep 12 08:18:57 EDT 2009
Revision: 355
Author: kubo
Date: 2009-09-12 08:18:56 -0400 (Sat, 12 Sep 2009)
Log Message:
-----------
* ext/oci8/oraconf.rb: Fixed to compile for AIX instant clients.
(reported by Kazuya Teramoto)
Modified Paths:
--------------
branches/ruby-oci8-1.0/ChangeLog
branches/ruby-oci8-1.0/ext/oci8/oraconf.rb
trunk/ruby-oci8/ChangeLog
trunk/ruby-oci8/ext/oci8/oraconf.rb
Modified: branches/ruby-oci8-1.0/ChangeLog
===================================================================
--- branches/ruby-oci8-1.0/ChangeLog 2009-06-09 13:47:15 UTC (rev 354)
+++ branches/ruby-oci8-1.0/ChangeLog 2009-09-12 12:18:56 UTC (rev 355)
@@ -1,3 +1,7 @@
+2009-09-12 KUBO Takehiro <kubo at jiubao.org>
+ * ext/oci8/oraconf.rb: Fixed to compile for AIX instant clients.
+ (reported by Kazuya Teramoto)
+
2009-05-17 KUBO Takehiro <kubo at jiubao.org>
* NEWS: add changes between 1.0.5 and 1.0.6.
* VERSION: change version to 1.0.6.
Modified: branches/ruby-oci8-1.0/ext/oci8/oraconf.rb
===================================================================
--- branches/ruby-oci8-1.0/ext/oci8/oraconf.rb 2009-06-09 13:47:15 UTC (rev 354)
+++ branches/ruby-oci8-1.0/ext/oci8/oraconf.rb 2009-09-12 12:18:56 UTC (rev 355)
@@ -383,15 +383,16 @@
# get library load path names
oci_basename = 'libclntsh'
oci_glob_postfix = '.[0-9]*'
- ocidata_basename = ['libociei', 'libociicus']
+ nls_data_basename = ['libociei', 'libociicus']
@@ld_envs = %w[LD_LIBRARY_PATH]
so_ext = 'so'
+ nls_data_ext = nil
check_proc = nil
case RUBY_PLATFORM
when /mswin32|cygwin|mingw32|bccwin32/
oci_basename = 'oci'
oci_glob_postfix = ''
- ocidata_basename = ['oraociei11', 'oraociicus11', 'oraociei10', 'oraociicus10']
+ nls_data_basename = ['oraociei11', 'oraociicus11', 'oraociei10', 'oraociicus10']
@@ld_envs = %w[PATH]
so_ext = 'dll'
when /i.86-linux/
@@ -434,6 +435,7 @@
oci_glob_postfix = ''
@@ld_envs = %w[LIBPATH]
so_ext = 'a'
+ nls_data_ext = 'so'
when /hppa.*-hpux/
if [0].pack('l!').length == 4
@@ld_envs = %w[SHLIB_PATH]
@@ -529,8 +531,9 @@
end
if ld_path
- ocidata_basename.each do |basename|
- if File.exist?(File.join(ld_path, "#{basename}.#{so_ext}"))
+ nls_data_ext ||= so_ext # nls_data_ext is same with so_ext by default.
+ nls_data_basename.each do |basename|
+ if File.exist?(File.join(ld_path, "#{basename}.#{nls_data_ext}"))
puts " #{file} looks like an instant client."
return ld_path
end
Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog 2009-06-09 13:47:15 UTC (rev 354)
+++ trunk/ruby-oci8/ChangeLog 2009-09-12 12:18:56 UTC (rev 355)
@@ -1,3 +1,7 @@
+2009-09-12 KUBO Takehiro <kubo at jiubao.org>
+ * ext/oci8/oraconf.rb: Fixed to compile for AIX instant clients.
+ (reported by Kazuya Teramoto)
+
2009-06-09 KUBO Takehiro <kubo at jiubao.org>
* ext/oci8/oci8lib.c: Change the initial polling interval of
non-blocking mode for ruby 1.8 from 100 msec to 10 msec, which
Modified: trunk/ruby-oci8/ext/oci8/oraconf.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/oraconf.rb 2009-06-09 13:47:15 UTC (rev 354)
+++ trunk/ruby-oci8/ext/oci8/oraconf.rb 2009-09-12 12:18:56 UTC (rev 355)
@@ -383,15 +383,16 @@
# get library load path names
oci_basename = 'libclntsh'
oci_glob_postfix = '.[0-9]*'
- ocidata_basename = ['libociei', 'libociicus']
+ nls_data_basename = ['libociei', 'libociicus']
@@ld_envs = %w[LD_LIBRARY_PATH]
so_ext = 'so'
+ nls_data_ext = nil
check_proc = nil
case RUBY_PLATFORM
when /mswin32|cygwin|mingw32|bccwin32/
oci_basename = 'oci'
oci_glob_postfix = ''
- ocidata_basename = ['oraociei11', 'oraociicus11', 'oraociei10', 'oraociicus10']
+ nls_data_basename = ['oraociei11', 'oraociicus11', 'oraociei10', 'oraociicus10']
@@ld_envs = %w[PATH]
so_ext = 'dll'
when /i.86-linux/
@@ -434,6 +435,7 @@
oci_glob_postfix = ''
@@ld_envs = %w[LIBPATH]
so_ext = 'a'
+ nls_data_ext = 'so'
when /hppa.*-hpux/
if [0].pack('l!').length == 4
@@ld_envs = %w[SHLIB_PATH]
@@ -529,8 +531,9 @@
end
if ld_path
- ocidata_basename.each do |basename|
- if File.exist?(File.join(ld_path, "#{basename}.#{so_ext}"))
+ nls_data_ext ||= so_ext # nls_data_ext is same with so_ext by default.
+ nls_data_basename.each do |basename|
+ if File.exist?(File.join(ld_path, "#{basename}.#{nls_data_ext}"))
puts " #{file} looks like an instant client."
return ld_path
end
More information about the ruby-oci8-commit
mailing list