aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth/mt32
diff options
context:
space:
mode:
authorMax Horn2008-02-26 17:03:10 +0000
committerMax Horn2008-02-26 17:03:10 +0000
commiteb9f0dcbf88274d52747d9e9d2196e374d12abba (patch)
tree7a1e86f05937ddcde8a48f5fad1894f8cdbf7178 /sound/softsynth/mt32
parentda09e917e8ec5d7a2797fae21b2add46c5bbc572 (diff)
downloadscummvm-rg350-eb9f0dcbf88274d52747d9e9d2196e374d12abba.tar.gz
scummvm-rg350-eb9f0dcbf88274d52747d9e9d2196e374d12abba.tar.bz2
scummvm-rg350-eb9f0dcbf88274d52747d9e9d2196e374d12abba.zip
Completed fix for bug #1523129 (SOLARIS: solaris 8 build broken)
svn-id: r30972
Diffstat (limited to 'sound/softsynth/mt32')
-rw-r--r--sound/softsynth/mt32/partial.cpp13
-rw-r--r--sound/softsynth/mt32/synth.cpp13
-rw-r--r--sound/softsynth/mt32/tables.cpp13
3 files changed, 27 insertions, 12 deletions
diff --git a/sound/softsynth/mt32/partial.cpp b/sound/softsynth/mt32/partial.cpp
index 9d32282a82..1aab2a8de7 100644
--- a/sound/softsynth/mt32/partial.cpp
+++ b/sound/softsynth/mt32/partial.cpp
@@ -25,11 +25,16 @@
#include "mt32emu.h"
-#ifdef MACOSX
-// Older versions of Mac OS X didn't supply a powf function. To ensure
-// binary compatibility, we force using pow instead of powf (the only
-// potential drawback is that it might be a little bit slower).
+#if defined(MACOSX) || defined(__solaris__)
+// Older versions of Mac OS X didn't supply a powf function, so using it
+// will cause a binary incompatibility when trying to run a binary built
+// on a newer OS X release on an olderr one. And Solaris 8 doesn't provide
+// powf, floorf, fabsf etc. at all.
+// Hence we re-define them here. The only potential drawback is that it
+// might be a little bit slower this way.
#define powf pow
+#define floorf floor
+#define fabsf fabs
#endif
#define FIXEDPOINT_UDIV(x, y, point) (((x) << (point)) / ((y)))
diff --git a/sound/softsynth/mt32/synth.cpp b/sound/softsynth/mt32/synth.cpp
index e6cd6963a8..785e8098c7 100644
--- a/sound/softsynth/mt32/synth.cpp
+++ b/sound/softsynth/mt32/synth.cpp
@@ -25,11 +25,16 @@
#include "mt32emu.h"
-#ifdef MACOSX
-// Older versions of Mac OS X didn't supply a powf function. To ensure
-// binary compatibility, we force using pow instead of powf (the only
-// potential drawback is that it might be a little bit slower).
+#if defined(MACOSX) || defined(__solaris__)
+// Older versions of Mac OS X didn't supply a powf function, so using it
+// will cause a binary incompatibility when trying to run a binary built
+// on a newer OS X release on an olderr one. And Solaris 8 doesn't provide
+// powf, floorf, fabsf etc. at all.
+// Hence we re-define them here. The only potential drawback is that it
+// might be a little bit slower this way.
#define powf pow
+#define floorf floor
+#define fabsf fabs
#endif
namespace MT32Emu {
diff --git a/sound/softsynth/mt32/tables.cpp b/sound/softsynth/mt32/tables.cpp
index 4591ea22e3..20b7cf289a 100644
--- a/sound/softsynth/mt32/tables.cpp
+++ b/sound/softsynth/mt32/tables.cpp
@@ -25,11 +25,16 @@
#include "mt32emu.h"
-#ifdef MACOSX
-// Older versions of Mac OS X didn't supply a powf function. To ensure
-// binary compatibility, we force using pow instead of powf (the only
-// potential drawback is that it might be a little bit slower).
+#if defined(MACOSX) || defined(__solaris__)
+// Older versions of Mac OS X didn't supply a powf function, so using it
+// will cause a binary incompatibility when trying to run a binary built
+// on a newer OS X release on an olderr one. And Solaris 8 doesn't provide
+// powf, floorf, fabsf etc. at all.
+// Hence we re-define them here. The only potential drawback is that it
+// might be a little bit slower this way.
#define powf pow
+#define floorf floor
+#define fabsf fabs
#endif
#define FIXEDPOINT_MAKE(x, point) ((Bit32u)((1 << point) * x))