diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-12-14 23:14:31 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-12-14 23:14:31 +0100 |
commit | b59156ca8cbfa430a936ce29de62b4b4531766bf (patch) | |
tree | b2f0d6127cd61d1ac891dd93ea7e374fcaba50ba | |
parent | 5263fffdbf026415ee9d5025eb094821c67f5754 (diff) | |
parent | 2e974c8c81771883d85af9cef6d5563db5b381df (diff) | |
download | php-git-b59156ca8cbfa430a936ce29de62b4b4531766bf.tar.gz |
Merge branch 'PHP-8.0'
* PHP-8.0:
Add Windows support for OCI 19
-rw-r--r-- | ext/oci8/config.w32 | 55 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 2 | ||||
-rw-r--r-- | ext/oci8/php_oci8.h | 1 | ||||
-rw-r--r-- | php.ini-development | 1 | ||||
-rw-r--r-- | php.ini-production | 1 |
5 files changed, 59 insertions, 1 deletions
diff --git a/ext/oci8/config.w32 b/ext/oci8/config.w32 index 6ac80aa986..5f0da8f33d 100644 --- a/ext/oci8/config.w32 +++ b/ext/oci8/config.w32 @@ -21,6 +21,27 @@ if (PHP_OCI8_11G != "no" && PHP_OCI8_12C != "no") { } } +if (PHP_OCI8 != "no" && PHP_OCI8_19 != "no") { + if (!PHP_OCI8_SHARED && !PHP_OCI8_19_SHARED) { + WARNING("oci8 and oci8-19 provide the same extension and cannot both be built statically"); + PHP_OCI8 = "no" + } +} + +if (PHP_OCI8_11G != "no" && PHP_OCI8_19 != "no") { + if (!PHP_OCI8_11G_SHARED && !PHP_OCI8_19_SHARED) { + WARNING("oci8-11g and oci8-19 provide the same extension and cannot both be built statically"); + PHP_OCI8_11G = "no" + } +} + +if (PHP_OCI8_12C != "no" && PHP_OCI8_19 != "no") { + if (!PHP_OCI8_12C_SHARED && !PHP_OCI8_19_SHARED) { + WARNING("oci8-12c and oci8-19 provide the same extension and cannot both be built statically"); + PHP_OCI8_12C = "no" + } +} + ARG_WITH("oci8", "OCI8 support", "no"); if (PHP_OCI8 != "no") { @@ -124,3 +145,37 @@ if (PHP_OCI8_12C != "no") { PHP_OCI8_12C = "no" } } + +ARG_WITH("oci8-19", "OCI8 support using Oracle Database 19 Instant Client", "no"); + +if (PHP_OCI8_19 != "no") { + + oci8_19_dirs = new Array( + PHP_OCI8_19 + ); + + oci8_19_lib_paths = ""; + oci8_19_inc_paths = ""; + + // find the Oracle install + for (i = 0; i < oci8_19_dirs.length; i++) { + oci8_19_lib_paths += oci8_19_dirs[i] + "\\lib;"; + oci8_19_lib_paths += oci8_19_dirs[i] + "\\lib\\msvc;"; + oci8_19_inc_paths += oci8_19_dirs[i] + "\\include;"; + } + + oci8_19_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_12;" + oci8_19_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_12;"; + + if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_19", oci8_19_inc_paths) && + CHECK_LIB("oci.lib", "oci8_19", oci8_19_lib_paths)) + { + EXTENSION('oci8_19', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c', null, null, null, "ext\\oci8_19") + + AC_DEFINE('HAVE_OCI8', 1); + AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1); + } else { + WARNING("oci8-19 not enabled: Oracle Database client libraries or Oracle Database 19 Instant Client not found"); + PHP_OCI8_19 = "no" + } +} diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 48b6c5c936..ad9b23a9c4 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -120,7 +120,7 @@ static sword php_oci_ping_init(php_oci_connection *connection, OCIError *errh); /* }}} */ /* {{{ dynamically loadable module stuff */ -#if defined(COMPILE_DL_OCI8) || defined(COMPILE_DL_OCI8_11G) || defined(COMPILE_DL_OCI8_12C) +#if defined(COMPILE_DL_OCI8) || defined(COMPILE_DL_OCI8_11G) || defined(COMPILE_DL_OCI8_12C) || defined(COMPILE_DL_OCI8_19) ZEND_GET_MODULE(oci8) #endif /* COMPILE_DL */ /* }}} */ diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index c1ebf7b86e..e3e294ef4f 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -47,6 +47,7 @@ extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry #define phpext_oci8_11g_ptr &oci8_module_entry #define phpext_oci8_12c_ptr &oci8_module_entry +#define phpext_oci8_19_ptr &oci8_module_entry PHP_MINIT_FUNCTION(oci); diff --git a/php.ini-development b/php.ini-development index b4193ca67a..2061266e4c 100644 --- a/php.ini-development +++ b/php.ini-development @@ -932,6 +932,7 @@ default_socket_timeout = 60 ;extension=exif ; Must be after mbstring as it depends on it ;extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client +;extension=oci8_19 ; Use with Oracle Database 19 Instant Client ;extension=odbc ;extension=openssl ;extension=pdo_firebird diff --git a/php.ini-production b/php.ini-production index 15ecc4530e..708591bb79 100644 --- a/php.ini-production +++ b/php.ini-production @@ -934,6 +934,7 @@ default_socket_timeout = 60 ;extension=exif ; Must be after mbstring as it depends on it ;extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client +;extension=oci8_19 ; Use with Oracle Database 19 Instant Client ;extension=odbc ;extension=openssl ;extension=pdo_firebird |