[ruby-oci8-commit] [381] trunk/ruby-oci8: * ext/oci8/error.c, ext/oci8/extconf.rb, ext/oci8/ oci8.h: fix for

nobody at rubyforge.org nobody at rubyforge.org
Sat Feb 27 07:32:53 EST 2010


Revision: 381
Author:   kubo
Date:     2010-02-27 07:32:53 -0500 (Sat, 27 Feb 2010)

Log Message:
-----------
* ext/oci8/error.c, ext/oci8/extconf.rb, ext/oci8/oci8.h: fix for
    old Oracle versions, which lack declarations of OCIMsg, oraub8,
    orasb8 and OCI_DURATION_PROCESS.
* ext/oci8/ocihandle.c: fix for mingw compiler.

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/ext/oci8/error.c
    trunk/ruby-oci8/ext/oci8/extconf.rb
    trunk/ruby-oci8/ext/oci8/oci8.h
    trunk/ruby-oci8/ext/oci8/ocihandle.c

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2010-02-27 10:43:28 UTC (rev 380)
+++ trunk/ruby-oci8/ChangeLog	2010-02-27 12:32:53 UTC (rev 381)
@@ -1,4 +1,10 @@
 2010-02-27  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/error.c, ext/oci8/extconf.rb, ext/oci8/oci8.h: fix for
+	    old Oracle versions, which lack declarations of OCIMsg, oraub8,
+	    orasb8 and OCI_DURATION_PROCESS.
+	* ext/oci8/ocihandle.c: fix for mingw compiler.
+
+2010-02-27  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/apiwrap.yml, ext/oci8/error.c, ext/oci8/oci8.h,
 	  ext/oci8/ocinumber.c: fix for Oracle 8.0 client, which doesn't
 	    have OCIMessageOpen() and OCIMessageGet().

Modified: trunk/ruby-oci8/ext/oci8/error.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/error.c	2010-02-27 10:43:28 UTC (rev 380)
+++ trunk/ruby-oci8/ext/oci8/error.c	2010-02-27 12:32:53 UTC (rev 381)
@@ -34,6 +34,10 @@
 
 static OCIMsg *msghp;
 
+#ifndef OCI_DURATION_PROCESS
+#define OCI_DURATION_PROCESS ((OCIDuration)5)
+#endif
+
 NORETURN(static void oci8_raise2(dvoid *errhp, sword status, ub4 type, OCIStmt *stmthp, const char *file, int line));
 NORETURN(static void set_backtrace_and_raise(VALUE exc, const char *file, int line));
 

Modified: trunk/ruby-oci8/ext/oci8/extconf.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/extconf.rb	2010-02-27 10:43:28 UTC (rev 380)
+++ trunk/ruby-oci8/ext/oci8/extconf.rb	2010-02-27 12:32:53 UTC (rev 381)
@@ -69,6 +69,7 @@
 have_type('OCICallbackLobRead2', 'ociap.h')
 have_type('OCICallbackLobWrite2', 'ociap.h')
 have_type('OCIAdmin*', 'ociap.h')
+have_type('OCIMsg*', 'ociap.h')
 
 if with_config('oracle-version')
   oci_client_version = OCI8::OracleVersion.new(with_config('oracle-version')).to_i

Modified: trunk/ruby-oci8/ext/oci8/oci8.h
===================================================================
--- trunk/ruby-oci8/ext/oci8/oci8.h	2010-02-27 10:43:28 UTC (rev 380)
+++ trunk/ruby-oci8/ext/oci8/oci8.h	2010-02-27 12:32:53 UTC (rev 381)
@@ -67,6 +67,8 @@
 typedef unsigned __int64 oraub8;
 typedef   signed __int64 orasb8;
 #endif
+typedef oraub8 ub8;
+typedef orasb8 sb8;
 #endif /* ORAXB8_DEFINED */
 
 #ifndef HAVE_TYPE_ORATEXT
@@ -91,6 +93,9 @@
 #ifndef HAVE_TYPE_OCIADMIN_
 typedef struct OCIAdmin OCIAdmin;
 #endif
+#ifndef HAVE_TYPE_OCIMSG_
+typedef struct OCIMsg  OCIMsg;
+#endif
 
 /* new macros in ruby 1.8.6.
  * define compatible macros for ruby 1.8.5 or lower.

Modified: trunk/ruby-oci8/ext/oci8/ocihandle.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/ocihandle.c	2010-02-27 10:43:28 UTC (rev 380)
+++ trunk/ruby-oci8/ext/oci8/ocihandle.c	2010-02-27 12:32:53 UTC (rev 381)
@@ -9,7 +9,7 @@
  */
 #include "oci8.h"
 
-#ifdef WIN32
+#ifdef _MSC_VER
 #define MAGIC_NUMBER 0xDEAFBEAFDEAFBEAFui64;
 #else
 #define MAGIC_NUMBER 0xDEAFBEAFDEAFBEAFull;




More information about the ruby-oci8-commit mailing list