diff options
author | Bruno Haible <bruno@clisp.org> | 2016-12-17 19:21:51 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2016-12-17 23:09:02 +0100 |
commit | 4d3d2763fe89ba36c256f496f0e095c650756705 (patch) | |
tree | d60089c9fc63acee2938864500b6e69590ca6dd4 /lib/math.in.h | |
parent | 6cd601d2b97592e7bd603bd8e0ec8aec7034faec (diff) | |
download | gnulib-4d3d2763fe89ba36c256f496f0e095c650756705.tar.gz |
atanf: Avoid redefinition error on MSVC.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATANF.
* m4/atanf.m4 (gl_FUNC_ATANF): Set REPLACE_ATANF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_ATANF.
* lib/math.in.h (atanf): Override if REPLACE_ATANF is 1.
Diffstat (limited to 'lib/math.in.h')
-rw-r--r-- | lib/math.in.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/math.in.h b/lib/math.in.h index f76f6c6aab..04bbd4ef7e 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -292,11 +292,20 @@ _GL_WARN_ON_USE (asinl, "asinl is unportable - " #if @GNULIB_ATANF@ -# if !@HAVE_ATANF@ -# undef atanf +# if @REPLACE_ATANF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef atanf +# define atanf rpl_atanf +# endif +_GL_FUNCDECL_RPL (atanf, float, (float x)); +_GL_CXXALIAS_RPL (atanf, float, (float x)); +# else +# if !@HAVE_ATANF@ +# undef atanf _GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif +# endif _GL_CXXALIAS_SYS (atanf, float, (float x)); +# endif _GL_CXXALIASWARN (atanf); #elif defined GNULIB_POSIXCHECK # undef atanf |