Bug 89179 - Sun compilation failing in 1.0.0_devel
Summary: Sun compilation failing in 1.0.0_devel
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-09 17:39 UTC by Nicolas Brisset
Modified: 2004-09-09 17:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A patch that allows compilation on a Solaris 8 machine... (554 bytes, patch)
2004-09-09 17:41 UTC, Nicolas Brisset
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2004-09-09 17:39:06 UTC
Version:           1.0.0_devel (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.3.2
OS:                SunOS (sun4u) release 5.8

Some important lines have disappeared recently from kst2dplot.cpp. They allowed it to compile on a Solaris box :-)

It has to do with a "ieefp.h" header and the isinf() function.
A patch follows (my first patch :-) !
Comment 1 Nicolas Brisset 2004-09-09 17:41:19 UTC
Created attachment 7472 [details]
A patch that allows compilation on a Solaris 8 machine...

That solved the problem for me.
Comment 2 George Staikos 2004-09-09 17:46:42 UTC
CVS commit by staikos: 

slightly modified patch to fix solaris build
CCMAIL: 89179-done@bugs.kde.org


  M +8 -1      kst2dplot.cpp   1.261


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.260:1.261
@@ -18,4 +18,7 @@
 #include <assert.h>
 #include <float.h>
+#ifdef __sun
+#include <ieeefp.h>
+#endif
 #include <limits.h>
 #include <math.h>
@@ -54,6 +57,10 @@
 #endif
 
+#if defined(__SVR4) && defined(__sun)
+  inline int isinf(double x) { return x == x && !finite(x); }
+#endif
+
 static double ticks[] = {1.0, 2.0, 4.0, 5.0, 10.0};
-static int iNumTicks = sizeof( ticks ) / sizeof( double );
+static int iNumTicks = sizeof(ticks) / sizeof(double);
 
 inline int d2i(double x) {