]> granicus.if.org Git - php/commitdiff
Use new version macro. Make code portable to older PHP versions
authorChristopher Jones <sixd@php.net>
Tue, 1 Apr 2008 18:37:32 +0000 (18:37 +0000)
committerChristopher Jones <sixd@php.net>
Tue, 1 Apr 2008 18:37:32 +0000 (18:37 +0000)
ext/oci8/oci8.c
ext/oci8/php_oci8.h

index 1fe9c483030da3f12910e0c9572d3b82838fd39d..d9b551194fa547a79f3ae5e7be5b4a637ed7a071 100644 (file)
@@ -409,7 +409,7 @@ zend_module_entry oci8_module_entry = {
        PHP_RINIT(oci),           /* per-request startup function */
        PHP_RSHUTDOWN(oci),       /* per-request shutdown function */
        PHP_MINFO(oci),           /* information function */
-       "1.3.1",
+       PHP_OCI8_VERSION,
 #if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5)
        /* This check allows PECL builds from this file to be portable to older PHP releases */
        PHP_MODULE_GLOBALS(oci),  /* globals descriptor */
@@ -724,7 +724,9 @@ PHP_MINFO_FUNCTION(oci)
        php_info_print_table_row(2, "Active Connections", buf);
 
 #if !defined(PHP_WIN32) && !defined(HAVE_OCI_INSTANT_CLIENT)
+#ifdef PHP_OCI8_ORACLE_VERSION
        php_info_print_table_row(2, "Oracle Version", PHP_OCI8_ORACLE_VERSION );
+#endif
        php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
        php_info_print_table_row(2, "Libraries Used", PHP_OCI8_SHARED_LIBADD );
 #else
index 9058aacb7ef209dd170979870fba4020f9e67ed5..2b4ca2b44dd0f23f4993fd83ccd2ea3a73323d69 100644 (file)
 /* 
  * The version of the OCI8 extension.
  */
+#ifdef PHP_OCI8_VERSION
+/* The definition of PHP_OCI8_VERSION changed in PHP 5.3 and building
+ * this code with PHP 5.2 and earlier (i.e. from PECL) might conflict
+ */
+#undef PHP_OCI8_VERSION
+#endif
 #define PHP_OCI8_VERSION "1.3.1 Beta"
 
 extern zend_module_entry oci8_module_entry;