diff options
author | Bruno Haible <bruno@clisp.org> | 2012-02-29 23:42:53 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-02-29 23:42:53 +0100 |
commit | a0dccde75e6a3b9c930e3577fae7a5bf9351ec09 (patch) | |
tree | cf07ebc2e9ae200885f4d1bea63f01d712b37d3b /modules/cbrt | |
parent | 14ad442f598655b0dad323d32c22e8b27ad6fb5c (diff) | |
download | gnulib-a0dccde75e6a3b9c930e3577fae7a5bf9351ec09.tar.gz |
cbrt: Provide replacement on MSVC and Minix.
* lib/math.in.h (cbrt): New declaration.
* lib/cbrt.c: New file.
* m4/cbrt.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether cbrt is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRT, HAVE_CBRT.
* modules/math (Makefile.am): Substitute GNULIB_CBRT, HAVE_CBRT.
* modules/cbrt (Files): Add lib/cbrt.c, m4/cbrt.m4.
(Depends-on): Add dependencies.
(configure.ac): Arrange to compile replacement if HAVE_CBRT is 0.
* tests/test-math-c++.cc: Check the declaration of cbrt.
* doc/posix-functions/cbrt.texi: Mention that the module provides a
replacement.
Diffstat (limited to 'modules/cbrt')
-rw-r--r-- | modules/cbrt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/cbrt b/modules/cbrt index fe015ee05c..3cb47118d8 100644 --- a/modules/cbrt +++ b/modules/cbrt @@ -2,12 +2,23 @@ Description: cbrt() function: cube root. Files: +lib/cbrt.c +m4/cbrt.m4 m4/mathfunc.m4 Depends-on: +math +isfinite [test $HAVE_CBRT = 0] +fabs [test $HAVE_CBRT = 0] +frexp [test $HAVE_CBRT = 0] +ldexp [test $HAVE_CBRT = 0] configure.ac: -gl_COMMON_DOUBLE_MATHFUNC([cbrt]) +gl_FUNC_CBRT +if test $HAVE_CBRT = 0; then + AC_LIBOBJ([cbrt]) +fi +gl_MATH_MODULE_INDICATOR([cbrt]) Makefile.am: |