logb: Provide replacement and workarounds.
authorBruno Haible <bruno@clisp.org>
Tue, 3 Apr 2012 00:51:42 +0000 (02:51 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 3 Apr 2012 11:58:10 +0000 (13:58 +0200)
commit77e408383e7944caaf77cb068e670238aa7ee905
tree51b65542ea5dd5fefd8a9d0e74e7829d4c2e02d9
parentcd2e4d4bfbf4bfbc8d2155969a63605759f8f243
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.
ChangeLog
doc/posix-functions/logb.texi
lib/logb.c [new file with mode: 0644]
lib/math.in.h
m4/logb.m4
m4/math_h.m4
modules/logb
modules/math
tests/test-math-c++.cc