[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.120 testora:1.8

Matthew T. Kromer matt@zope.com
Fri, 27 Sep 2002 14:01:43 -0400


Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv24618

Modified Files:
	dco2.c testora 
Log Message:
Update to work aorund lack of xa.h on some platforms


=== Products/DCOracle2/src/dco2.c 1.119 => 1.120 ===
--- Products/DCOracle2/src/dco2.c:1.119	Thu Sep 26 09:55:03 2002
+++ Products/DCOracle2/src/dco2.c	Fri Sep 27 14:01:43 2002
@@ -108,7 +108,20 @@
 #include <time.h>
 #include <oci.h>
 /* Next header is XID structure from Oracle */
+#ifdef USEOWNXID
+#define XIDDATASIZE 128         /* size in bytes */
+#define MAXGTRIDSIZE    64      /* maximum size in bytes of gtrid */
+#define MAXBQUALSIZE    64      /* maximum size in bytes of bqual */
+struct xid_t {
+    long        formatID;       /* format identifier */
+    long        gtrid_length;   /* value from 1 through 64 */
+    long        bqual_length;   /* value from 1 through 64 */
+    char        data[XIDDATASIZE];
+};
+typedef struct xid_t XID;
+#else
 #include <xa.h>
+#endif
 #include <Python.h>
 #include <pythread.h>
 


=== Products/DCOracle2/src/testora 1.7 => 1.8 ===
--- Products/DCOracle2/src/testora:1.7	Thu Nov 29 16:12:40 2001
+++ Products/DCOracle2/src/testora	Fri Sep 27 14:01:43 2002
@@ -46,6 +46,10 @@
 	fi
 fi
 
+if [ ! -f "$ORACLE_HOME/rdbms/demo/xa.h" ]; then
+	ORADEF="$ORADEF -DUSEOWNXID"
+fi
+
 #
 # OS specific section
 #