From 0c72c2b66c2baec78a65c05d97ad68dd69d864c1 Mon Sep 17 00:00:00 2001 From: jjohnstn Date: Tue, 12 Jan 2010 07:55:47 +0000 Subject: [PATCH] 2010-01-11 Yaakov Selkowitz * libc/include/math.h (log2, log2f): Disable macro versions for C++, as they are incompatible with OpenMP/C++ headers. 2 --- newlib/ChangeLog | 5 +++++ newlib/libc/include/math.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 78ce466c66..5136fa41fd 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2010-01-11 Yaakov Selkowitz + + * libc/include/math.h (log2, log2f): Disable macro versions for C++, + as they are incompatible with OpenMP/C++ headers. + 2010-01-10 Corinna Vinschen * libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion of diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index 7571e46a04..6e9da28f6c 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -275,7 +275,9 @@ extern double lgamma _PARAMS((double)); extern double erf _PARAMS((double)); extern double erfc _PARAMS((double)); extern double log2 _PARAMS((double)); +#if !defined(__cplusplus) #define log2(x) (log (x) / _M_LOG2_E) +#endif #ifndef __math_68881 extern double hypot _PARAMS((double, double)); @@ -353,7 +355,9 @@ extern float lgammaf _PARAMS((float)); extern float erff _PARAMS((float)); extern float erfcf _PARAMS((float)); extern float log2f _PARAMS((float)); +#if !defined(__cplusplus) #define log2f(x) (logf (x) / (float) _M_LOG2_E) +#endif extern float hypotf _PARAMS((float, float)); #endif /* ! defined (_REENT_ONLY) */ -- 2.11.0