From 870daa58035b4bb39549f15d20ad1422dd649d63 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 31 Jul 2010 16:42:16 +0200 Subject: [PATCH] Oops, fix last commit so that it also works with modf(). --- m4/mathfunc.m4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/m4/mathfunc.m4 b/m4/mathfunc.m4 index 2cd47df3f..531fd8e8b 100644 --- a/m4/mathfunc.m4 +++ b/m4/mathfunc.m4 @@ -29,8 +29,9 @@ AC_DEFUN([gl_MATHFUNC], # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include - $2 (*funcptr) $3 = ]func[;]], - [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double], [1.6180339887])[; + $2 (*funcptr) $3 = ]func[; + double d_ret;]], + [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double \*], [&d_ret])], [double], [1.6180339887])[; return y < 0.3 || y > 1.7; ]])], [gl_cv_func_]func[_no_libm=yes], @@ -48,8 +49,9 @@ AC_DEFUN([gl_MATHFUNC], # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include - $2 (*funcptr) $3 = ]func[;]], - [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double], [1.6180339887])[; + $2 (*funcptr) $3 = ]func[; + double d_ret;]], + [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double \*], [&d_ret])], [double], [1.6180339887])[; return y < 0.3 || y > 1.7; ]])], [gl_cv_func_]func[_in_libm=yes], -- 2.11.0