diff lib/math.in.h @ 16657:86d5719ce2ff

New module 'log1pf'. * lib/math.in.h (log1pf): New declaration. * lib/log1pf.c: New file. * m4/log1pf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log1pf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PF, HAVE_LOG1PF, REPLACE_LOG1PF. * modules/math (Makefile.am): Substitute GNULIB_LOG1PF, HAVE_LOG1PF, REPLACE_LOG1PF. * modules/log1pf: New file. * tests/test-math-c++.cc: Check the declaration of log1pf. * doc/posix-functions/log1pf.texi: Mention the new module.
author Bruno Haible <bruno@clisp.org>
date Sat, 10 Mar 2012 22:28:49 +0100
parents e1c84de792a7
children 28ba2c8d945e
line wrap: on
line diff
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -1221,6 +1221,29 @@
 #endif
 
 
+#if @GNULIB_LOG1PF@
+# if @REPLACE_LOG1PF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log1pf
+#   define log1pf rpl_log1pf
+#  endif
+_GL_FUNCDECL_RPL (log1pf, float, (float x));
+_GL_CXXALIAS_RPL (log1pf, float, (float x));
+# else
+#  if !@HAVE_LOG1PF@
+_GL_FUNCDECL_SYS (log1pf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIASWARN (log1pf);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pf
+# if HAVE_RAW_DECL_LOG1PF
+_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
+                 "use gnulib module log1pf for portability");
+# endif
+#endif
+
 #if @GNULIB_LOG1P@
 # if !@HAVE_LOG1P@
 _GL_FUNCDECL_SYS (log1p, double, (double x));