From 90670c2652e7299dfe978bc62eb02bf0038b8edb Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Sun, 27 Nov 2005 20:20:25 +0000 Subject: [PATCH] warning fixes, aka don't redefine log2() et al. if already defined (Win32) --- SheepShaver/src/kpx_cpu/src/mathlib/mathlib.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SheepShaver/src/kpx_cpu/src/mathlib/mathlib.hpp b/SheepShaver/src/kpx_cpu/src/mathlib/mathlib.hpp index 6782db07..a5c5f1ac 100644 --- a/SheepShaver/src/kpx_cpu/src/mathlib/mathlib.hpp +++ b/SheepShaver/src/kpx_cpu/src/mathlib/mathlib.hpp @@ -64,9 +64,11 @@ extern "C" float exp2f(float x); extern "C" double exp2(double x); #define exp2f(x) (float)exp2(x) #else +#ifndef exp2f #define exp2f(x) powf(2.0, (x)) #endif #endif +#endif // 7.12.6.10 The log2 functions #ifdef HAVE_LOG2F @@ -79,9 +81,11 @@ extern "C" double log2(double x); #ifndef M_LN2 #define M_LN2 logf(2.0) #endif +#ifndef log2f #define log2f(x) logf(x) / M_LN2 #endif #endif +#endif // 7.12.9.1 The ceil functions #ifdef HAVE_CEILF