summaryrefslogtreecommitdiff
path: root/modules/math
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 /modules/math
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 'modules/math')
-rw-r--r--modules/math5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/math b/modules/math
index 68fe9586fe..26a80b0c0d 100644
--- a/modules/math
+++ b/modules/math
@@ -80,7 +80,6 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \
-e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \
-e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \
- -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \
-e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \
-e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \
-e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \
@@ -93,6 +92,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \
-e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \
-e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \
+ -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \
-e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \
-e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \
-e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \
@@ -192,12 +192,12 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
-e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
-e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
- -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
-e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
-e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \
-e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \
-e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \
-e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \
+ -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
-e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \
-e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \
-e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \
@@ -254,6 +254,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \
-e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \
-e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \
+ -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \
-e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \
-e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \
-e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \