summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/config9.m4
diff options
context:
space:
mode:
authorKeyur Govande <keyur@php.net>2015-01-06 06:33:38 +0000
committerKeyur Govande <keyur@php.net>2015-01-26 21:19:00 +0000
commite51980f4e67e99b3c63f9c8585805d63bbf9b20d (patch)
tree018e8e12b73f8c7dbfaf20c410e1fb3b92dfe312 /ext/mysqlnd/config9.m4
parentf014785eeb8b269b2238954255fddf6dd9a10e5f (diff)
downloadphp-git-e51980f4e67e99b3c63f9c8585805d63bbf9b20d.tar.gz
Fix for bugs #68114 (Build fails on OS X due to undefined symbols)
and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient has rounding errors). The patch removes support for Decimal floating point numbers and now defaults to using similar logic as what libmysqlclient does: convert a 4 byte floating point number into a string, and then the string into a double. The quirks of MySQL are maintained as seen in Field_Float::val_str()
Diffstat (limited to 'ext/mysqlnd/config9.m4')
-rw-r--r--ext/mysqlnd/config9.m431
1 files changed, 0 insertions, 31 deletions
diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4
index e665cd0a8b..09aca5af8a 100644
--- a/ext/mysqlnd/config9.m4
+++ b/ext/mysqlnd/config9.m4
@@ -61,34 +61,3 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$
#endif
])
fi
-
-dnl
-dnl Check if the compiler supports Decimal32/64/128 types from the IEEE-754 2008 version
-dnl References: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1657.pdf
-dnl http://speleotrove.com/decimal/
-dnl
-AC_CACHE_CHECK([whether whether compiler supports Decimal32/64/128 types], ac_cv_decimal_fp_supported,[
-AC_TRY_RUN( [
-#include <stdio.h>
-#include <string.h>
-
-int main(int argc, char **argv) {
- typedef float dec32 __attribute__((mode(SD)));
- dec32 k = 99.49f;
- double d2 = (double)k;
- const char *check_str = "99.49";
- char print_str[32];
-
- snprintf(print_str, 32, "%f", d2);
- return memcmp(print_str, check_str, 5);
-}
-],[
- ac_cv_decimal_fp_supported=yes
-],[
- ac_cv_decimal_fp_supported=no
-],[
- ac_cv_decimal_fp_supported=no
-])])
-if test "$ac_cv_decimal_fp_supported" = "yes"; then
- AC_DEFINE(HAVE_DECIMAL_FP_SUPPORT, 1, [Define if the compiler supports Decimal32/64/128 types.])
-fi