summaryrefslogtreecommitdiff
path: root/lib/math.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-03-06 23:25:51 +0100
committerBruno Haible <bruno@clisp.org>2012-03-07 00:05:20 +0100
commit7c193d625308bb806418c61ec9062fc22a29aeaf (patch)
treed930f9bd1941f02881d8fff53b4deb033c5267a1 /lib/math.in.h
parenta7c48c37cce035f27f23fb59e2ca4d661e035181 (diff)
downloadgnulib-7c193d625308bb806418c61ec9062fc22a29aeaf.tar.gz
Work around expm1f bug on IRIX 6.5.
* lib/math.in.h (expm1f): Override if REPLACE_EXPM1F is 1. * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): New macro. (gl_FUNC_EXPM1F): Invoke it. Set REPLACE_EXPM1F to 1 if expm1f() does not work. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1F. * modules/math (Makefile.am): Substitute REPLACE_EXPM1F. * modules/expm1f (configure.ac): Consider REPLACE_EXPM1F. (Depends-on): Update conditions. * doc/posix-functions/expm1f.texi: Mention the IRIX 6.5 bug.
Diffstat (limited to 'lib/math.in.h')
-rw-r--r--lib/math.in.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/math.in.h b/lib/math.in.h
index 5413d3a160..c57e48bb9e 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -533,10 +533,19 @@ _GL_WARN_ON_USE (expl, "expl is unportable - "
#if @GNULIB_EXPM1F@
-# if !@HAVE_EXPM1F@
+# if @REPLACE_EXPM1F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1f
+# define expm1f rpl_expm1f
+# endif
+_GL_FUNCDECL_RPL (expm1f, float, (float x));
+_GL_CXXALIAS_RPL (expm1f, float, (float x));
+# else
+# if !@HAVE_EXPM1F@
_GL_FUNCDECL_SYS (expm1f, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (expm1f, float, (float x));
+# endif
_GL_CXXALIASWARN (expm1f);
#elif defined GNULIB_POSIXCHECK
# undef expm1f