summaryrefslogtreecommitdiff
path: root/modules/hypotl
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-02-29 20:50:49 +0100
committerBruno Haible <bruno@clisp.org>2012-02-29 20:51:44 +0100
commit14ad442f598655b0dad323d32c22e8b27ad6fb5c (patch)
tree174d1eae7e692cd42c2146af3d25ce9887391bf9 /modules/hypotl
parentb3f31eeaa29521c15f6d5523a50c3061faf4384b (diff)
downloadgnulib-14ad442f598655b0dad323d32c22e8b27ad6fb5c.tar.gz
hypotl-ieee: Work around test failure on OSF/1 and native Windows.
* m4/hypotl-ieee.m4: New file. * m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present, test whether hypotl works with mixed NaN and Infinity arguments. Replace it if not. * lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL. * modules/math (Makefile.am): Substitute REPLACE_HYPOTL. * modules/hypotl (configure.ac): Consider REPLACE_HYPOTL. (Depends-on): Update conditions. * modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4. (Depends-on): Add hypot-ieee. (configure.ac): Invoke gl_FUNC_HYPOTL_IEEE. * doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.
Diffstat (limited to 'modules/hypotl')
-rw-r--r--modules/hypotl16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/hypotl b/modules/hypotl
index 156350c84e..e8ba6e5372 100644
--- a/modules/hypotl
+++ b/modules/hypotl
@@ -8,17 +8,17 @@ m4/mathfunc.m4
Depends-on:
math
-hypot [test $HAVE_HYPOTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
-isfinite [test $HAVE_HYPOTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-fabsl [test $HAVE_HYPOTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-frexpl [test $HAVE_HYPOTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-ldexpl [test $HAVE_HYPOTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-sqrtl [test $HAVE_HYPOTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-isinf [test $HAVE_HYPOTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+hypot [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isfinite [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+fabsl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+sqrtl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isinf [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
configure.ac:
gl_FUNC_HYPOTL
-if test $HAVE_HYPOTL = 0; then
+if test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; then
AC_LIBOBJ([hypotl])
fi
gl_MATH_MODULE_INDICATOR([hypotl])