summaryrefslogtreecommitdiff
path: root/ext/oci8/oci8_collection.c
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2008-04-07 21:55:20 +0000
committerChristopher Jones <sixd@php.net>2008-04-07 21:55:20 +0000
commit51c5220adbf816edb0c5fdaccc63d18c777f9045 (patch)
tree10383da604c5269c56230398320ba43c987564ae /ext/oci8/oci8_collection.c
parent6522f854123d32d336eb9c40fb5e783ca72dc4ab (diff)
downloadphp-git-51c5220adbf816edb0c5fdaccc63d18c777f9045.tar.gz
PECL #13523 (x86_64 build). Make OCI8 buildable with PHP 4.3.9.
Diffstat (limited to 'ext/oci8/oci8_collection.c')
-rw-r--r--ext/oci8/oci8_collection.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c
index d9cb796a9c..0475bd2136 100644
--- a/ext/oci8/oci8_collection.c
+++ b/ext/oci8/oci8_collection.c
@@ -344,7 +344,13 @@ int php_oci_collection_append_number(php_oci_collection *collection, char *numbe
OCINumber oci_number;
php_oci_connection *connection = collection->connection;
+#if (PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION < 10)
+ /* minimum PHP version ext/oci8/config.m4 accepts is 4.3.9 */
+ element_double = strtod(number, NULL);
+#else
+ /* zend_strtod was introduced in PHP 4.3.10 */
element_double = zend_strtod(number, NULL);
+#endif
PHP_OCI_CALL_RETURN(connection->errcode, OCINumberFromReal, (connection->err, &element_double, sizeof(double), &oci_number));
@@ -626,7 +632,13 @@ int php_oci_collection_element_set_number(php_oci_collection *collection, long i
OCINumber oci_number;
php_oci_connection *connection = collection->connection;
+#if (PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION < 10)
+ /* minimum PHP version ext/oci8/config.m4 accepts is 4.3.9 */
+ element_double = strtod(number, NULL);
+#else
+ /* zend_strtod was introduced in PHP 4.3.10 */
element_double = zend_strtod(number, NULL);
+#endif
PHP_OCI_CALL_RETURN(connection->errcode, OCINumberFromReal, (connection->err, &element_double, sizeof(double), &oci_number));