summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/config9.m4
diff options
context:
space:
mode:
authorKeyur Govande <keyur@php.net>2014-08-15 23:13:36 +0000
committerKeyur Govande <keyur@php.net>2014-08-15 23:13:36 +0000
commit7c4b5d91874ea0a69f5b65c05494056aaae81e71 (patch)
treeeb121b86478dbfc7f6741e553bbf6032bc093704 /ext/mysqlnd/config9.m4
parent59c2477bc331370105e917db27e82d4e483ab7f0 (diff)
parent0407bdf252004cce08e383bc0f4aa0bbc69c9a25 (diff)
downloadphp-git-7c4b5d91874ea0a69f5b65c05494056aaae81e71.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Add NEWS Fix failing tests Patch for bug #67839 (mysqli does not handle 4-byte floats correctly) Conflicts: ext/mysqli/tests/table.inc
Diffstat (limited to 'ext/mysqlnd/config9.m4')
-rw-r--r--ext/mysqlnd/config9.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4
index 09aca5af8a..deda4414c4 100644
--- a/ext/mysqlnd/config9.m4
+++ b/ext/mysqlnd/config9.m4
@@ -61,3 +61,29 @@ 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>
+
+int main(int argc, char **argv) {
+ typedef float dec32 __attribute__((mode(SD)));
+ dec32 k = 99.49f;
+ double d2 = (double)k;
+ return 0;
+}
+],[
+ 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