summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-12-21 17:41:03 +0100
committerBruno Haible <bruno@clisp.org>2010-12-21 22:46:56 +0100
commit8938f22cb374f04f265ac3a9d2cefdc44524d6e2 (patch)
treea46acc07d819d19a96a78d4cec0c212878533e8a /modules
parent4ee2d29251b218b1f4f520494499e55b6d1714ba (diff)
downloadgnulib-8938f22cb374f04f265ac3a9d2cefdc44524d6e2.tar.gz
New module 'floor-ieee'.
* modules/floor-ieee: New file. * m4/floor.m4 (gl_FUNC_FLOOR): Require gl_MATH_H_DEFAULTS. If gl_FUNC_FLOOR_IEEE is also used, test whether floor works according to ISO C 99 with IEC 60559. * m4/floor-ieee.m4: New file. * modules/floor (Files): Add lib/floor.c. (Depends-on): Add 'float'. (configure.ac): Invoke gl_MATH_MODULE_INDICATOR. * lib/math.in.h (floor): New declaration. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOOR, REPLACE_FLOOR. * modules/math (Makefile.am): Substitute GNULIB_FLOOR, REPLACE_FLOOR. * modules/floor-ieee-tests: New file. * tests/test-floor-ieee.c: New file, based on tests/test-floorf-ieee.c. * tests/test-math-c++.cc: Check the signature of 'floor'. * doc/posix-functions/floor.texi: Mention the new module.
Diffstat (limited to 'modules')
-rw-r--r--modules/floor3
-rw-r--r--modules/floor-ieee27
-rw-r--r--modules/floor-ieee-tests15
-rw-r--r--modules/math2
4 files changed, 47 insertions, 0 deletions
diff --git a/modules/floor b/modules/floor
index f0eaef8431..ee898d3cd6 100644
--- a/modules/floor
+++ b/modules/floor
@@ -2,13 +2,16 @@ Description:
floor() function: round towards negative infinity.
Files:
+lib/floor.c
m4/floor.m4
Depends-on:
math
+float
configure.ac:
gl_FUNC_FLOOR
+gl_MATH_MODULE_INDICATOR([floor])
Makefile.am:
diff --git a/modules/floor-ieee b/modules/floor-ieee
new file mode 100644
index 0000000000..670de32a5a
--- /dev/null
+++ b/modules/floor-ieee
@@ -0,0 +1,27 @@
+Description:
+floor() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/floor-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+floor
+
+configure.ac:
+gl_FUNC_FLOOR_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FLOOR_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
diff --git a/modules/floor-ieee-tests b/modules/floor-ieee-tests
new file mode 100644
index 0000000000..e71dead88a
--- /dev/null
+++ b/modules/floor-ieee-tests
@@ -0,0 +1,15 @@
+Files:
+tests/test-floor-ieee.c
+tests/minus-zero.h
+tests/macros.h
+
+Depends-on:
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-floor-ieee
+check_PROGRAMS += test-floor-ieee
+test_floor_ieee_LDADD = $(LDADD) @FLOOR_LIBM@
diff --git a/modules/math b/modules/math
index 6944646e1b..560d8e890c 100644
--- a/modules/math
+++ b/modules/math
@@ -33,6 +33,7 @@ math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
-e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
-e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
+ -e 's|@''GNULIB_FLOOR''@|$(GNULIB_FLOOR)|g' \
-e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
-e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
-e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
@@ -92,6 +93,7 @@ math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
-e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
-e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+ -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \
-e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
-e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
-e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \