From: Christopher Jones Date: Tue, 1 Apr 2008 18:37:32 +0000 (+0000) Subject: Use new version macro. Make code portable to older PHP versions X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc1ad96953fcca69dde5e72f15d61149deb5876e;p=php Use new version macro. Make code portable to older PHP versions --- diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 1fe9c48303..d9b551194f 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -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 diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index 9058aacb7e..2b4ca2b44d 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -39,6 +39,12 @@ /* * 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;