From 64a42d221308e386cc9908d4b82a1e2379628889 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 17 Sep 2011 17:14:38 +0200 Subject: [PATCH] math: Avoid macro redefinition warnings on MSVC. * lib/math.in.h (ceilf, ceill, floorf, floorl, frexpl, ldexpl): Undefine before redefining. --- ChangeLog | 6 ++++++ lib/math.in.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1c87b707e..6b18485ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-09-17 Bruno Haible + math: Avoid macro redefinition warnings on MSVC. + * lib/math.in.h (ceilf, ceill, floorf, floorl, frexpl, ldexpl): + Undefine before redefining. + +2011-09-17 Bruno Haible + doc: Mention functions which are declared as macros. * doc/posix-functions/*[fl].texi: Mention that some functions are defined as macros with arguments only. diff --git a/lib/math.in.h b/lib/math.in.h index 05f03b1ee..afbc9cbd2 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -187,6 +187,7 @@ _GL_WARN_ON_USE (atanl, "atanl is unportable - " #if @GNULIB_CEILF@ # if @REPLACE_CEILF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ceilf # define ceilf rpl_ceilf # endif _GL_FUNCDECL_RPL (ceilf, float, (float x)); @@ -222,6 +223,7 @@ _GL_CXXALIASWARN (ceil); #if @GNULIB_CEILL@ # if @REPLACE_CEILL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ceill # define ceill rpl_ceill # endif _GL_FUNCDECL_RPL (ceill, long double, (long double x)); @@ -275,6 +277,7 @@ _GL_WARN_ON_USE (expl, "expl is unportable - " #if @GNULIB_FLOORF@ # if @REPLACE_FLOORF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef floorf # define floorf rpl_floorf # endif _GL_FUNCDECL_RPL (floorf, float, (float x)); @@ -310,6 +313,7 @@ _GL_CXXALIASWARN (floor); #if @GNULIB_FLOORL@ # if @REPLACE_FLOORL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef floorl # define floorl rpl_floorl # endif _GL_FUNCDECL_RPL (floorl, long double, (long double x)); @@ -339,6 +343,7 @@ _GL_WARN_ON_USE (floorl, "floorl is unportable - " Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef frexpl # define frexpl rpl_frexpl # endif _GL_FUNCDECL_RPL (frexpl, long double, @@ -368,6 +373,7 @@ _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " /* Return x * 2^exp. */ #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ldexpl # define ldexpl rpl_ldexpl # endif _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -- 2.11.0