Skip to content

Commit 3915560

Browse files
committed
Revert "always assume HAVE_OCIENVNLSCREATE"
1 parent ffd7598 commit 3915560

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

config.m4

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ if test "$PHP_PDO_OCI" != "no"; then
150150
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
151151
PHP_ADD_LIBPATH($PDO_OCI_LIB_DIR, PDO_OCI_SHARED_LIBADD)
152152

153+
PHP_CHECK_LIBRARY(clntsh, OCIEnvNlsCreate,
154+
[
155+
AC_DEFINE(HAVE_OCIENVNLSCREATE,1,[ ])
156+
], [], [
157+
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
158+
])
159+
153160
PHP_CHECK_PDO_INCLUDES
154161

155162
PHP_NEW_EXTENSION(pdo_oci, pdo_oci.c oci_driver.c oci_statement.c, $ext_shared,,-I$pdo_cv_inc_path)

oci_driver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ *
742742
H->prefetch = PDO_OCI_PREFETCH_DEFAULT;
743743

744744
/* allocate an environment */
745+
#ifdef HAVE_OCIENVNLSCREATE
745746
if (vars[0].optval) {
746747
H->charset = OCINlsCharSetNameToId(pdo_oci_Env, (const oratext *)vars[0].optval);
747748
if (!H->charset) {
@@ -754,7 +755,7 @@ static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ *
754755
}
755756
}
756757
}
757-
758+
#endif
758759
if (H->env == NULL) {
759760
/* use the global environment */
760761
H->env = pdo_oci_Env;

0 commit comments

Comments
 (0)