summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2008-06-06 00:59:44 +0000
committerChristopher Jones <sixd@php.net>2008-06-06 00:59:44 +0000
commit8c9e028a76e805aeaa56a380dce5651657af6e2a (patch)
treea6fa5b31d307c32134de2490b6fb677e3933e567 /ext
parent44e82f5789b587f1bcd39b5735c3112e850216c5 (diff)
downloadphp-git-8c9e028a76e805aeaa56a380dce5651657af6e2a.tar.gz
(Bugs 41348, 41563, 42456, 42939) Appease the masses and fix
compilation with Oracle 8.1. This gives cleaner support for older releases now that PHP 5.3 is firmly Oracle 9.2+ only. No plans to MTH.
Diffstat (limited to 'ext')
-rw-r--r--ext/oci8/oci8_lob.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c
index d498ded32e..9aef7f5fa4 100644
--- a/ext/oci8/oci8_lob.c
+++ b/ext/oci8/oci8_lob.c
@@ -302,6 +302,7 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, long read_length, long ini
}
if (is_clob) {
+#ifdef OCI_NLS_CHARSET_MAXBYTESZ
PHP_OCI_CALL_RETURN(connection->errcode, OCINlsNumericInfoGet, (connection->env, connection->err, &bytes_per_char, OCI_NLS_CHARSET_MAXBYTESZ));
if (connection->errcode != OCI_SUCCESS) {
@@ -309,6 +310,10 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, long read_length, long ini
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
return 1;
}
+#else
+ /* Oracle 8.1 doesn't define OCI_NLS_CHARSET_MAXBYTESZ, so allocate worst case size */
+ bytes_per_char = 4;
+#endif
} else {
/* BLOBs don't have encoding, so bytes_per_char == 1 */
}