diff lib/math.in.h @ 15860:e6ff40a73d85

New module 'expf'. * lib/math.in.h (expf): New declaration. * lib/expf.c: New file. * m4/expf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether expf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPF, HAVE_EXPF. * modules/math (Makefile.am): Substitute GNULIB_EXPF, HAVE_EXPF. * modules/expf: New file. * tests/test-math-c++.cc: Check the declaration of expf. * doc/posix-functions/expf.texi: Mention the new module.
author Bruno Haible <bruno@clisp.org>
date Sat, 08 Oct 2011 22:10:45 +0200
parents 6b8400199763
children c2fa2febdb1f
line wrap: on
line diff
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -228,6 +228,21 @@
 #endif
 
 
+#if @GNULIB_EXPF@
+# if !@HAVE_EXPF@
+#  undef expf
+_GL_FUNCDECL_SYS (expf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (expf, float, (float x));
+_GL_CXXALIASWARN (expf);
+#elif defined GNULIB_POSIXCHECK
+# undef expf
+# if HAVE_RAW_DECL_EXPF
+_GL_WARN_ON_USE (expf, "expf is unportable - "
+                 "use gnulib module expf for portability");
+# endif
+#endif
+
 #if @GNULIB_EXPL@
 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
 _GL_FUNCDECL_SYS (expl, long double, (long double x));