diff lib/math.in.h @ 40116:54732a1c637e

rintl: Override broken implementation on NetBSD. * lib/math.in.h (rintl): Test also REPLACE_RINTL. * m4/rintl.m4 (gl_FUNC_RINTL): Add test for negative arguments. Set REPLACE_RINTL. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_RINTL. * modules/math (Makefile.in): Substitute REPLACE_RINTL. * modules/rintl (Depends-on, configure.ac): Test REPLACE_RINTL. * doc/posix-functions/rintl.texi: Mention the NetBSD bug.
author Bruno Haible <bruno@clisp.org>
date Mon, 21 Jan 2019 00:33:28 +0100
parents 7ca21aacb634
children
line wrap: on
line diff
--- a/lib/math.in.h	Sun Jan 20 23:48:18 2019 +0100
+++ b/lib/math.in.h	Mon Jan 21 00:33:28 2019 +0100
@@ -1845,10 +1845,19 @@
 #endif
 
 #if @GNULIB_RINTL@
-# if !@HAVE_RINTL@
+# if @REPLACE_RINTL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef rintl
+#   define rintl rpl_rintl
+#  endif
+_GL_FUNCDECL_RPL (rintl, long double, (long double x));
+_GL_CXXALIAS_RPL (rintl, long double, (long double x));
+# else
+#  if !@HAVE_RINTL@
 _GL_FUNCDECL_SYS (rintl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (rintl, long double, (long double x));
 # endif
-_GL_CXXALIAS_SYS (rintl, long double, (long double x));
 _GL_CXXALIASWARN (rintl);
 #elif defined GNULIB_POSIXCHECK
 # undef rintl