Hi,

The following patch to gw/shared.c only prints the Oracle OCI version if
the constants OCI_MAJOR_VERSION and OCI_MINOR_VERSION are defined (it
seems that these constants were introduced for Oracle 10). Tested on AIX
with Oracle 9.2 and Linux with Oracle 10.2.

-james

Index: gw/shared.c
===================================================================
RCS file: /home/cvs/gateway/gw/shared.c,v
retrieving revision 1.42
diff -u -r1.42 shared.c
--- gw/shared.c 9 Jan 2008 20:06:56 -0000       1.42
+++ gw/shared.c 4 Jul 2008 06:39:46 -0000
@@ -123,7 +123,11 @@
              "Using SQLite %s.\n"
 #endif
 #ifdef HAVE_ORACLE
+#if defined(OCI_MAJOR_VERSION) && defined(OCI_MINOR_VERSION)
              "Using Oracle OCI %d.%d.\n"
+#else
+             "Using Oracle OCI.\n"
+#endif
 #endif
              "Using %s malloc.\n",
                         boxname, GW_VERSION,
@@ -150,8 +154,10 @@
              SQLITE_VERSION,
 #endif
 #ifdef HAVE_ORACLE
+#if defined(OCI_MAJOR_VERSION) && defined(OCI_MINOR_VERSION)
              OCI_MAJOR_VERSION, OCI_MINOR_VERSION,
 #endif
+#endif
              octstr_get_cstr(gwmem_type()));
 }



Reply via email to