summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-12-21 18:30:16 +0100
committerBruno Haible <bruno@clisp.org>2010-12-21 22:48:06 +0100
commit0c5e7922f80eae16b5a89233d5a8c0d1f88c18a7 (patch)
tree8f3671c7f491de635c3139015ed6ef44646249d4 /modules
parent4b7ece979775e13ba4f1db1e6d9cfe400eff0f01 (diff)
downloadgnulib-0c5e7922f80eae16b5a89233d5a8c0d1f88c18a7.tar.gz
New module 'trunc-ieee'.
* modules/trunc-ieee: New file. * m4/trunc.m4 (gl_FUNC_TRUNC): If gl_FUNC_TRUNC_IEEE is also used, test whether trunc works according to ISO C 99 with IEC 60559. * m4/trunc-ieee.m4: New file. * lib/math.in.h (trunc): Replace if REPLACE_TRUNC is set. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNC. * modules/math (Makefile.am): Substitute REPLACE_TRUNC. * modules/trunc-ieee-tests: New file. * tests/test-trunc-ieee.c: New file, based on tests/test-truncf-ieee.c. * tests/test-trunc1.c (main): Remove signbit tests. * modules/trunc-tests (Depends-on): Remove 'signbit'. * doc/posix-functions/trunc.texi: Mention the new module.
Diffstat (limited to 'modules')
-rw-r--r--modules/math1
-rw-r--r--modules/trunc-ieee27
-rw-r--r--modules/trunc-ieee-tests15
-rw-r--r--modules/trunc-tests1
4 files changed, 43 insertions, 1 deletions
diff --git a/modules/math b/modules/math
index a11aeb8209..7ac78acf96 100644
--- a/modules/math
+++ b/modules/math
@@ -111,6 +111,7 @@ math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+ -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
-e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
diff --git a/modules/trunc-ieee b/modules/trunc-ieee
new file mode 100644
index 0000000000..612716e14a
--- /dev/null
+++ b/modules/trunc-ieee
@@ -0,0 +1,27 @@
+Description:
+trunc() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/trunc-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+trunc
+
+configure.ac:
+gl_FUNC_TRUNC_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(TRUNC_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
diff --git a/modules/trunc-ieee-tests b/modules/trunc-ieee-tests
new file mode 100644
index 0000000000..80bafef887
--- /dev/null
+++ b/modules/trunc-ieee-tests
@@ -0,0 +1,15 @@
+Files:
+tests/test-trunc-ieee.c
+tests/minus-zero.h
+tests/macros.h
+
+Depends-on:
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-trunc-ieee
+check_PROGRAMS += test-trunc-ieee
+test_trunc_ieee_LDADD = $(LDADD) @TRUNC_LIBM@
diff --git a/modules/trunc-tests b/modules/trunc-tests
index 30b9a6c36c..6c254e0692 100644
--- a/modules/trunc-tests
+++ b/modules/trunc-tests
@@ -9,7 +9,6 @@ tests/macros.h
Depends-on:
float
isnand-nolibm
-signbit
stdbool
stdint