summaryrefslogtreecommitdiff
path: root/tests/test-math-c++.cc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-02-27 01:44:57 +0100
committerBruno Haible <bruno@clisp.org>2012-02-27 01:44:57 +0100
commitb5cc9885b4b5a247870adf0ed9b9f4a5a3347a26 (patch)
treec9f852a62c0086a9c8f4552f7db42c67781b18f5 /tests/test-math-c++.cc
parent8f32a5c4f21e3a360b1a756a88880985215d67db (diff)
downloadgnulib-b5cc9885b4b5a247870adf0ed9b9f4a5a3347a26.tar.gz
modf-ieee: Work around test failures on *BSD, IRIX, OSF/1, Cygwin.
* m4/modf-ieee.m4: New file. * m4/modf.m4 (gl_FUNC_MODF): If gl_FUNC_MODF_IEEE is present, test whether modf works with NaN and Inf. Replace it if not. * lib/math.in.h (modf): New declaration. * lib/modf.c: New file. * m4/math_h.m4 (gl_MATH_H): Test whether modf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODF, REPLACE_MODF. * modules/math (Makefile.am): Substitute GNULIB_MODF, REPLACE_MODF. * modules/modf (Files): Add lib/modf.c. (Depends-on): Add math, isfinite, trunc, isinf. (configure.ac): Addrange to compile lib/modf.c if needed. * modules/modf-ieee (Files): Add m4/modf-ieee.m4, m4/minus-zero.m4, m4/signbit.m4. (configure.ac): Invoke gl_FUNC_MODF_IEEE. * tests/test-math-c++.cc: Check the declaration of modf. * doc/posix-functions/modf.texi: Mention the modf-ieee module.
Diffstat (limited to 'tests/test-math-c++.cc')
-rw-r--r--tests/test-math-c++.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc
index 947021588f..241ae09db6 100644
--- a/tests/test-math-c++.cc
+++ b/tests/test-math-c++.cc
@@ -195,7 +195,9 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::log10f, float, (float));
#if GNULIB_TEST_MODFF
SIGNATURE_CHECK (GNULIB_NAMESPACE::modff, float, (float, float *));
#endif
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::modf, double, (double, double *));
+#if GNULIB_TEST_MODF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::modf, double, (double, double *));
+#endif
#if GNULIB_TEST_MODFL
SIGNATURE_CHECK (GNULIB_NAMESPACE::modfl, long double,
(long double, long double *));