changeset 13519:da9dc9b63c04

Oops, fix last commit so that it also works with modf().
author Bruno Haible <bruno@clisp.org>
date Sat, 31 Jul 2010 16:42:16 +0200
parents 88d6d025ee3b
children 1d091087ce86
files m4/mathfunc.m4
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/m4/mathfunc.m4
+++ b/m4/mathfunc.m4
@@ -29,8 +29,9 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
-             $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 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
-               $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],