Brian Candler <B.Candler / pobox.com> writes:

> Some notes/comments on ruby-oci8-0.1.3 which I've just been struggling to
> install on a Solaris 2.8/Oracle 9.2.0 system - may be helpful to anyone else
> attempting the same.
(snip)
> The solution is to edit src/oraconf.rb, change
> 'NOKPIC_CCFLAGS=' to 'NOKPIC_CCFLAGS32=' and 'build' to 'build32' in these
> two places:
>
>           make_opt += " KPIC_OPTION= NOKPIC_CCFLAGS32="
> ...
>           command = "|make -f #{@oracle_home}/rdbms/demo/demo_rdbms.mk build32 #{make_opt}"
>
> After that it compiles!

Does gcc make 32 bit object in any case? If so, I'll change oraconf.rb
as following.

--- oraconf.rb~	2003-03-08 22:29:01.000000000 +0900
+++ oraconf.rb	2003-05-02 22:45:05.000000000 +0900
@@ -211,12 +211,18 @@
 	  STDOUT.flush
 
 	  make_opt = "CC='echo MARKER' EXE=/dev/null ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh'"
+	  make_target = 'build'
 	  if @cc_is_gcc && /solaris/ =~ RUBY_PLATFORM
 		# suggested by Brian Candler.
-		make_opt += " KPIC_OPTION= NOKPIC_CCFLAGS="
+		if /92./ =~ @version 
+		  make_opt += " KPIC_OPTION= NOKPIC_CCFLAGS32="
+		  make_target = 'build32'
+		else
+		  make_opt += " KPIC_OPTION= NOKPIC_CCFLAGS="
+		end
 	  end
 
-	  command = "|make -f #{@oracle_home}/rdbms/demo/demo_rdbms.mk build #{make_opt}"
+	  command = "|make -f #{@oracle_home}/rdbms/demo/demo_rdbms.mk #{make_target} #{make_opt}"
 	  marker = /^\s*MARKER/					 
 	  echo = /^\s*echo/
 	  libs = nil

> The other suggestion I have is a patch for OraDate (part of this has been
> submitted already). The attached patch does two things:
>
> - adds a compare (<=>) operator. In particular this allows you to do
>      if date1 == date2 ...
>   which otherwise fails.

Thanks. I accept your patch about this.

> - changes the default to_s format from
>          YYYY/MM/DD HH:MM:SS
>   to     YYYY-MM-DD HH:MM:SS
>
>   The latter is, I believe, a more accurate ISO date format. It also happens
>   to be the same as mysql provides.

Hmm, I don't accept your patch about this.

If I change that format, I'll do it on major version up.
On minor version up users will expect that the program running on
older version will run on newer version without change. Your patch may
cause problems on some other programs.

In addition OraDate will be obsolete or deprecated on the next major
release. OCIDate (see $ORACLE_HOME/rdbms/demo/orl.h) or OCI::Date will
be used instead of OraDate. You can change default format as following.
    OCIDate.format = 'YYYY-MM-DD HH24:MM:SS'

-- 
KUBO Takehiro