Browse Source

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.
pull/683/merge
Keyur Govande 12 years ago
parent
commit
648673bffe
  1. 7
      ext/mysqlnd/config9.m4

7
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

Loading…
Cancel
Save