RE: PATCH: Only print OCI version if OCI_MAJOR_VERSION and OCI_MINOR_VERSION are defined

"Bostock James" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <84E219D8B81E5F4688C4A8992426CD83012A4AFE@fr-par-mail01.comverse.com>
> -----Original Message-----
> From: Bostock James
> Sent: 04 July 2008 08:49
> 
> 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.
> 

The patch seemed to have been mangled during the copy paste operation.
Attached as a separate file.

-james
kannel_oci_version.patch (application/octet-stream, 836 B)
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 07:09:51 -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()));
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.