From 31bd9abc724408136434f6a6182c19323aba6b9e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 27 Feb 2012 12:28:29 +0100 Subject: fmod-ieee: Work around test failures on OSF/1, mingw. * m4/fmod-ieee.m4: New file. * m4/fmod.m4 (gl_FUNC_FMOD): If gl_FUNC_FMOD_IEEE is present, test whether fmod works with zero arguments. Replace it if not. * lib/math.in.h (fmod): New declaration. * lib/fmod.c: New file. * m4/math_h.m4 (gl_MATH_H): Test whether fmod is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMOD, REPLACE_FMOD. * modules/math (Makefile.am): Substitute GNULIB_FMOD, REPLACE_FMOD. * modules/fmod (Files): Add lib/fmod.c. (Depends-on): Add math, isinf, trunc, fma. (configure.ac): Arrange to compile lib/fmod.c if needed. * modules/fmod-ieee (Files): Add m4/fmod-ieee.m4, m4/minus-zero.m4, m4/signbit.m4. (configure.ac): Invoke gl_FUNC_FMOD_IEEE. * tests/test-math-c++.cc: Check the declaration of fmod. * doc/posix-functions/fmod.texi: Mention the fmod-ieee module. --- tests/test-math-c++.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/test-math-c++.cc') diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc index 241ae09db6..b6534f0268 100644 --- a/tests/test-math-c++.cc +++ b/tests/test-math-c++.cc @@ -137,7 +137,9 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::floorl, long double, (long double)); #if GNULIB_TEST_FMODF SIGNATURE_CHECK (GNULIB_NAMESPACE::fmodf, float, (float, float)); #endif -//SIGNATURE_CHECK (GNULIB_NAMESPACE::fmod, double, (double, double)); +#if GNULIB_TEST_FMOD +SIGNATURE_CHECK (GNULIB_NAMESPACE::fmod, double, (double, double)); +#endif #if GNULIB_TEST_FMODL SIGNATURE_CHECK (GNULIB_NAMESPACE::fmodl, long double, (long double, long double)); -- cgit v1.2.1