[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.96 testora:1.6

Matthew T. Kromer matt@zope.com
Thu, 25 Oct 2001 10:46:31 -0400


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

Modified Files:
	dco2.c testora 
Log Message:
Updated changelog; put Oracle9i defs int dco2 and changed testora to detect
Oracle 9i


=== Products/DCOracle2/src/dco2.c 1.95 => 1.96 ===
 #include <Python.h>
 
+/* If the build script detected Oracle 9i, turn Oracle 8i definition on too */
+
+#ifdef ORACLE9i
+# ifndef ORACLE8i
+#  define ORACLE8i
+# endif
+#endif
+
 /* Get around unused warnings with GCC -Wall by using this on a def for
 ** intentionally unused items.   Currently "ID" and "Traceprint" are
 ** meant to be unused; Traceprint is for debugging.
@@ -6756,6 +6764,17 @@
 
 	PyDict_SetItemString(dict, "__version__",
 		PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
+
+	PyDict_SetItemString(dict, "buildDefs", PyString_FromString(
+		""
+#ifdef ORACLE8i
+		"-DORACLE8i "
+#endif
+#ifdef ORACLE9i
+		"-DORACLE9i "
+#endif
+	));
+
 
 	if (PyErr_Occurred())
 		Py_FatalError("Can't initialize module dco2");


=== Products/DCOracle2/src/testora 1.5 => 1.6 ===
 echo "passed."
 
-echo -n "Checking for Oracle8i..."
+echo -n "Checking for Oracle version..."
 
 if [ ! -r "$ORACLE_HOME/lib/libclntsh.so" ]; then
 	echo "failed."
@@ -27,16 +27,23 @@
 #
 # Check for the symbol OCIEnvCreate in libclntsh.so, indicating Oracle 8i
 #
-nm $ORACLE_HOME/lib/libclntsh.so | grep OCIEnvCreate > /dev/null
+nm $ORACLE_HOME/lib/libclntsh.so | grep OCIConnectionPoolCreate > /dev/null
 
 if [ "$?" = "0" ]; then
-	ORADEF="-DORACLE8i" 
+	ORADEF="-DORACLE9i" 
 	ORAINCLUDES=""
-	echo "found."
+	echo "Oracle 9i found."
 else
-	ORADEF=""
-	ORAINCLUDES="-lcommon -lcore4 -lnlsrtl3"
-	echo "not found, Oracle 8.0 assumed."
+	nm $ORACLE_HOME/lib/libclntsh.so | grep OCIEnvCreate > /dev/null
+ 	if [ "$?" = "0" ]; then
+		ORADEF="-DORACLE8i" 
+		ORAINCLUDES=""
+		echo "Oracle 8i found."
+	else
+		ORADEF=""
+		ORAINCLUDES="-lcommon -lcore4 -lnlsrtl3"
+		echo "Oracle 8.0 assumed."
+	fi
 fi
 
 #