[Live-devel] No fabsf() on Solaris 9 and older
Sergio Gelato
Sergio.Gelato at astro.su.se
Sat Mar 19 14:05:05 PST 2005
While it appears that Sun has finally added fabsf() to <math.h> in Solaris 10,
some of us still need to build for earlier versions.
The following patch replaces fabsf() with fabs(); if my understanding of C++
isn't completely wrong, this shouldn't have any adverse impact on the results.
(Solaris 8 with patch 111721-04 has
extern float __fabsf(float);
inline float fabs(float __X) { return __fabsf(__X); }
in the relevant header file.)
--- old/liveMedia/ServerMediaSession.cpp 2005-03-11 10:59:40.000000000 +0100
+++ new/liveMedia/ServerMediaSession.cpp 2005-03-18 22:14:10.896044000 +0100
@@ -111,7 +111,7 @@
subsession->testScaleFactor(ssscale);
if (subsession == fSubsessionsHead) { // this is the first subsession
minSSScale = maxSSScale = bestSSScale = ssscale;
- bestDistanceTo1 = fabsf(ssscale - 1.0f);
+ bestDistanceTo1 = fabs(ssscale - 1.0f);
} else {
if (ssscale < minSSScale) {
minSSScale = ssscale;
@@ -119,7 +119,7 @@
maxSSScale = ssscale;
}
- float distanceTo1 = fabsf(ssscale - 1.0f);
+ float distanceTo1 = fabs(ssscale - 1.0f);
if (distanceTo1 < bestDistanceTo1) {
bestSSScale = ssscale;
bestDistanceTo1 = distanceTo1;
More information about the live-devel
mailing list