com php-src: Fix for bug #68114 (Build fails on OS X due to undefined symbols): ext/mysqlnd/config9.m4

From: Date: Tue, 07 Oct 2014 20:58:43 +0000
Subject: com php-src: Fix for bug #68114 (Build fails on OS X due to undefined symbols): ext/mysqlnd/config9.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82178@lists.php.net to get a copy of this message
Commit: 648673bffe7a7c63ce6223fcbac7c118a114c893 Author: Keyur Govande <keyur@php.net> Tue, 7 Oct 2014 20:58:43 +0000 Parents: b386991471bc0f2af793a44c1509464cbcd73f6f Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=648673bffe7a7c63ce6223fcbac7c118a114c893 Log: Fix for bug #68114 (Build fails on OS X due to undefined symbols) gcc (i686-apple-darwin10-gcc-4.2.1) on OS X cannot link fixed-width decimals and fails with undefined symbols errors like ___extendsddf. If configure used gcc for compiling it would notice and mark the feature HAVE_DECIMAL_FP_SUPPORT as unsupported. But configure seems to use cc (i686-apple-darwin10-llvm-gcc-4.2) instead, which doesn't support fixed-width decimals either, but the code compiles and links just fine. I suspect it may have something to do with the llvm backend printed in the version. Lacking the time to debug this further, the patch fixes the issue by checking the expected output when fixed-width decimal support is present and correctly implemented. Bugs: https://bugs.php.net/68114 Changed paths: M ext/mysqlnd/config9.m4 Diff: diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index deda441..e665cd0 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -70,12 +70,17 @@ 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; - return 0; + 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

« previous php.cvs (#82178) next »