summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2008-04-01 18:37:32 +0000
committerChristopher Jones <sixd@php.net>2008-04-01 18:37:32 +0000
commitfc1ad96953fcca69dde5e72f15d61149deb5876e (patch)
tree67e80e28a1e50a1a270c5b842cdd5d8251d0e4bb /ext/oci8
parent7f9d35ebf79d32d59124eb6155d6d5512cf892e6 (diff)
downloadphp-git-fc1ad96953fcca69dde5e72f15d61149deb5876e.tar.gz
Use new version macro. Make code portable to older PHP versions
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8.c4
-rw-r--r--ext/oci8/php_oci8.h6
2 files changed, 9 insertions, 1 deletions
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;