diff options
author | Bruno Haible <bruno@clisp.org> | 2010-12-21 15:44:21 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-12-21 17:30:27 +0100 |
commit | fdb0fd9e820d721e6492b041ddc49d49b4c61e64 (patch) | |
tree | 5264bfd5faa8bad120b97e544e1efc2f120cd9e9 /lib | |
parent | f10ca7e0a421ace0dd6124bd8f0ba8e7570ebec3 (diff) | |
download | gnulib-fdb0fd9e820d721e6492b041ddc49d49b4c61e64.tar.gz |
New module 'truncf-ieee'.
* modules/truncf-ieee: New file.
* m4/truncf.m4 (gl_FUNC_TRUNCF): If gl_FUNC_TRUNCF_IEEE is also used,
test whether truncf works according to ISO C 99 with IEC 60559.
* m4/truncf-ieee.m4: New file.
* lib/math.in.h (truncf): Replace if REPLACE_TRUNCF is set.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNCF.
* modules/math (Makefile.am): Substitute REPLACE_TRUNCF.
* modules/truncf-ieee-tests: New file.
* tests/test-truncf-ieee.c: New file, based on tests/test-truncf1.c.
* tests/test-truncf1.c (main): Remove signbit tests.
* modules/truncf-tests (Depends-on): Remove 'signbit'.
* doc/posix-functions/truncf.texi: Mention the new module.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/math.in.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/math.in.h b/lib/math.in.h index e05048aa8a..fe2830b9c8 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -493,10 +493,18 @@ _GL_WARN_ON_USE (tanl, "tanl is unportable - " #if @GNULIB_TRUNCF@ -# if !@HAVE_DECL_TRUNCF@ +# if @REPLACE_TRUNCF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define truncf rpl_truncf +# endif +_GL_FUNCDECL_RPL (truncf, float, (float x)); +_GL_CXXALIAS_RPL (truncf, float, (float x)); +# else +# if !@HAVE_DECL_TRUNCF@ _GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif +# endif _GL_CXXALIAS_SYS (truncf, float, (float x)); +# endif _GL_CXXALIASWARN (truncf); #elif defined GNULIB_POSIXCHECK # undef truncf |