diff lib/math.in.h @ 16670:1fae18345ca0

log1pl-ieee: Work around test failure on IRIX 6.5. * m4/log1pl-ieee.m4: New file. * m4/log1pl.m4 (gl_FUNC_LOG1PL): If gl_FUNC_LOG1PL_IEEE is present, test whether log1pl works with a minus zero argument. Replace it if not. * lib/math.in.h (log1pl): Override if REPLACE_LOG1PL is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1PL. * modules/math (Makefile.am): Substitute REPLACE_LOG1PL. * modules/log1pl (configure.ac): Consider REPLACE_LOG1PL. (Depends-on): Update conditions. * modules/log1pl-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4, m4/signbit.m4. (configure.ac): Invoke gl_FUNC_LOG1PL_IEEE. * doc/posix-functions/log1pl.texi: Mention the log1pl-ieee module.
author Bruno Haible <bruno@clisp.org>
date Sun, 11 Mar 2012 02:36:40 +0100
parents f691c5744fcb
children e9598f93f892
line wrap: on
line diff
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -1268,10 +1268,19 @@
 #endif
 
 #if @GNULIB_LOG1PL@
-# if !@HAVE_LOG1PL@
+# if @REPLACE_LOG1PL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log1pl
+#   define log1pl rpl_log1pl
+#  endif
+_GL_FUNCDECL_RPL (log1pl, long double, (long double x));
+_GL_CXXALIAS_RPL (log1pl, long double, (long double x));
+# else
+#  if !@HAVE_LOG1PL@
 _GL_FUNCDECL_SYS (log1pl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
 # endif
-_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
 _GL_CXXALIASWARN (log1pl);
 #elif defined GNULIB_POSIXCHECK
 # undef log1pl