summaryrefslogtreecommitdiff
path: root/m4/math_h.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-04-01 13:19:41 +0200
committerBruno Haible <bruno@clisp.org>2012-04-01 16:37:08 +0200
commit54be6af60f46a82b2d9051cd939169cd288ed52c (patch)
treee975c8674643c7c7f8ef8d7e7939b7d2ac419c2d /m4/math_h.m4
parent1cf571bb5ce42ffa1a95361d32414119a7ac6eba (diff)
downloadgnulib-54be6af60f46a82b2d9051cd939169cd288ed52c.tar.gz
log10: Work around OSF/1 5.1 bug.
* lib/math.in.h (log10): New declaration. * lib/log10.c: New file. * m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro. (gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10. * m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10. * modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10. * modules/log10 (Files): Add lib/log10.c. (Depends-on): Add math. (configure.ac): If REPLACE_LOG10 is 1, compile an override. * tests/test-math-c++.cc: Check the declaration of log10. * doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
Diffstat (limited to 'm4/math_h.m4')
-rw-r--r--m4/math_h.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/math_h.m4 b/m4/math_h.m4
index ff1654ec7f..2fe2ecef69 100644
--- a/m4/math_h.m4
+++ b/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 104
+# math_h.m4 serial 105
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -45,7 +45,7 @@ AC_DEFUN([gl_MATH_H],
fabsf fabsl floorf floorl fma fmaf fmal
fmod fmodf fmodl frexpf frexpl hypotf hypotl
ldexpf ldexpl
- logb log logf logl log10f log10l log1p log1pf log1pl log2 log2f log2l
+ logb log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
modf modff modfl powf
remainder remainderf remainderl
rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
@@ -119,6 +119,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
GNULIB_LOG=0; AC_SUBST([GNULIB_LOG])
GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF])
GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
+ GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10])
GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F])
GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L])
GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P])
@@ -277,6 +278,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_LOG=0; AC_SUBST([REPLACE_LOG])
REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF])
REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL])
+ REPLACE_LOG10=0; AC_SUBST([REPLACE_LOG10])
REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P])
REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF])
REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL])