summaryrefslogtreecommitdiff
path: root/tests/test-math-c++.cc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-02-29 20:00:38 +0100
committerBruno Haible <bruno@clisp.org>2012-02-29 20:51:42 +0100
commit9fb732a430dbc21f0502b77e76ec68d13f8b8f39 (patch)
tree8bb6318963b4fd68d396c4c9d0b53574f664ecf2 /tests/test-math-c++.cc
parent55fdaed70798368a6ee79e84c687fd23487ed632 (diff)
downloadgnulib-9fb732a430dbc21f0502b77e76ec68d13f8b8f39.tar.gz
hypot-ieee: Work around test failure on OSF/1 and native Windows.
* lib/math.in.h (hypot): New declaration. * lib/hypot.c: New file. * m4/hypot-ieee.m4: New file. * m4/hypot.m4 (gl_FUNC_HYPOT): If gl_FUNC_HYPOT_IEEE is present, test whether hypot works with mixed NaN and Infinity arguments. Replace it if not. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOT, REPLACE_HYPOT. * modules/math (Makefile.am): Substitute GNULIB_HYPOT, REPLACE_HYPOT. * modules/hypot (Files): Add lib/hypot.c. (Depends-on): Add dependencies. (configure.ac): Arrange to compile replacement if REPLACE_HYPOT is 1. * modules/hypot-ieee (Files): Add m4/hypot-ieee.m4. (configure.ac): Invoke gl_FUNC_HYPOT_IEEE. * tests/test-math-c++.cc: Check the declaration of hypot. * doc/posix-functions/hypot.texi: Mention the hypot-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 34d0b3b919..47dc173d5b 100644
--- a/tests/test-math-c++.cc
+++ b/tests/test-math-c++.cc
@@ -158,7 +158,9 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::frexpl, long double, (long double, int *));
#if GNULIB_TEST_HYPOTF
SIGNATURE_CHECK (GNULIB_NAMESPACE::hypotf, float, (float, float));
#endif
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::hypot, double, (double, double));
+#if GNULIB_TEST_HYPOT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::hypot, double, (double, double));
+#endif
#if GNULIB_TEST_HYPOTL
SIGNATURE_CHECK (GNULIB_NAMESPACE::hypotl, long double,
(long double, long double));