summaryrefslogtreecommitdiff
path: root/tests/test-math-c++.cc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-04-03 02:51:42 +0200
committerBruno Haible <bruno@clisp.org>2012-04-03 13:58:10 +0200
commit77e408383e7944caaf77cb068e670238aa7ee905 (patch)
tree51b65542ea5dd5fefd8a9d0e74e7829d4c2e02d9 /tests/test-math-c++.cc
parentcd2e4d4bfbf4bfbc8d2155969a63605759f8f243 (diff)
downloadgnulib-77e408383e7944caaf77cb068e670238aa7ee905.tar.gz
logb: Provide replacement and workarounds.
* lib/math.in.h (logb): Ensure declaration. Replace if REPLACE_LOGB is 1. * lib/logb.c: New file. * m4/logb.m4 (gl_FUNC_LOGB_WORKS): New macro. (gl_FUNC_LOGB): Invoke it. Set HAVE_LOGB, REPLACE_LOGB. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGB. * modules/math (Makefile.am): Substitute REPLACE_LOGB. * modules/logb (Files): Add lib/logb.c. (Depends-on): Add isfinite, frexp, isnand. (configure.ac): Compile the replacement code logb.c if needed. * tests/test-math-c++.cc: Check the declaration of logb. * doc/posix-functions/logb.texi: Mention the replacement and the bug with subnormal numbers.
Diffstat (limited to 'tests/test-math-c++.cc')
-rw-r--r--tests/test-math-c++.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc
index b6df6595c4..492e54a036 100644
--- a/tests/test-math-c++.cc
+++ b/tests/test-math-c++.cc
@@ -227,8 +227,6 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::log1p, double, (double));
SIGNATURE_CHECK (GNULIB_NAMESPACE::log1pl, long double, (long double));
#endif
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::logb, double, (double));
-
#if GNULIB_TEST_LOGF
SIGNATURE_CHECK (GNULIB_NAMESPACE::logf, float, (float));
#endif
@@ -253,6 +251,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::log2, double, (double));
SIGNATURE_CHECK (GNULIB_NAMESPACE::log2l, long double, (long double));
#endif
+#if GNULIB_TEST_LOGB
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logb, double, (double));
+#endif
+
#if GNULIB_TEST_MODFF
SIGNATURE_CHECK (GNULIB_NAMESPACE::modff, float, (float, float *));
#endif