From: Bruno Haible Date: Sat, 31 Jul 2010 14:42:16 +0000 (+0200) Subject: Oops, fix last commit so that it also works with modf(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=870daa58035b4bb39549f15d20ad1422dd649d63;p=pspp Oops, fix last commit so that it also works with modf(). --- diff --git a/m4/mathfunc.m4 b/m4/mathfunc.m4 index 2cd47df3f7..531fd8e8b8 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],